Command-Line Tool (CLI)
Install the ZeusLock CLI from npm, log in with a personal access token from the dashboard, and manage incidents, agents, users and scans from your terminal.
What the CLI is
The ZeusLock CLI (zeuslock) brings the dashboard to your terminal: incidents, statistics, agents, users, API keys, Shadow AI and MCP monitoring, SIEM export, DLP scanning and anonymization — all scriptable. It talks to the same backend as the dashboard, so what you see there is what you get here.
Install
The CLI is published on npm as @zeuslock/cli and requires Node.js 22.12 or newer. Install it globally, then check the version:
npm install -g @zeuslock/cli
zeuslock --versionLog in with a CLI access token
The CLI authenticates with a personal access token (zlu_…) that acts as you, with your role. Password and captcha stay in the browser — the terminal never asks for them.
- In the dashboard, open the CLI page from the sidebar.
- Click Generate token, give it a name (for example
work-laptop), and copy thezlu_…value. - In your terminal, set the token and verify who you are:
macOS / Linux
export ZEUSLOCK_API_TOKEN="zlu_...your-token..."
zeuslock whoamiWindows (PowerShell)
$env:ZEUSLOCK_API_TOKEN = "zlu_...your-token..."
zeuslock whoamiTokens expire after 90 days by default and can be revoked from the same page at any time. From CLI v0.2.0, zeuslock auth login --token zlu_… stores the token for you; the environment variable works with every version.
Useful commands
A few commands to try first:
zeuslock status
zeuslock incidents list --days 7
zeuslock incidents stats
zeuslock agents list --status online
zeuslock users list
zeuslock shadow-ai stats --days 30Every command supports --help, and most support --json for scripting.
Scanning and SIEM use an organization API key
Content commands — scan, anonymize, Git pre-commit hooks — and SIEM export authenticate with an organization API key (zl_…) instead of your personal token, because they act for the organization rather than for one person:
zeuslock auth api-key set zl_your_org_api_key
zeuslock scan ./document.txt
zeuslock anonymize ./dataset.txt --output dataset.safe.txt
zeuslock hook installOrganization keys are created on the dashboard API Keys page — see Manage API keys.
Troubleshooting
- zeuslock: command not found — Node.js 22.12+ and npm must be installed, and npm's global bin directory must be on your PATH. Re-run
npm install -g @zeuslock/cliand open a new terminal. - 401 Unauthorized — The token was revoked, expired, or pasted incompletely. Generate a new token on the dashboard CLI page and set it again.
- scan says an API key is required — Content commands need the organization key: run
zeuslock auth api-key set zl_…with a key from the API Keys page.
Full command reference
This guide covers installation and login only. For every command — incidents, agents, users, keys, Shadow AI, MCP, SIEM export, deployment artifacts, and policy-as-code — with all options, values, and defaults, see the CLI Command Reference.