Every ZeusLock CLI command in one place: options, values, defaults, credentials, exit codes — scan, incidents, agents, users, keys, Shadow AI, MCP, SIEM, deploy, and rules.
Complete reference for every command in @zeuslock/cli (v0.1.x). For installation and first login, start with the CLI quick-start guide. Every data-returning command supports --json for scripting, and --help works on every command and subcommand.
Command index
| Command | Purpose |
|---|
auth login | Sign in with email/password (MFA supported) and store tokens |
whoami | Show the current authenticated user |
auth api-key set/status/clear | Save, check, or remove the organization API key |
status | CLI context, backend health/readiness, optional license check |
scan | Analyze a file, directory, or stdin with the org DLP policy |
anonymize | Anonymize a UTF-8 text file |
hook install / run | Git pre-commit hook that scans staged files |
incidents list / stats / export | Incidents, statistics, and CSV/JSON export |
agents list / revoke | Desktop agent fleet visibility and revocation |
extensions status | Active browser extensions |
users list / remove | Organization user governance |
keys list / create / revoke | Organization API key management |
shadow-ai stats / tools / users | Shadow AI discovery data |
mcp stats / events / servers | MCP monitoring data |
siem pull / tail | OCSF SIEM event retrieval (one page or continuous polling) |
deploy gpo-config / agent-verify | Fleet deployment artifacts and enrollment verification |
rules get / diff | DLP policy-as-code export and diff (read-only) |
Credentials and configuration
The CLI uses two different credentials, on purpose. User credentials (a login session or a personal CLI access token from the dashboard CLI page) drive the dashboard-data commands. The organization API key (zl_…, from the dashboard API Keys page) drives the content and SIEM commands, which act for the organization rather than one person.
| Credential | Used by |
|---|
| User session / CLI access token | whoami, incidents, agents, extensions, users, keys, shadow-ai, mcp, rules, deploy |
Organization API key (zl_…) | scan, anonymize, hook run, siem pull/tail, status (license) |
Environment variables
| Variable | Description |
|---|
ZEUSLOCK_API_URL | Backend base URL; default https://api.zeuslock.ai |
ZEUSLOCK_API_TOKEN | Bearer token for user-authenticated commands (e.g. a CLI access token) |
ZEUSLOCK_API_KEY | Organization API key for machine-authenticated commands |
ZEUSLOCK_EMAIL / ZEUSLOCK_PASSWORD / ZEUSLOCK_MFA_CODE | Non-interactive auth login inputs (CI, automation) |
ZEUSLOCK_CONFIG_DIR | Overrides the per-user config directory |
The config directory (macOS ~/Library/Application Support/zeuslock/, Windows %APPDATA%\ZeusLock\, Linux ~/.config/zeuslock/) holds auth.json (session tokens, 0600), api-key.json (saved org key), and siem-cursors.json (tail cursors). Passwords are never stored, and the CLI never prints stored secrets.
zeuslock auth
zeuslock auth login --email admin@example.com
zeuslock whoami
zeuslock auth api-key set zl_your_org_api_key
zeuslock auth api-key status
auth login
| Option | Values | Default | Description |
|---|
--email / -u, --username | Account email | ZEUSLOCK_EMAIL | Prompted when missing |
--password | — | ZEUSLOCK_PASSWORD | Prompted interactively when omitted; never stored |
--mfa-code | — | ZEUSLOCK_MFA_CODE | Used when the backend requires MFA; prompted otherwise |
--recaptcha-token | — | none | For backends that enforce reCAPTCHA on login |
--api-url | URL | ZEUSLOCK_API_URL | Backend to authenticate against |
--json | Boolean | off | Machine-readable JSON output |
auth api-key set / status / clear
set validates the key against GET /api/rules/sync before saving; status shows the configured state with a masked key; clear removes it. The full key is never printed after saving.
Key precedence for machine-authenticated commands: --api-key flag → ZEUSLOCK_API_KEY → saved key.
zeuslock status
zeuslock status
zeuslock status --api-key zl_your_key_here --require-license
zeuslock status --json
| Option | Values | Default | Description |
|---|
--api-key | Organization API key | Falls back to ZEUSLOCK_API_KEY, then the saved key | Enables license validation via /api/v1/validate-license |
--require-license | Boolean | off | Exit nonzero unless health, readiness, and license all pass |
--json | Boolean | off | Machine-readable JSON output |
zeuslock scan
zeuslock scan ./secrets.txt
zeuslock scan ./src --fail-on alert
cat prompt.txt | zeuslock scan --stdin --json
Uploads content to POST /api/v1/dlp/analyze under the organization's active DLP policy. Directories are walked recursively (.git skipped) and uploaded in batches of 5 files. A scan that results in alert/block creates a real incident — there is no dry-run.
| Option | Values | Default | Description |
|---|
[path] / --stdin | File, directory, or stdin | required | Mutually exclusive; stdin is sent as text |
--api-key | Organization API key | Falls back to ZEUSLOCK_API_KEY, then the saved key | Sent as X-API-Key |
--fail-on | alert, block, never | block | Exit-code threshold: alert fails on alert+block; never never fails |
--source / --platform / --hostname / --path / --user-email | Any text | cli, cli, local hostname, /cli/<name>, none | Metadata labels attached to the incident |
--include-sensitive | Boolean | off | Includes backend anonymization maps in JSON output |
--json | Boolean | off | Machine-readable JSON output |
zeuslock anonymize
zeuslock anonymize customer-data.txt --output customer-data.safe.txt
Sends UTF-8 text to POST /api/v1/anonymize and returns the masked text. Text only — PDF/image/Office files are not supported by the backend endpoint.
| Option | Values | Default | Description |
|---|
<file> | UTF-8 text file | required | Sent as {"text": …} |
--api-key | Organization API key | Falls back to ZEUSLOCK_API_KEY, then the saved key | Sent as X-API-Key |
--output | Writable path | stdout | Writes the anonymized text to a file |
--include-sensitive-map | Boolean | off | Includes original→masked substitutions in JSON output |
--json | Boolean | off | Machine-readable JSON output |
zeuslock hook install / run
zeuslock hook install --fail-on alert
zeuslock hook run --json
install writes .git/hooks/pre-commit (0755, --force to replace an existing hook); run scans staged blobs exactly as they will be committed (added/copied/modified/renamed files only) via the same DLP analyze endpoint and blocks the commit at the chosen threshold. Hook incidents carry source=git_pre_commit, platform=git, method=PRE_COMMIT. install --fail-on never is rejected — a hook that never blocks is not enforcement.
| Option | Values | Default | Description |
|---|
--repo | Git repository path | current directory | Resolved via git rev-parse |
install --fail-on | alert, block | alert | Written into the generated hook |
run --fail-on | alert, block, never | alert | Commit-blocking threshold for a manual run |
install --force | Boolean | off | Replace an existing pre-commit hook |
run --api-key / run --user-email | — | Falls back to ZEUSLOCK_API_KEY, then the saved key | Auth and incident attribution |
--json | Boolean | off | Machine-readable JSON output |
zeuslock incidents list / stats / export
zeuslock incidents list --days 7 --severity critical
zeuslock incidents stats --days 30
zeuslock incidents export --days 30 --format csv --output incidents.csv
| Option | Values | Default | Description |
|---|
list/export --days | 7, 30, 90 | 30 | 90 and export itself require Business/Enterprise |
stats --days | 1, 7, 30, 365 | 30 | Requires the Business or Enterprise plan |
--severity | critical, warning | none | warning includes high, medium, and low |
--search | Any text | none | Searches user email, URL, and finding type |
--jailbreak | Boolean | off | Only incidents with a jailbreak_attempt finding |
export --format / --output | csv, json | csv / incidents-<timestamp> | Arbitrary day values and --from/--to are not supported (dashboard parity) |
--json | Boolean | off | Machine-readable JSON output |
zeuslock agents / extensions
zeuslock agents list --status offline --search linux
zeuslock agents revoke AGENT-123 --yes
zeuslock extensions status --json
| Option | Values | Default | Description |
|---|
agents list --status | all, online, offline | all | Mirrors the dashboard status dropdown |
agents list --search | Any text | none | Searches hostname and platform; rows carry update_available when a newer agent is published |
agents revoke <agent_id> | Exact id from agents list | required | Skips the confirmation prompt (needed for scripts) |
extensions status | — | — | Active browser extensions with counts (30-minute activity window) |
--json / --yes | Boolean | off | Machine-readable JSON output |
zeuslock users / keys
zeuslock users list --role admin
zeuslock users remove departing@example.com --yes
zeuslock keys list --status active
zeuslock keys create --name rotation-2026-08
zeuslock keys revoke <key_id> --yes
| Option | Values | Default | Description |
|---|
users list --search / --role | Any text | none | Role values come from GET /api/users/roles (plan-dependent) |
users remove <user> | User id, user_id, or email | required | Refuses self-removal and removing the last active admin |
keys list --status | all, active, revoked | all | Full keys hidden unless --show-secret |
keys create --name | Any text | required | Prints the returned full key once |
keys revoke <key_id> | Key id from keys list | required | Refuses already-revoked keys (a second DELETE would permanently delete) |
--yes / --json | Boolean | off | Skips the confirmation prompt (needed for scripts) |
zeuslock shadow-ai / mcp
zeuslock shadow-ai stats --days 30
zeuslock shadow-ai tools --source endpoint --status shadow
zeuslock shadow-ai users --days 7
zeuslock mcp stats
zeuslock mcp events --transport stdio --decision block --method tools/call
zeuslock mcp servers
Both groups follow the dashboard feature gates from GET /api/org: Shadow AI requires settings.shadow_ai_enabled; MCP is on unless settings.mcp_enabled is explicitly false. MCP events are sanitized metadata only — raw prompts are never exposed.
| Option | Values | Default | Description |
|---|
--days | 7, 30, 90 | 30 | Dashboard windows (mcp servers is fixed at 90) |
shadow-ai --source | all, endpoint, browser, both | all | Where the tool was detected |
shadow-ai --status / --category | sanctioned/shadow; chatbot, coding_assistant, image_gen, agent, other | all | Dashboard filter values |
mcp events --transport / --direction / --decision | http/sse/stdio; client_to_server/server_to_client; allow/alert/block | all | Server-side filters; page size 50 (dashboard parity) |
mcp events --method / --search / --cursor | e.g. tools/call; any text; opaque cursor | none | --cursor continues from a previous --json page's next_cursor |
--json | Boolean | off | Machine-readable JSON output |
zeuslock siem pull / tail
zeuslock siem pull --api-key zl_your_key_here --severity high --limit 100
zeuslock siem tail --category dlp --interval 10 --cursor-name splunk-prod
Retrieves OCSF events from GET /api/v1/siem/events (org API key auth). pull fetches one page; tail polls continuously and persists its cursor in siem-cursors.json, scoped by API URL, cursor name, category, and severity — so separate consumers can tail independently. Output is JSONL by default, pipe-friendly for SIEM ingestion.
| Option | Values | Default | Description |
|---|
--api-key | Organization API key | Falls back to ZEUSLOCK_API_KEY, then the saved key | Sent as X-API-Key |
--since | Backend next_cursor | saved cursor (tail) | A cursor, not a date |
pull --from / --to / --days | ISO date/time, epoch, or day count | none | --days converts to start_time; exclusive with --from |
--category / --severity | category string; unknown–critical | none | Severity is a minimum; current DLP events use category dlp |
--limit | 1–500 | 100 | Page size per request/poll |
pull --format | jsonl, json | jsonl | JSON wraps the page in an envelope |
tail --interval / --cursor-name / --reset-cursor | seconds; any stable name; Boolean | 5 / default / off | --reset-cursor ignores the saved cursor for this run |
zeuslock deploy gpo-config / agent-verify
zeuslock deploy gpo-config --api-key zl_your_key_here --output zeuslock-deploy
zeuslock deploy gpo-config --artifact agent --create-key-name fleet-deploy
zeuslock deploy agent-verify --hostname CLIENT01 --status online
gpo-config generates local deployment files: Chrome/Edge extension force-install policies and ExtensionSettings JSON, the Windows agent policy .reg (ServerUrl/LicenseKey under HKLM\SOFTWARE\Policies\ZeusLock), an agent-config.json, and a non-secret deployment-summary.json. Extension artifacts require the Business/Enterprise plan. Key source precedence: --api-key → --create-key-name → --key-id → the single active decryptable key. agent-verify checks enrollment/heartbeat against GET /api/agents and exits nonzero when not verified — useful after a GPO rollout.
| Option | Values | Default | Description |
|---|
gpo-config --artifact | all, extension, agent | all | Which artifact groups to generate |
gpo-config --browser | all, chrome, edge | all | Extension artifacts only |
gpo-config --output | Directory | zeuslock-deploy | Same-named files are overwritten |
gpo-config --api-key / --key-id / --create-key-name | — | none | Key to embed in generated files (never in the summary) |
agent-verify --agent-id / --hostname / --platform | exact id; case-insensitive hostname; windows/macos/linux | none | Identity filters over fleet rows |
agent-verify --status | online, offline, any | online | Expected heartbeat state; results: verified, offline, online, not_found |
--json | Boolean | off | Machine-readable JSON output |
zeuslock rules get / diff
zeuslock rules get --output zeuslock.rules.yaml
zeuslock rules get --scope policy --policy-id default --format json
zeuslock rules diff zeuslock.rules.yaml
Read-only policy-as-code: get exports live policy state as deterministic YAML/JSON (schema_version: zeuslock.rules.v1, volatile fields stripped so exports diff cleanly); diff compares a local file against live state and exits 1 when differences are found — ready for CI drift checks. There is no import/apply: policies are changed in the dashboard.
| Option | Values | Default | Description |
|---|
--scope | policies, default, policy | policies | policies = policy system + groups; default = org-wide Default Policy ruleset; policy = one policy |
--policy-id | Backend policy id | required for policy scope | |
get --format / --output | yaml, json | yaml / stdout | |
diff [file] | YAML or JSON export | zeuslock.rules.yaml|yml|json | diff --format json for automation |
Exit codes
| Command | Nonzero when |
|---|
scan / hook run | The backend decision meets the --fail-on threshold |
rules diff | Differences are found |
deploy agent-verify | Verification is not verified |
status --require-license | Health, readiness, or license validation fails |
| All commands | Authentication or request errors |