CLI Command Reference

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

CommandPurpose
auth loginSign in with email/password (MFA supported) and store tokens
whoamiShow the current authenticated user
auth api-key set/status/clearSave, check, or remove the organization API key
statusCLI context, backend health/readiness, optional license check
scanAnalyze a file, directory, or stdin with the org DLP policy
anonymizeAnonymize a UTF-8 text file
hook install / runGit pre-commit hook that scans staged files
incidents list / stats / exportIncidents, statistics, and CSV/JSON export
agents list / revokeDesktop agent fleet visibility and revocation
extensions statusActive browser extensions
users list / removeOrganization user governance
keys list / create / revokeOrganization API key management
shadow-ai stats / tools / usersShadow AI discovery data
mcp stats / events / serversMCP monitoring data
siem pull / tailOCSF SIEM event retrieval (one page or continuous polling)
deploy gpo-config / agent-verifyFleet deployment artifacts and enrollment verification
rules get / diffDLP 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.

CredentialUsed by
User session / CLI access tokenwhoami, 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

VariableDescription
ZEUSLOCK_API_URLBackend base URL; default https://api.zeuslock.ai
ZEUSLOCK_API_TOKENBearer token for user-authenticated commands (e.g. a CLI access token)
ZEUSLOCK_API_KEYOrganization API key for machine-authenticated commands
ZEUSLOCK_EMAIL / ZEUSLOCK_PASSWORD / ZEUSLOCK_MFA_CODENon-interactive auth login inputs (CI, automation)
ZEUSLOCK_CONFIG_DIROverrides 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

OptionValuesDefaultDescription
--email / -u, --usernameAccount emailZEUSLOCK_EMAILPrompted when missing
--passwordZEUSLOCK_PASSWORDPrompted interactively when omitted; never stored
--mfa-codeZEUSLOCK_MFA_CODEUsed when the backend requires MFA; prompted otherwise
--recaptcha-tokennoneFor backends that enforce reCAPTCHA on login
--api-urlURLZEUSLOCK_API_URLBackend to authenticate against
--jsonBooleanoffMachine-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
OptionValuesDefaultDescription
--api-keyOrganization API keyFalls back to ZEUSLOCK_API_KEY, then the saved keyEnables license validation via /api/v1/validate-license
--require-licenseBooleanoffExit nonzero unless health, readiness, and license all pass
--jsonBooleanoffMachine-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.

OptionValuesDefaultDescription
[path] / --stdinFile, directory, or stdinrequiredMutually exclusive; stdin is sent as text
--api-keyOrganization API keyFalls back to ZEUSLOCK_API_KEY, then the saved keySent as X-API-Key
--fail-onalert, block, neverblockExit-code threshold: alert fails on alert+block; never never fails
--source / --platform / --hostname / --path / --user-emailAny textcli, cli, local hostname, /cli/<name>, noneMetadata labels attached to the incident
--include-sensitiveBooleanoffIncludes backend anonymization maps in JSON output
--jsonBooleanoffMachine-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.

OptionValuesDefaultDescription
<file>UTF-8 text filerequiredSent as {"text": …}
--api-keyOrganization API keyFalls back to ZEUSLOCK_API_KEY, then the saved keySent as X-API-Key
--outputWritable pathstdoutWrites the anonymized text to a file
--include-sensitive-mapBooleanoffIncludes original→masked substitutions in JSON output
--jsonBooleanoffMachine-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.

OptionValuesDefaultDescription
--repoGit repository pathcurrent directoryResolved via git rev-parse
install --fail-onalert, blockalertWritten into the generated hook
run --fail-onalert, block, neveralertCommit-blocking threshold for a manual run
install --forceBooleanoffReplace an existing pre-commit hook
run --api-key / run --user-emailFalls back to ZEUSLOCK_API_KEY, then the saved keyAuth and incident attribution
--jsonBooleanoffMachine-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
OptionValuesDefaultDescription
list/export --days7, 30, 903090 and export itself require Business/Enterprise
stats --days1, 7, 30, 36530Requires the Business or Enterprise plan
--severitycritical, warningnonewarning includes high, medium, and low
--searchAny textnoneSearches user email, URL, and finding type
--jailbreakBooleanoffOnly incidents with a jailbreak_attempt finding
export --format / --outputcsv, jsoncsv / incidents-<timestamp>Arbitrary day values and --from/--to are not supported (dashboard parity)
--jsonBooleanoffMachine-readable JSON output

zeuslock agents / extensions

zeuslock agents list --status offline --search linux
zeuslock agents revoke AGENT-123 --yes
zeuslock extensions status --json
OptionValuesDefaultDescription
agents list --statusall, online, offlineallMirrors the dashboard status dropdown
agents list --searchAny textnoneSearches hostname and platform; rows carry update_available when a newer agent is published
agents revoke <agent_id>Exact id from agents listrequiredSkips the confirmation prompt (needed for scripts)
extensions statusActive browser extensions with counts (30-minute activity window)
--json / --yesBooleanoffMachine-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
OptionValuesDefaultDescription
users list --search / --roleAny textnoneRole values come from GET /api/users/roles (plan-dependent)
users remove <user>User id, user_id, or emailrequiredRefuses self-removal and removing the last active admin
keys list --statusall, active, revokedallFull keys hidden unless --show-secret
keys create --nameAny textrequiredPrints the returned full key once
keys revoke <key_id>Key id from keys listrequiredRefuses already-revoked keys (a second DELETE would permanently delete)
--yes / --jsonBooleanoffSkips 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.

OptionValuesDefaultDescription
--days7, 30, 9030Dashboard windows (mcp servers is fixed at 90)
shadow-ai --sourceall, endpoint, browser, bothallWhere the tool was detected
shadow-ai --status / --categorysanctioned/shadow; chatbot, coding_assistant, image_gen, agent, otherallDashboard filter values
mcp events --transport / --direction / --decisionhttp/sse/stdio; client_to_server/server_to_client; allow/alert/blockallServer-side filters; page size 50 (dashboard parity)
mcp events --method / --search / --cursore.g. tools/call; any text; opaque cursornone--cursor continues from a previous --json page's next_cursor
--jsonBooleanoffMachine-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.

OptionValuesDefaultDescription
--api-keyOrganization API keyFalls back to ZEUSLOCK_API_KEY, then the saved keySent as X-API-Key
--sinceBackend next_cursorsaved cursor (tail)A cursor, not a date
pull --from / --to / --daysISO date/time, epoch, or day countnone--days converts to start_time; exclusive with --from
--category / --severitycategory string; unknowncriticalnoneSeverity is a minimum; current DLP events use category dlp
--limit1500100Page size per request/poll
pull --formatjsonl, jsonjsonlJSON wraps the page in an envelope
tail --interval / --cursor-name / --reset-cursorseconds; any stable name; Boolean5 / 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.

OptionValuesDefaultDescription
gpo-config --artifactall, extension, agentallWhich artifact groups to generate
gpo-config --browserall, chrome, edgeallExtension artifacts only
gpo-config --outputDirectoryzeuslock-deploySame-named files are overwritten
gpo-config --api-key / --key-id / --create-key-namenoneKey to embed in generated files (never in the summary)
agent-verify --agent-id / --hostname / --platformexact id; case-insensitive hostname; windows/macos/linuxnoneIdentity filters over fleet rows
agent-verify --statusonline, offline, anyonlineExpected heartbeat state; results: verified, offline, online, not_found
--jsonBooleanoffMachine-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.

OptionValuesDefaultDescription
--scopepolicies, default, policypoliciespolicies = policy system + groups; default = org-wide Default Policy ruleset; policy = one policy
--policy-idBackend policy idrequired for policy scope
get --format / --outputyaml, jsonyaml / stdout
diff [file]YAML or JSON exportzeuslock.rules.yaml|yml|jsondiff --format json for automation

Exit codes

CommandNonzero when
scan / hook runThe backend decision meets the --fail-on threshold
rules diffDifferences are found
deploy agent-verifyVerification is not verified
status --require-licenseHealth, readiness, or license validation fails
All commandsAuthentication or request errors