CLI client for the OllyGarden REST API. Query services, insights, analytics, and manage webhooks from your terminal.
macOS / Linux
curl -fsSL https://raw.githubusercontent.com/ollygarden/ollygarden-cli/main/install.sh | shWindows — download the zip from releases, extract, put ollygarden.exe on your PATH.
From source — go install github.com/ollygarden/ollygarden-cli/cmd/ollygarden@latest (reports version dev).
To pin a version or customize the install dir, see install.sh --help.
Two important environment variables should be set depending on the environment you are working in. The URL and API key differ by environment.
| Setting | Flag | Env var | Default |
|---|---|---|---|
| API key | — | OLLYGARDEN_API_KEY |
(required) |
| API URL | --api-url |
OLLYGARDEN_API_URL |
https://api.ollygarden.cloud |
To point at a different environment (e.g. internal):
export OLLYGARDEN_API_URL=https://api.internal.ollygarden.cloud
ollygarden services listOr per-command:
ollygarden services list --api-url https://api.internal.ollygarden.cloudFlag takes precedence over env var, which takes precedence over the default.
Save credentials to disk so you don't have to export OLLYGARDEN_API_KEY in every shell:
# Interactive (hidden prompt):
ollygarden auth login
# Or pipe a token:
echo "$OLLYGARDEN_API_KEY" | ollygarden auth login
# Or read from a file:
ollygarden auth login --token-file /path/to/tokenGet a token at https://ollygarden.app/settings.
Multiple contexts (e.g. for different orgs or environments) coexist in one config:
ollygarden auth login --context prod
ollygarden auth login --context internal --api-url https://api.internal.ollygarden.cloud
ollygarden auth use-context prod
ollygarden auth list-contextsPer-invocation override without changing the active context:
ollygarden --context internal services listShow what's active (probes the API by default):
ollygarden auth status # validates the token via /organization
ollygarden auth status --no-probe # offline checkRemove credentials:
ollygarden auth logout # remove current context
ollygarden auth logout --context internal # remove a specific context
ollygarden auth logout --all --confirm # remove everythingStorage: YAML at os.UserConfigDir()/ollygarden/config.yaml with mode 0600. Override the path with OLLYGARDEN_CONFIG.
Precedence: OLLYGARDEN_API_KEY env var (when set) always wins over saved contexts, so CI runs and ad-hoc invocations continue to work.
ollygarden organization # your org tier, features, score
ollygarden services list # all services
ollygarden services get <service-id> # single service details
ollygarden insights list --status active # active insights
ollygarden insights summary <insight-id> # AI-generated summary
ollygarden analytics services # per-service analytics
ollygarden webhooks create --name alerts \
--url https://example.com/hook # create a webhookEvery command supports --help for full flag details.
ollygarden services list # human-readable tables (default)
ollygarden services list --json # full API JSON envelope
ollygarden services list --json | jq '.data' # pipe to jq
ollygarden services list -q # quiet: exit code onlyAll list commands support --limit and --offset:
ollygarden services list --limit 10 --offset 20ollygarden completion bash > /etc/bash_completion.d/ollygarden
ollygarden completion zsh > "${fpath[1]}/_ollygarden"
ollygarden completion fish > ~/.config/fish/completions/ollygarden.fish