Download CLI
You need the Codefresh CLI to install Codefresh runtimes.
- For the initial download, you also need to generate the API key and create the API authentication context, all from the UI.
- Subsequent downloads for upgrade purposes require you to only run the download command, using existing API credentials.
Download Codefresh CLI
Downloading the Codefresh CLI requires you to select the download mode and OS, generate an API key, and authentication context.
- Do one of the following:
- For first-time installation, go to the Welcome page, select + Install Runtime.
- If you have provisioned a hybrid/hosted runtime, in the Codefresh UI, go to Runtimes, and select + Add Runtime.
- Download the Codefresh CLI:
- Select one of the methods.
- Generate the API key and create the authentication context.
Upgrade Codefresh CLI
Upgrade the CLI to the latest version to prevent installation errors.
- Check the version of the CLI you have installed:
cf version
- Compare with the latest version released by Codefresh.
- Select and run the appropriate command:
Download mode | OS | Commands |
---|---|---|
curl |
MacOS-x64 | curl -L --output - https://github.com/codefresh-io/cli-v2/releases/latest/download/cf-darwin-amd64.tar.gz | tar zx && mv ./cf-darwin-amd64 /usr/local/bin/cf && cf version |
MacOS-m1 | curl -L --output - https://github.com/codefresh-io/cli-v2/releases/latest/download/cf-darwin-arm64.tar.gz | tar zx && mv ./cf-darwin-arm64 /usr/local/bin/cf && cf version |
|
Linux - X64 | curl -L --output - https://github.com/codefresh-io/cli-v2/releases/latest/download/cf-linux-amd64.tar.gz | tar zx && mv ./cf-linux-amd64 /usr/local/bin/cf && cf version |
|
Linux - ARM | curl -L --output - https://github.com/codefresh-io/cli-v2/releases/latest/download/cf-linux-arm64.tar.gz | tar zx && mv ./cf-linux-arm64 /usr/local/bin/cf && cf version |
|
brew |
N/A | brew tap codefresh-io/cli && brew install cf2 |
Related articles
Set up hosted (Hosted GitOps) environment
Install hybrid runtimes