All of the accessible commands can be listed with gitpod --help
.
- Download the CLI for your platform and make it executable:
wget -O gitpod https://gitpod.io/static/bin/gitpod-cli-darwin-arm64
chmod u+x gitpod
- Optionally, make it available globally. On macOS:
sudo mv gitpod /usr/local/bin/
Start by logging in with gitpod login
, which will also create a default context in the configuration file (~/.gitpod/config.yaml
).
To develop the CLI with Gitpod, you can run it just like locally, but in Gitpod workspaces, a browser and a keyring are not available. To log in despite these limitations, provide a PAT via the GITPOD_TOKEN
environment variable, or use the --token
flag with the login command.
You will have gitpod-cli ready as gitpod
on any Workspace based on https://github.com/gitpod-io/gitpod
.
# Reinstall `gitpod`
leeway run components/local-app:install-cli
# Reinstall completion
leeway run components/local-app:cli-completion
The CLI is versioned independently of other Gitpod artifacts due to its auto-updating behaviour.
To create a new version that existing clients will consume increment the number in version.txt
. Make sure to use semantic versioning. The minor version can be greater than 10, e.g. 0.342
is a valid version.
Beware: this is very much work in progress and will likely break things.
docker run --rm -it -v /tmp/dest:/out eu.gcr.io/gitpod-core-dev/build/local-app:<version>
./local-app
cd components/local-app
BROWSER= GITPOD_HOST=<URL-of-your-preview-env> go run main.go --mock-keyring run