Skip to content

The clarive CLI

clarive is a command line program that drives a Clarive server from a terminal, a script, a CI pipeline or an AI agent. With it you can deploy changesets and follow their job logs, search and update topics, read and edit rules as HCL, manage resources (CIs), artifacts and git repositories, run commands and ship files to servers, and administer users, roles, projects and settings.

It is one small binary with no runtime to install. It talks to the server's REST API (/api/v2) with a personal access token, so it works from any machine that can reach Clarive over HTTPS.

One API, three doors

The CLI does not implement any business logic of its own. Every command is an operation of the Clarive API, the same operation that the REST API and the MCP server publish:

You want to... REST MCP tool CLI
Read a job log POST /api/v2/call/job.logs job_logs clarive job logs 1234
Search topics POST /api/v2/call/topic.search topic_search clarive topic search "login page"
Save a rule as HCL POST /api/v2/call/hcl.save_rule hcl_save_rule clarive rule edit 42

The three agree on names, parameters, permissions and errors because they call the same code on the server. When the server gains an operation, the CLI gains a command the next time it refreshes its catalog, with no new CLI release (see Commands).

Install

The CLI is published with every Clarive release and downloads from https://clarive.com/downloads/cli/<file>, with no form to fill in. The install page links the newest ones. It is one binary with nothing to install around it.

Platform Archive
Linux x86_64 clarive-cli_latest_linux-x86_64.tar.gz
Linux arm64 clarive-cli_latest_linux-arm64.tar.gz
macOS, Apple silicon clarive-cli_latest_darwin-arm64.tar.gz
macOS, Intel clarive-cli_latest_darwin-x86_64.tar.gz
Windows x86_64 clarive-cli_latest_windows-x86_64.tar.gz
Windows arm64 clarive-cli_latest_windows-arm64.tar.gz

The latest names always point to the newest release. Each release also has versioned archives, clarive-cli_<version>_<os>-<arch>.tar.gz, and a clarive-cli_<version>_SHA256SUMS file with their checksums. Use a versioned archive where you want the same CLI every time, in CI pipelines for example.

Each archive holds the clarive binary (clarive.exe on Windows), the README and the license. On Linux or macOS:

curl -fsSL https://clarive.com/downloads/cli/clarive-cli_latest_linux-x86_64.tar.gz | tar xz clarive
sudo install -m 0755 clarive /usr/local/bin/clarive

On Windows, in PowerShell (Windows 10 and later ship curl.exe and tar):

curl.exe -fsSLO https://clarive.com/downloads/cli/clarive-cli_latest_windows-x86_64.tar.gz
tar -xzf clarive-cli_latest_windows-x86_64.tar.gz clarive.exe

Then move clarive.exe to a folder on your PATH.

To check a download, fetch the checksums of its version and compare:

curl -fsSLO https://clarive.com/downloads/cli/clarive-cli_<version>_SHA256SUMS
sha256sum --ignore-missing -c clarive-cli_<version>_SHA256SUMS     # macOS: shasum -a 256 --ignore-missing -c ...

On macOS, a binary downloaded with a browser instead of curl is quarantined. Clear it with xattr -d com.apple.quarantine clarive.

Build from source

The CLI is also built from the clarive-cli/ directory of the Clarive source tree, with Go 1.25 or newer:

cd clarive-cli
make build            # bin/clarive for this machine
make install          # copies it to $GOBIN or ~/bin (PREFIX=/usr/local/bin to change)
make dist VERSION=x   # the release archives above, into dist/

The build uses only the Go module cache by default; on a machine that has never built it, run make OFFLINE=0 build once to let Go download the dependencies. Run plain make in clarive-cli/ to see every target.

Check it works:

clarive version
clarive version --server       # also asks the server for its version

The first five minutes

Log in once. The CLI asks for your username and password, sends them to the server once, and keeps the token the server hands back:

clarive login --url https://clarive.example.com
clarive whoami

Find the operation for a task by describing it in a few words:

clarive api search job log
clarive api describe job.logs

Then run it:

clarive job list --status RUNNING --limit 10
clarive job logs JOB-00012 --follow
clarive topic search --assigned-to-me --only-open
clarive topic explain-status-change 1234 Done
clarive rule edit "Deploy web"

On a terminal the CLI prints tables. When its output goes to a pipe or a file it prints JSON, which is what scripts and agents want:

clarive job list --status ERROR | jq -r '.items[].name'

What is in this section

  • Logging in and profiles: tokens, several servers, configuration, CI pipelines and agents.
  • Commands: how operations become commands, passing parameters, files, the catalog and the namespaces.
  • Output and exit codes: tables, JSON, YAML, errors and the exit codes scripts can rely on.
  • Shortcuts: following job logs, waiting for jobs and editing rules as HCL.
  • Recipes: complete examples for day-to-day tasks and CI.
  • Troubleshooting: what the common errors mean.

The CLI is also the easiest way to connect AI agents to Clarive: clarive mcp bridges the server's MCP tools to any agent that runs local MCP servers. See Connecting agents.