Overview
Thelatitude CLI is a single, self-contained binary that exposes your Latitude organization on the command line. Like the MCP server, its commands are generated directly from the Latitude API, so the command surface automatically stays in sync with the platform. For the live list of commands and their input/output schemas, check the API reference.
It’s built for two audiences:
- Humans, a fast, scriptable way to inspect and manage projects, traces, datasets, members, keys, and more without leaving the terminal.
- Agents, a zero-dependency way for an agent (Claude Code, Cursor, Codex, …) to act on Latitude without wiring up an MCP connection, using
--format jsonfor machine-readable output and--schemafor machine-readable help.
Prefer a network connection? The MCP server exposes the same capabilities over OAuth.
Installation
The CLI ships as a pre-built binary on our GitHub Releases — grab the latestcli-vX.Y.Z release. Download the archive for your platform, extract it, and put the latitude binary somewhere on your PATH.
| OS | Architecture |
|---|---|
| Linux | x86-64 (amd64) |
| Linux | ARM64 (aarch64) |
| macOS | Intel (amd64) |
| macOS | Apple Silicon (arm64) |
| Windows | x86-64 (amd64) |
- MacOS / Linux
- Windows
On MacOS the first run may be blocked by Gatekeeper. Allow it with
xattr -d com.apple.quarantine /usr/local/bin/latitude, or via System Settings → Privacy & Security.Authentication
The CLI authenticates with an organization-scoped API key. Create one in the Latitude UI under Settings → Keys → API Keys. There are two ways to give the key to the CLI:- Keyring (recommended)
- Environment variable
Store the key once in your operating system’s secret store (Keychain on MacOS, Secret Service on Linux, Credential Manager on Windows):You’ll be prompted to paste your API key; it’s saved to the keyring under
latitude:ApiKeyAuth and reused on every subsequent command. Manage it with:Usage
The general shape islatitude <resource> <command> [flags], where each resource mirrors an area of the Latitude API:
projects, traces, datasets, and more — run latitude --help for the full list. Common examples:
latitude --help for the full list):
--query <JMESPath>— project/filter the response before it’s formatted, e.g.--query "items[].slug".--dry-run— validate the request locally without sending it to the API.--quiet/-q— suppress success output (errors still print to stderr).--debug— dump the raw HTTP request and response to stderr.
Output formats
Every command accepts--format to control how results are rendered. This makes the CLI equally good for humans reading a terminal and for scripts or agents parsing output.
| Format | Description |
|---|---|
table | Human-readable table. Default when stdout is a TTY. |
json | Pretty JSON. Default when the output is piped. |
jsonl | Newline-delimited JSON (NDJSON) — one compact value per line; arrays are flattened. Ideal for streaming into other tools. |
yaml | YAML. |
csv | CSV — convenient for spreadsheets. |
raw | The unmodified server response bytes. |
http | The full HTTP response (status line + headers + body), like curl -i. |
LATITUDE_OUTPUT environment variable (e.g. export LATITUDE_OUTPUT=json); the --format flag always overrides it.
Environment variables
| Variable | Purpose |
|---|---|
LATITUDE_API_KEY | API key used to authenticate (alternative to the keyring). |
LATITUDE_OUTPUT | Default output format when --format is omitted. |
LATITUDE_BASE_URL | Override the API base URL (e.g. self-hosted or a mock server). |
LATITUDE_TIMEOUT_SECS | Total request timeout, in seconds. |
LATITUDE_PROXY | HTTP(S) proxy URL. |
LATITUDE_CA_BUNDLE | Path to a PEM file with extra trust roots. |
LATITUDE_INSECURE=1 | Skip TLS verification (debugging only). |
HTTPS_PROXY / HTTP_PROXY / NO_PROXY / SSL_CERT_FILE variables are honored as well.
Shell completion
Generate a completion script for your shell —bash, zsh, fish, powershell, or elvish — and load it to get tab-completion for every resource, command, and flag:
- zsh
- bash
- fish
Man page
The CLI can emit its own manual page in roff format, soman latitude works like any native tool:
For Agents
The CLI pairs naturally with agents:--format json/jsonl for structured output, --schema for machine-readable help, and latitude generate-skills to teach an agent the command surface — everything it needs to drive Latitude locally with no MCP connection. Prefer the MCP server when you’d rather connect the agent over the network with OAuth.