Skip to main content

CLI Overview

Use the Cloudgeni CLI when you want the same agent-session workflow from a terminal. It is useful for:
  • Chatting with an active AI DevOps session
  • Starting agent work from scripts or another coding agent
  • Reusing a selected organization across commands
  • Getting JSON output for automation

Installation

With Homebrew (macOS and Linux):
Or with the install script:
Homebrew handles upgrades with brew upgrade cloudgeni; the install script places the binary in ~/.cloudgeni/bin and adds it to your shell profile. Verify the install:

Create An API Key

The CLI needs an organization-scoped API key to talk to the API. Create one in the web app under Settings -> Developers -> API Keys, then copy the cgk_... value — it is shown once at creation time. Authenticate the CLI with it:
For CI and scripts, set CLOUDGENI_API_KEY in the environment instead of storing credentials with auth login.

Setup

cloudgeni org use selects the default organization for future commands. You can still pass --org <org> on any command when you need a one-off override. cloudgeni context use selects default repository and integration context for agent sessions in that organization. You can still pass context flags on one command when you need a one-off override.

Agent Context

Select the repo and integrations once, then let cloudgeni agent and cloudgeni agent run reuse them for new sessions:
For repository-only changes:
Repository values can be repository IDs, owner/name, URLs, or unambiguous names. Integration values can be IDs, names, or provider aliases.

Agent Sessions

Open the active session for the selected organization:
Send one message, stream the response, and return:
Check or change the active session:
Inside the interactive shell, use:
  • /help for available shell commands
  • /session to show the active session
  • /session <id> to attach to another session
  • /new to start a new session on the next message
  • /watch to stream the current session
  • /org to show the selected organization
  • /exit to leave the shell

Agent Automation

Use explicit subcommands when another tool or script is driving Cloudgeni:
For machine-readable output:

Finding Context

Use these commands when you want to inspect available context directly:

Integrations

List connected integrations:
Create GitHub integration setup links:
Create an Azure cloud integration:

Global Flags

  • --json or --output json for machine-readable output
  • --non-interactive to disable prompts
  • --org <org> to override the selected organization for one command
  • --token to override the bearer token for one command