YOUR ACCOUNT, FROM THE TERMINAL

zctl CLI.
Manage your ZRouter account.

Build and edit virtual routers, manage API keys and provider connections, review usage, and add credits without leaving your terminal.

Who should use zctl?

zctl is for ZRouter account owners, developers, operations teams, and CI/CD maintainers who need terminal access to their own account.

When should you use the CLI?

Use zctl while coding, from remote terminals, or in repeatable scripts to create and update virtual routers, rotate keys, review usage, and manage account limits. Use the dashboard for visual charts and the playground. Account permissions stay the same across both interfaces.

You need a ZRouter account and the URL of your workspace. Installed clients need network access, and do not require Go, Node.js, or a repository checkout.

Read the complete installation and usage guide →

Install with npm

With Node.js 20 or later, install the package on macOS, Linux, or Windows. It includes the native CLI binaries; no Go compiler or separate download is required.

npm install -g zctl
zctl login --url 'https://zrouter.si'

Or run npx zctl@latest login --url 'https://zrouter.si'. Update with npm install -g zctl@latest.

Direct installation on macOS or Linux

Download the installer from this gateway, then run it. It verifies the binary checksum and installs to your personal ~/.local/bin directory.

curl -fsS 'https://zrouter.si/cli/install.sh' -o install-zctl.sh
sh install-zctl.sh --url 'https://zrouter.si'
export PATH="$HOME/.local/bin:$PATH"
zctl login --url 'https://zrouter.si'

Sign in with your password, Google, or GitHub in the browser, verify the terminal code, and approve access. Credentials expire after 30 days and can be revoked in CLI access.

Windows and direct downloads

Download your executable and compare its SHA-256 hash with SHA256SUMS. On Windows, rename it to zctl.exe, put it in a folder on PATH, and use PowerShell Get-FileHash -Algorithm SHA256 to verify.

Create and edit your routers

zctl models list
zctl routers create my-router --target openai/gpt-4.1 --strategy round_robin
zctl routers update my-router --description "My default route"
zctl routers edit my-router
zctl routers list
zctl routers export my-router > router.json
zctl routers apply --file router.json

Replace the example target with a provider/model available in your account. Router listing includes the routing strategies enabled on this deployment. Editing uses your VISUAL or EDITOR setting. Exported JSON supports weighted targets, schedules, plugins, failover, and session affinity. Use the returned source, such as accounts/ACCOUNT_ID/my-router, as your API model.

Manage the rest of your account

zctl account
zctl keys create --name production
zctl byok set openai
zctl credits add --amount 25 --open
zctl credits history
zctl usage summary
zctl logs requests --query 'limit=20'
zctl budgets list
zctl rate-limits list
zctl sessions list
zctl logout
zctl help

Provider keys and passwords are hidden when prompted. API key creation displays its secret once. Credit purchases open Stripe checkout, starting at $5. Commands return JSON for scripts. Set ZROUTER_URL and ZROUTER_TOKEN in CI, using a CLI management credential, and keep secrets out of shell history.

Prefer to work with an AI assistant?

Use the account MCP server to ask an assistant about usage or manage routers, keys, and enabled limits. Choose zctl for explicit commands and repeatable scripts, MCP for conversational account tasks, and the dashboard for charts and the playground.

Full CLI guide and troubleshooting · Platform documentation · Manage authorized terminals

YOUR NEXT REQUEST STARTS HERE

Build with AI.
Keep the controls.

One account for model access, routing, and usage. Manage it from your dashboard, terminal, or AI assistant.

Create your account Read the quickstart No card needed to create an account.