Skip to content

CLI Overview

The Clank CLI is a standalone Go binary that lets you deploy, manage, and inspect your Clank services from the terminal. It communicates with the Clank API over HTTPS and stores an authenticated session locally so you stay logged in between commands.

Download the pre-built binary for your platform from the Clank dashboard under Settings > CLI, or use curl:

Terminal window
# macOS (Apple Silicon)
curl -fsSL https://clank.host/api/install/cli/darwin-arm64 -o clank
chmod +x clank && sudo mv clank /usr/local/bin/
# macOS (Intel)
curl -fsSL https://clank.host/api/install/cli/darwin-amd64 -o clank
chmod +x clank && sudo mv clank /usr/local/bin/
# Linux (x86_64)
curl -fsSL https://clank.host/api/install/cli/linux-amd64 -o clank
chmod +x clank && sudo mv clank /usr/local/bin/

Verify the installation:

Terminal window
clank version

Before using any command, point the CLI at your Clank instance and log in:

Terminal window
clank config set base_url https://your-clank-instance.com
clank login

clank login opens a browser window for authentication. After you log in, a session cookie is stored in your local config file (~/.clank.yaml by default). You can also set CLANK_URL as an environment variable instead of using config set.

CommandDescription
clank loginAuthenticate with the Clank platform
clank logoutClear the stored session
clank deployTrigger a deployment for a service
clank rollbackRoll back a service to its previous deployment
clank logsStream or fetch recent logs for a service
clank projects listList all projects in the current team
clank projects createCreate a new project
clank services listList services in a project
clank services infoShow details for a specific service
clank servers listList enrolled agent servers
clank servers addRegister a new server
clank servers removeRemove a server from the platform
clank team listList team members
clank team inviteInvite a user to the team
clank team removeRemove a member from the team
clank config setSet a configuration value (e.g., base_url)
clank config getRead a configuration value
clank openOpen the current project in the Clank dashboard
clank versionPrint the CLI version

Every command supports --help for detailed usage and available flags.

Trigger a deployment for a service by name:

Terminal window
clank deploy --project my-app --service api

The CLI streams build and deploy output in real time and exits with a non-zero code if the deployment fails, making it suitable for CI pipelines.

Tail the most recent logs for a running service:

Terminal window
clank logs --project my-app --service api --follow

List all connected agent servers and their health status:

Terminal window
clank servers list

If a deployment causes issues, roll back to the previous version:

Terminal window
clank rollback --project my-app --service api

The CLI reads its configuration from ~/.clank.yaml. The file stores the platform URL, session credentials, and the currently selected team. You can override the config path with --config or the CLANK_CONFIG environment variable.