Keptn v1 reached EOL December 22, 2023. For more information see https://bit.ly/keptn

Install Keptn CLI

The Keptn CLI is not Keptn itself but is instead an interface to Keptn, much as kubectl is an interface to Kubernetes. Install it on the local machine that is used to interact with your cloud provider, Kubernetes, etc.

The Keptn CLI sends commands to Keptn by interacting with the Keptn API. The API Token that is used to communicate with Keptn is generated during the installation.

It is possible to run Keptn without installing the Keptn CLI. Current Keptn releases allow you to create a project or run a sequence using the Keptn Bridge, and this may be adequate for demos or personal environments you set up for study. But the CLI is required for some functionality and it should be installed on production systems.

You can install the Keptn CLI using:

  • curl
  • Homebrew (MacOS only)
  • Standard binary installation tools for your operating system

Install with curl

You can use the curl command to install the Keptn CLI on Linux, WSL2, and macOS. Windows users need bash, curl, and awk installed (e.g., using Git Bash).

  1. Download the latest stable Keptn version from GitHub, unpack it, and install on your machine, usually to /usr/local/bin.:

    curl -sL https://get.keptn.sh/ | bash
    

    Use sudo to move the file to another location.

  2. Verify that the installation has worked and that the version is correct. On Linux and macOS, run:

    keptn version
    

    On Windows, run:

    .\keptn.exe version
    

Install on macOS using Homebrew

  1. Run the following command to automatically fetch the latest Keptn CLI via Homebrew:

    brew install keptn
    
  2. Verify that the installation has worked and that the version is correct by running:

    keptn version
    
  3. To upgrade Keptn CLI to a new release, run:

    brew upgrade keptn
    
  4. To uninstall Keptn CLI, run:

    brew uninstall keptn
    

Install Keptn CLI from binaries

Each release of Keptn provides binaries for the Keptn CLI. These binaries are available for Linux, macOS, and Windows. To install the Keptn CLI from the binaries:

  1. Download the version matching your operating system.

  2. Unpack the archive.

  3. Find the keptn binary in the unpacked directory.

    • For Linux / macOS:

      • Add executable permissions:
        chmod +x keptn
        
      • Move the keptn binary to the desired destination For example,
        mv keptn /usr/local/bin/keptn
        
    • For Windows:

      • Move/copy the executable to the desired folder.
      • Optionally, add the executable to the PATH environment variable.
  4. Verify that the installation has worked and that the version is correct.

    • On Linux or MacOS, run:

      keptn version
      
    • On Windows, run:

      .\keptn.exe version
      

After you install both the Keptn CLI and Keptn itself, you must authenticate the CLI. See Authenticate Keptn CLI and Bridge.