The CLI is pre-installed and automatically authenticated with limited access. Run gitpod login to upgrade to full access.When running inside an environment, the CLI automatically detects the current environment context. This means:
Environment ID is inferred: Commands like gitpod automations, gitpod environment port, and other environment-specific commands work without requiring --environment-id
Context preserved after login: When you run gitpod login inside an environment, the environment ID is preserved in your CLI context (as long as the login host matches the environment’s host). This allows you to continue using environment-specific commands after authentication.
Report incorrect code
Copy
Ask AI
# Inside an environment - no --environment-id neededgitpod automations service listgitpod environment port open 3000# After running gitpod login, these still work without --environment-idgitpod logingitpod automations task start my-task
If you log into a different host than your environment (e.g., logging into app.gitpod.io from an environment on ona.e-corp.com), the environment ID will not be preserved.
Instead of typing full UUIDs, you can use any substring of an environment ID:
Report incorrect code
Copy
Ask AI
# Full UUIDgitpod environment ssh 019194a6-f0b0-70a1-beae-99718c351b04# Prefixgitpod environment ssh 019194a6# Suffixgitpod environment ssh 351b04# Any substringgitpod environment ssh 70a1-beae
The CLI resolves the partial ID if it uniquely identifies an environment. If the substring matches multiple environments, you’ll see an error listing all matching IDs. If no environments match, you’ll be prompted to run gitpod environment list to see available environments.
Manage your dotfiles configuration directly from the CLI:
Report incorrect code
Copy
Ask AI
# View current dotfiles configurationgitpod user dotfiles get# Set dotfiles repositorygitpod user dotfiles set --repository https://github.com/user/dotfiles# Clear dotfiles configurationgitpod user dotfiles set
The get command supports output formats:
Report incorrect code
Copy
Ask AI
gitpod user dotfiles get -o jsongitpod user dotfiles get -o yaml