ZeusLock CLI command reference
Every ZeusLock CLI command in one page: what each one does, what it changes, every option and default, worked examples and exit codes.
Every ZeusLock CLI command, with what it does, what it changes, and what it returns. The CLI covers the same ground as the dashboard — incidents, agents, policies, users, keys, Shadow AI, MCP and SIEM — plus two things the dashboard cannot do: scan content from a terminal, and block a Git commit before secrets leave a laptop.
Install
Requires Node.js 22.12 or newer. The package is published as zeuslock-dlp-cli and installs a single executable named zeuslock.
npm install -g zeuslock-dlp-cli@latest
zeuslock --version
zeuslock --helpTo run it once without installing: npm exec --package zeuslock-dlp-cli@latest -- zeuslock status.
Two credentials, on purpose
The CLI uses two different credentials, and picking the wrong one is the most common reason a command fails.
| Credential | Prefix | Acts as | Used by |
|---|---|---|---|
| Personal CLI access token | zlu_ | You, with your role | Dashboard-data commands: incidents, agents, users, keys, tokens, policies, Shadow AI, MCP, extensions, deploy |
| Organization API key | zl_ | The organization | Content and machine commands: scan, anonymize, hook run, siem pull/tail, license check in status |
A personal token is never accepted for content commands, and an organization key is never accepted for dashboard-data commands. That separation is deliberate: content commands run unattended in CI, where a credential tied to one person would break the moment that person leaves.
Getting a personal CLI access token
The CLI does not sign in with an email and password. The backend requires a reCAPTCHA challenge on login, which a terminal cannot complete. Generate a token from the CLI page in the dashboard, or from a machine that is already authenticated with zeuslock tokens create.
zeuslock auth login --token zlu_your_cli_access_token
zeuslock whoamiSaving the organization API key
zeuslock auth api-key set zl_your_org_api_key
zeuslock auth api-key statusGlobal options
| Option | Values | Default | What it does |
|---|---|---|---|
--token <zlu_…> | zlu_… | none | Use this personal token for one invocation. Must appear before the subcommand: zeuslock --token zlu_… whoami. |
-V, --version | — | — | Print the installed CLI version. |
-h, --help | — | — | Works on every command and subcommand. |
Environment variables
| Variable | What it does |
|---|---|
ZEUSLOCK_API_URL | Backend base URL. Default https://api.zeuslock.ai. Set it to https://api-staging.zeuslock.ai to work against staging. |
ZEUSLOCK_API_TOKEN | Personal CLI access token for user commands. Ideal for CI. |
ZEUSLOCK_API_KEY | Organization API key for content and machine commands. |
ZEUSLOCK_CONFIG_DIR | Overrides where the CLI stores its files. |
Credential precedence
When more than one is present, the CLI uses the first that applies.
| # | User commands | Content commands |
|---|---|---|
| 1 | --token zlu_… | --api-key zl_… |
| 2 | ZEUSLOCK_API_TOKEN | ZEUSLOCK_API_KEY |
| 3 | Saved token from auth login --token | Saved key from auth api-key set |
Exit codes
Every command returns 0 on success and 1 on failure, so any command can gate a CI step. Four commands return a meaningful non-zero code that reflects a finding rather than an error — they are the ones worth wiring into a pipeline.
| Command | Non-zero means |
|---|---|
scan | Sensitive content met the --fail-on threshold. |
hook run | The commit should be blocked. |
rules diff | Local policy file differs from live policy. |
deploy agent-verify | No agent matched, or it is not in the expected state. |
status --require-license | Backend health, readiness or license validation failed. |
Output
Commands print aligned tables by default. Add --json for machine-readable output — every data-returning command supports it, and the shape is stable enough to parse. siem pull defaults to JSONL (one event per line) because that is what SIEM collectors ingest. The CLI never prints a stored token or API key unless you explicitly pass --show-secret.
Where the CLI stores things
| File | Contents |
|---|---|
auth.json | Your CLI access token, mode 0600. |
api-key.json | The saved organization API key, mode 0600. |
siem-cursors.json | Resume positions for siem tail, one per cursor name. |
Location: macOS ~/Library/Application Support/zeuslock/, Windows %APPDATA%\ZeusLock\, Linux ~/.config/zeuslock/. The directory is created mode 0700 where the filesystem supports it.
zeuslock auth — Sign in and store credentials
Stores your personal token and your organization API key on this machine, and shows who you are.
zeuslock auth login --token
Validate a personal CLI access token and save it for future commands.
Credential: None · Impact: Writes local files
The token is checked against the backend before it is written, so a typo fails immediately rather than at the next command. It is saved to auth.json with mode 0600. There is no email and password login — see above.
| Option | Values | Default | What it does |
|---|---|---|---|
--token <zlu_…> | zlu_[object Object] | none | The token from the dashboard CLI page. Format is validated locally first. |
--api-url <url> | URL | ZEUSLOCK_API_URL | Backend to validate against and store with the token. |
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock auth login --token zlu_your_cli_access_token
zeuslock auth login --token zlu_… --api-url https://api-staging.zeuslock.aiA revoked or expired token returns 401. Tokens never refresh — generate a new one and run this again.
zeuslock auth logout
Remove the saved personal token from this machine.
Credential: None · Impact: Writes local files
Deletes auth.json only. Your saved organization API key is left in place, so scan, anonymize and SIEM commands keep working. It does not revoke the token server-side — use tokens revoke for that.
| Option | Values | Default | What it does |
|---|---|---|---|
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock auth logoutzeuslock auth api-key set [key]
Validate an organization API key and save it for content and SIEM commands.
Credential: Organization API key · Impact: Writes local files
The key is verified against the backend before it is saved, so an invalid key is rejected up front. Written to api-key.json with mode 0600; the full value is never printed back.
| Argument | Required | What it is |
|---|---|---|
key | No | The zl_… key. If omitted, the CLI reads ZEUSLOCK_API_KEY or prompts. |
| Option | Values | Default | What it does |
|---|---|---|---|
--api-url <url> | URL | ZEUSLOCK_API_URL | Backend the key belongs to; stored alongside it. |
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock auth api-key set zl_your_org_api_key
zeuslock auth api-key set # prompts, so the key stays out of shell historyzeuslock auth api-key status
Show whether an organization API key is configured, and which one.
Credential: None · Impact: Reads only
Prints the source, the backend URL and a masked key. The full value is never shown.
| Option | Values | Default | What it does |
|---|---|---|---|
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock auth api-key statuszeuslock auth api-key clear
Remove the saved organization API key from this machine.
Credential: None · Impact: Writes local files
Deletes api-key.json. The key stays valid in the dashboard — this only forgets it locally. Content commands will then need --api-key or ZEUSLOCK_API_KEY.
| Option | Values | Default | What it does |
|---|---|---|---|
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock auth api-key clearzeuslock auth whoami
Identical to zeuslock whoami, for people who expect it under auth.
Credential: Personal CLI access token · Impact: Reads only
| Option | Values | Default | What it does |
|---|---|---|---|
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock auth whoamizeuslock whoami / status — Who am I, and is anything wrong
zeuslock whoami
Show the account the CLI is currently acting as.
Credential: Personal CLI access token · Impact: Reads only
Returns email, user id, role, organization id, status and the backend URL. The first command to run when a permission error is unexplained — it tells you which account and which environment you are really on.
| Option | Values | Default | What it does |
|---|---|---|---|
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock whoami
zeuslock whoami --json
zeuslock --token zlu_… whoami # check a token without saving itzeuslock status
Show local configuration, backend health and readiness, and licence validity.
Credential: Organization API key (for the license check) · Impact: Reads only
One command that answers "is it me, or is it the service?". Health and readiness are checked without credentials; the licence check runs only when an organization API key is available. Use --require-license in CI to make a degraded backend fail the job.
| Option | Values | Default | What it does |
|---|---|---|---|
--api-key <key> | zl_… | ZEUSLOCK_API_KEY | Key used for the licence check. |
--require-license | Boolean | off | Exit non-zero unless health, readiness and licence all pass. |
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock status
zeuslock status --json
zeuslock status --require-license # CI gatezeuslock scan — Check content before it reaches an AI tool
zeuslock scan [path]
Run a file, a directory or piped text through your organization's DLP policy.
Credential: Organization API key · Impact: Reads only
Returns the same decision the desktop agent and browser extension would return — allow, alert or block — and records an incident when something is found, so terminal activity appears in the dashboard alongside browser activity. Directories are walked locally, .git is skipped, and files are uploaded in batches of five. The exit code follows --fail-on, which is what makes this usable as a CI gate.
| Argument | Required | What it is |
|---|---|---|
path | No | File or directory to scan. Required unless --stdin is used; the two cannot be combined. |
| Option | Values | Default | What it does |
|---|---|---|---|
--stdin | Boolean | off | Read text from standard input instead of a path. |
--api-key <key> | zl_… | [object Object]ZEUSLOCK_API_KEY | Organization API key to authenticate this call. |
--fail-on <decision> | alert | block | never | block | Which decision makes the command exit non-zero. alert is strict (fails on alerts and blocks), never always exits 0 for reporting runs. |
--source <source> | Any text | cli | Source label recorded on the incident. |
--platform <platform> | Any text | cli | Platform label sent with the request. Note that the incident's platform column is derived from the URL, so this value is not stored on the incident. |
--hostname <hostname> | Any text | local hostname | Hostname recorded on the incident. |
--path <path> | Any text | /cli/<file> | Destination label recorded on the incident; normalised to start with a slash. |
--user-email <email> | Any text | none | Attributes the incident to a person instead of leaving it anonymous. Worth setting in CI. |
--include-sensitive | Boolean | off | Include the backend's anonymization map in JSON output. It contains the original values, so treat that output as sensitive. |
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock scan ./secrets.txt
zeuslock scan ./src --fail-on alert
cat prompt.txt | zeuslock scan --stdin --json
zeuslock scan ./build --fail-on never --user-email ci@example.comEvery scan that finds something creates a dashboard incident. Scanning a large tree repeatedly in CI will fill the incident timeline — scope the path, or use a narrower directory.
zeuslock anonymize — Strip sensitive values out of text
zeuslock anonymize <file>
Replace sensitive values in a UTF-8 text file with realistic substitutes.
Credential: Organization API key · Impact: Reads only
Unlike scan, this rewrites the content rather than judging it, and records no incident. Substitutes are plausible values of the same shape — a card number becomes a different valid-looking card number — so the text stays usable as a prompt or a test fixture. Use it to share a real document with an external LLM without leaking the real values.
| Argument | Required | What it is |
|---|---|---|
file | Yes | UTF-8 text file to anonymize. |
| Option | Values | Default | What it does |
|---|---|---|---|
--api-key <key> | zl_… | [object Object]ZEUSLOCK_API_KEY | Organization API key to authenticate this call. |
--output <path> | Writable path | stdout | Write the anonymized text to a file instead of printing it. |
--include-sensitive-map | Boolean | off | Include the original-to-masked pairs in JSON output. This reveals the real values — handle accordingly. |
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock anonymize customer-data.txt
zeuslock anonymize customer-data.txt --output customer-data.safe.txt
zeuslock anonymize customer-data.txt --jsonzeuslock hook — Block secrets at the commit, not at review
Installs a Git pre-commit hook that scans staged content and refuses the commit when the DLP policy says so.
zeuslock hook install
Write the ZeusLock pre-commit hook into a repository.
Credential: None · Impact: Writes local files
Creates .git/hooks/pre-commit with mode 0755, calling zeuslock hook run. It refuses to overwrite an existing hook unless --force is given, so it will not silently destroy another tool's hook. The hook is local to the clone — it is not shared through Git, so each developer runs this once.
| Option | Values | Default | What it does |
|---|---|---|---|
--repo <path> | Path | current repository | Repository to install into. |
--fail-on <decision> | alert | block | alert | Threshold written into the hook. The default is strict: alerts stop the commit too. |
--force | Boolean | off | Replace an existing pre-commit hook. |
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock hook install
zeuslock hook install --fail-on block --forcezeuslock hook run
Scan the staged changes and decide whether the commit may proceed.
Credential: Organization API key · Impact: Reads only
Reads the staged blobs, not the working tree, so what is scanned is exactly what would be committed — editing a file after staging it cannot sneak content past the check. Only added, copied, modified and renamed files are scanned; untracked, unstaged and deleted files are ignored, as is the repository's history. Exits non-zero to stop the commit.
| Option | Values | Default | What it does |
|---|---|---|---|
--repo <path> | Path | current repository | Repository to scan. |
--api-key <key> | zl_… | [object Object]ZEUSLOCK_API_KEY | Organization API key to authenticate this call. |
--fail-on <decision> | alert | block | never | alert | Threshold that stops the commit. |
--user-email <email> | Any text | none | Attributes any incident to a person. |
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock hook run
zeuslock hook run --fail-on block --json
git commit -m 'feature' # the hook runs automaticallyThe hook needs an organization API key at commit time. Save one with `auth api-key set` so it works from a Git GUI, where environment variables are usually absent.
zeuslock incidents — What was detected, and how often
The same data as the dashboard Incidents page. Filters are applied locally after fetching a day window, which is why the day values are fixed.
zeuslock incidents list
List recent incidents with dashboard-equivalent filters.
Credential: Personal CLI access token · Impact: Reads only
Clean prompts are hidden, exactly as the dashboard hides them: a row is kept only if it has findings, was blocked, or has an action other than allowed. --days 90 requires a Business or Enterprise plan.
| Option | Values | Default | What it does |
|---|---|---|---|
--days <days> | 7 | 30 | 90 | 30 | History window. Other values are rejected before the request. |
--severity <level> | critical | warning | none | Severity follows the policy outcome, not the detector score: critical means the request was blocked, warning means everything else. This matches what the dashboard shows. |
--search <text> | Any text | none | Filter on user email, URL or finding type. |
--jailbreak | Boolean | off | Keep only incidents carrying a jailbreak-attempt finding. |
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock incidents list --days 7
zeuslock incidents list --severity critical
zeuslock incidents list --jailbreak --jsonzeuslock incidents stats
Show aggregate incident statistics.
Credential: Personal CLI access token · Impact: Reads only
Severity breakdown, detected data types, a daily timeline and AI-platform usage — the numbers behind the dashboard overview, in one screen.
| Option | Values | Default | What it does |
|---|---|---|---|
--days <days> | 1 | 7 | 30 | 365 | 30 | Stats window. 365 requires a Business or Enterprise plan. |
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock incidents stats
zeuslock incidents stats --days 365 --jsonzeuslock incidents export
Write filtered incidents to a CSV or JSON file.
Credential: Personal CLI access token · Impact: Writes local files
Produces the evidence file an auditor asks for. The CSV carries both severity (the policy outcome the dashboard displays) and risk_level (the raw detector score) — they legitimately differ, and keeping both means nothing is lost. Export requires a Business or Enterprise plan.
| Option | Values | Default | What it does |
|---|---|---|---|
--days <days> | 7 | 30 | 90 | 30 | History window. |
--severity <level> | critical | warning | none | Severity follows the policy outcome, not the detector score: critical means the request was blocked, warning means everything else. This matches what the dashboard shows. |
--search <text> | Any text | none | Filter on user email, URL or finding type. |
--jailbreak | Boolean | off | Keep only incidents carrying a jailbreak-attempt finding. |
--format <format> | csv | json | csv | Output format. |
--output <path> | Writable path | incidents-<timestamp>.<ext> | Destination file. |
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock incidents export --days 7
zeuslock incidents export --days 30 --severity critical --format json --output incidents.jsonzeuslock agents / extensions — Is the fleet actually protected
zeuslock agents list
List enrolled desktop agents with their heartbeat state.
Credential: Personal CLI access token · Impact: Reads only
Shows hostname, platform, version, online state and last heartbeat, plus an update_available marker when a newer version has been published. An agent counts as online if it checked in within the last five minutes. This is how you find machines that stopped reporting.
| Option | Values | Default | What it does |
|---|---|---|---|
--status <status> | all | online | offline | all | Heartbeat filter. |
--search <text> | Any text | none | Searches hostname and platform only. |
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock agents list
zeuslock agents list --status offline
zeuslock agents list --search windows --jsonzeuslock agents revoke <agent_id>
Revoke one enrolled desktop agent.
Credential: Personal CLI access token · Impact: Changes organization state
The agent loses its enrolment and stops being trusted by the backend. Use it when a laptop is lost or decommissioned. The command prompts before acting unless you pass --yes.
| Argument | Required | What it is |
|---|---|---|
agent_id | Yes | Exact id from agents list. |
| Option | Values | Default | What it does |
|---|---|---|---|
-y, --yes | Boolean | off | Skip the confirmation prompt. Required in scripts and CI. |
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock agents revoke AGENT-123
zeuslock agents revoke AGENT-123 --yes --jsonzeuslock extensions status
Show browser extensions that are currently active.
Credential: Personal CLI access token · Impact: Reads only
Counts extensions and users seen in the last 30 minutes. A low count against a large fleet usually means the force-install policy did not reach those browsers.
| Option | Values | Default | What it does |
|---|---|---|---|
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock extensions status --jsonzeuslock users / keys / tokens — Who has access, and with what
Three separate things: people, organization API keys, and personal CLI tokens. Removing a person does not revoke a key they created.
zeuslock users list
List the people in your organization.
Credential: Personal CLI access token · Impact: Reads only
Shows email, role, status, active flag and creation date. Roles are validated against the roles your plan actually exposes, so an invalid role is rejected rather than silently matching nothing.
| Option | Values | Default | What it does |
|---|---|---|---|
--search <text> | Any text | none | Local filter over email, role, status and display name. |
--role <role> | admin, user, viewer… | none | Validated against the roles your plan exposes. |
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock users list
zeuslock users list --role admin
zeuslock users list --search alice --jsonzeuslock users remove <user>
Remove one person from the organization.
Credential: Personal CLI access token · Impact: Changes organization state
Two guards are enforced server-side and cannot be overridden: you cannot remove yourself, and you cannot remove the last active admin. Accepts an id or an email, resolved against the user list first.
| Argument | Required | What it is |
|---|---|---|
user | Yes | User id or email address. |
| Option | Values | Default | What it does |
|---|---|---|---|
-y, --yes | Boolean | off | Skip the confirmation prompt. Required in scripts and CI. |
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock users remove departing@example.com
zeuslock users remove user-uuid --yes --jsonzeuslock keys list
List organization API keys.
Credential: Personal CLI access token · Impact: Reads only
Key values are masked by default. --show-secret prints full values only for keys the backend can still decrypt; older keys may only ever show masked.
| Option | Values | Default | What it does |
|---|---|---|---|
--status <status> | all | active | revoked | all | Local status filter. |
--show-secret | Boolean | off | Reveal full key values where available. |
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock keys list
zeuslock keys list --status active
zeuslock keys list --show-secret --jsonzeuslock keys create --name <name>
Create a new organization API key.
Credential: Personal CLI access token · Impact: Changes organization state
The full key is returned once, in this response. Copy it immediately — the CLI cannot show it again later if the backend stops returning it.
| Option | Values | Default | What it does |
|---|---|---|---|
--name <name> | Any text | none | Required. Name it after where it will be used, so it can be revoked confidently later. |
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock keys create --name ci-pipeline
zeuslock keys create --name fleet-deploy --jsonzeuslock keys revoke <key_id>
Revoke one active organization API key.
Credential: Personal CLI access token · Impact: Changes organization state
Anything using the key stops working immediately — agents configured with it, CI jobs, hooks. The CLI refuses to act on an already-revoked key, because a second delete on the backend permanently destroys the record rather than revoking it.
| Argument | Required | What it is |
|---|---|---|
key_id | Yes | Id from keys list. |
| Option | Values | Default | What it does |
|---|---|---|---|
-y, --yes | Boolean | off | Skip the confirmation prompt. Required in scripts and CI. |
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock keys revoke key-uuid --yeszeuslock tokens list
List your personal CLI access tokens.
Credential: Personal CLI access token · Impact: Reads only
Shows name, masked value, status, expiry and last use. The last-used column is the quickest way to find tokens that can safely be revoked.
| Option | Values | Default | What it does |
|---|---|---|---|
--status <status> | all | active | revoked | expired | all | Local status filter. |
--show-secret | Boolean | off | Reveal full token values where the backend returns them. |
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock tokens list
zeuslock tokens list --status expiredzeuslock tokens create --name <name>
Create a personal CLI access token.
Credential: Personal CLI access token · Impact: Changes organization state
The full zlu_… token is returned once. This is the scriptable alternative to the dashboard CLI page — useful for issuing a short-lived token to a CI job from a machine that is already authenticated.
| Option | Values | Default | What it does |
|---|---|---|---|
--name <name> | 1-255 characters | none | Required. Identifies the token in the list. |
--expires-in-days <days> | 1-365 | backend default (90) | Shorter lifetimes are better for CI. Out-of-range values are rejected locally. |
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock tokens create --name work-laptop
zeuslock tokens create --name ci-job --expires-in-days 30 --jsonzeuslock tokens revoke <token_id>
Revoke one personal CLI access token.
Credential: Personal CLI access token · Impact: Changes organization state
The token returns 401 from the next request onward. The record is kept so it stays visible in the list as revoked — this is the reversible-looking step, and the one to use when a laptop goes missing.
| Argument | Required | What it is |
|---|---|---|
token_id | Yes | Id from tokens list. |
| Option | Values | Default | What it does |
|---|---|---|---|
-y, --yes | Boolean | off | Skip the confirmation prompt. Required in scripts and CI. |
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock tokens revoke token-uuid --yeszeuslock tokens purge <token_id>
Permanently delete an already-revoked CLI token.
Credential: Personal CLI access token · Impact: Changes organization state
Removes the record entirely, so it disappears from the list and from any audit view. The token must be revoked first — the CLI refuses to purge an active one, which makes accidental destruction of a working credential impossible in one step.
| Argument | Required | What it is |
|---|---|---|
token_id | Yes | Id of a revoked token. |
| Option | Values | Default | What it does |
|---|---|---|---|
-y, --yes | Boolean | off | Skip the confirmation prompt. Required in scripts and CI. |
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock tokens revoke token-uuid --yes
zeuslock tokens purge token-uuid --yeszeuslock rules — Policy as code
Export live policy state to a reviewable file, and detect when the live state has drifted from it. Read-only — the CLI never writes policy back.
zeuslock rules get
Export the current DLP policy state as YAML or JSON.
Credential: Personal CLI access token · Impact: Reads only
Output is normalised: ordering is deterministic and volatile fields such as created_at, updated_at and org_id are stripped, so two exports of an unchanged policy are byte-identical. That is what makes the file safe to commit and diff.
| Option | Values | Default | What it does |
|---|---|---|---|
--scope <scope> | policies | default | policy | policies | policies exports every visible policy plus assignment groups; default exports only the org-wide Default Policy; policy exports one document. |
--policy-id <id> | Any text | none | Required with --scope policy. |
--format <format> | yaml | json | yaml | Export format. |
--output <path> | Writable path | stdout | Write to a file instead of printing. |
zeuslock rules get --output zeuslock.rules.yaml
zeuslock rules get --scope default --format json
zeuslock rules get --scope policy --policy-id defaultzeuslock rules diff [file]
Compare a local policy file against the live policy state.
Credential: Personal CLI access token · Impact: Reads only
Exits 0 when they match and 1 when they differ, printing a path-level diff of what changed. Run it in CI against a committed export to catch policy edits made in the dashboard that nobody reviewed.
| Argument | Required | What it is |
|---|---|---|
file | No | Exported YAML or JSON. Defaults to zeuslock.rules.yaml, then .yml, then .json. |
| Option | Values | Default | What it does |
|---|---|---|---|
--scope <scope> | policies | default | policy | policies | Must match the scope recorded in the file. |
--policy-id <id> | Any text | none | Required with --scope policy. |
--format <format> | text | json | text | Diff output format. |
zeuslock rules diff zeuslock.rules.yaml
zeuslock rules diff --scope default zeuslock.default.rules.yaml
zeuslock rules diff policy.json --scope policy --policy-id default --format jsonzeuslock siem — Feed events to your SIEM
Retrieves DLP events in OCSF format. These commands read events only — SIEM destinations such as Splunk, Sentinel and Elastic are configured in the dashboard, not here.
zeuslock siem pull
Retrieve one page of OCSF events.
Credential: Organization API key · Impact: Reads only
Prints JSONL by default — one event per line — which is what SIEM collectors ingest directly. The response carries a next_cursor; pass it back through --since to page forward. Use this for backfills and one-off queries.
| Option | Values | Default | What it does |
|---|---|---|---|
--api-key <key> | zl_… | [object Object]ZEUSLOCK_API_KEY | Organization API key for this call. |
--since <cursor> | Cursor string | none | A next_cursor from a previous response. Not a date. |
--from <time> | ISO date/time or epoch | none | Start of the time window. |
--to <time> | ISO date/time or epoch | none | End of the time window. |
--days <n> | Positive integer | none | Look back this many days. Mutually exclusive with --from. |
--category <value> | dlp | none | Event category. Current events use dlp. |
--severity <level> | unknown | low | medium | high | critical | none | Treated as a minimum severity, not an exact match. |
--limit <n> | 1-500 | 100 | Page size. Validated before the request. |
--format <format> | jsonl | json | jsonl | jsonl pipes into collectors; json returns an envelope with next_cursor. |
zeuslock siem pull --limit 100
zeuslock siem pull --days 7 --severity high --category dlp
zeuslock siem pull --format json | jq .next_cursorzeuslock siem tail
Poll continuously and emit new events as they arrive.
Credential: Organization API key · Impact: Reads continuously until stopped
Runs until you stop it, saving its position to siem-cursors.json after each poll, so a restart resumes without duplicating or skipping events. There is no streaming endpoint behind this — it polls. Give each consumer its own --cursor-name so two pipelines do not fight over one position.
| Option | Values | Default | What it does |
|---|---|---|---|
--api-key <key> | zl_… | [object Object]ZEUSLOCK_API_KEY | Organization API key for this call. |
--since <cursor> | Cursor string | saved cursor | Override the saved position for this run. |
--category <value> | dlp | none | Also part of the cursor's identity. |
--severity <level> | unknown…critical | none | Minimum severity; also part of the cursor's identity. |
--limit <n> | 1-500 | 100 | Page size per poll. |
--interval <seconds> | Positive number | 5 | Seconds between polls. |
--cursor-name <name> | Any text | default | Namespace for this consumer's saved position. |
--reset-cursor | Boolean | off | Ignore the saved position and replay from the beginning. |
--max-polls <count> | Positive integer | none | Stop after this many polling cycles instead of running forever. Useful in a cron job. |
zeuslock siem tail --category dlp
zeuslock siem tail --cursor-name splunk-prod --interval 10
zeuslock siem tail --max-polls 12 --interval 5 # ~1 minute, then exitzeuslock shadow-ai — AI tools nobody approved
Read-only view of the dashboard Shadow AI page. Available only when Shadow AI is enabled for your organization; otherwise the commands say so and make no data call.
zeuslock shadow-ai stats
KPI totals for unapproved AI tool usage.
Credential: Personal CLI access token · Impact: Reads only
Totals plus period-over-period change, so you can tell whether shadow usage is growing after a policy announcement.
| Option | Values | Default | What it does |
|---|---|---|---|
--days <days> | 7 | 30 | 90 | 30 | History window. |
--source <source> | all | endpoint | browser | both | all | Where the usage was observed. |
--status <status> | all | sanctioned | shadow | all | shadow means the tool has not been approved. |
--category <category> | all | chatbot | coding_assistant | image_gen | agent | other | all | Tool category. |
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock shadow-ai stats
zeuslock shadow-ai stats --days 7 --status shadow --category chatbotzeuslock shadow-ai tools
List the AI tools detected in your environment.
Credential: Personal CLI access token · Impact: Reads only
Tool, category, policy status, source, user count, connection count and risk score — the list to work through when deciding what to sanction or block.
| Option | Values | Default | What it does |
|---|---|---|---|
--days <days> | 7 | 30 | 90 | 30 | History window. |
--source <source> | all | endpoint | browser | both | all | Where the usage was observed. |
--status <status> | all | sanctioned | shadow | all | shadow means the tool has not been approved. |
--category <category> | all | chatbot | coding_assistant | image_gen | agent | other | all | Tool category. |
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock shadow-ai tools --status shadow
zeuslock shadow-ai tools --category coding_assistant --jsonzeuslock shadow-ai users
List the people using shadow AI tools.
Credential: Personal CLI access token · Impact: Reads only
User, number of distinct tools and most-used tool. Aimed at finding teams that need an approved alternative, not at singling people out.
| Option | Values | Default | What it does |
|---|---|---|---|
--days <days> | 7 | 30 | 90 | 30 | History window. |
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock shadow-ai users --days 7 --jsonzeuslock mcp — Model Context Protocol activity
What AI agents connected to, and what they were allowed to do. The backend stores sanitized metadata and non-reversible content hashes only, so prompts and tool payloads are never exposed here.
zeuslock mcp stats
KPI totals for MCP activity.
Credential: Personal CLI access token · Impact: Reads only
Events, tool calls, blocked and alerted counts, active servers and affected users, grouped by transport, direction and method.
| Option | Values | Default | What it does |
|---|---|---|---|
--days <days> | 7 | 30 | 90 | 30 | History window. |
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock mcp stats --days 7 --jsonzeuslock mcp events
List individual MCP audit events.
Credential: Personal CLI access token · Impact: Reads only
Paginated at 50 rows per page. Follow next_cursor through --cursor to walk a longer window.
| Option | Values | Default | What it does |
|---|---|---|---|
--days <days> | 7 | 30 | 90 | 30 | History window. |
--transport <transport> | all | http | sse | stdio | all | How the agent connected. |
--direction <direction> | all | client_to_server | server_to_client | all | Message direction. |
--decision <decision> | all | allow | alert | block | all | What the policy decided. |
--method <method> | tools/call… | none | Exact MCP method name. |
--search <text> | Any text | none | Searches server, tool, user, method, hostname and path. |
--cursor <cursor> | Cursor string | none | Continue from a previous page. |
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock mcp events --decision block
zeuslock mcp events --transport stdio --method tools/call --jsonzeuslock mcp servers
List the MCP servers discovered in your environment.
Credential: Personal CLI access token · Impact: Reads only
A deduplicated inventory over a fixed 90-day window — the answer to "what has anyone connected an agent to?".
| Option | Values | Default | What it does |
|---|---|---|---|
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock mcp servers --jsonzeuslock deploy — Roll out to a fleet, then prove it worked
zeuslock deploy generate (alias: gpo-config)
Generate the managed-configuration files that enrol machines automatically.
Credential: Personal CLI access token · Impact: Writes local files
Writes local files only — nothing is sent to Active Directory, Intune or Jamf. Push them with whatever tool you already use and machines arrive already pointed at your organization, with no per-user setup. Files containing the API key are written mode 0600; the key is never printed to the terminal or written into deployment-summary.json.
| Option | Values | Default | What it does |
|---|---|---|---|
--artifact <set> | all | extension | agent | all | Which files to generate. Extension artifacts need a Business or Enterprise plan. |
--browser <browser> | all | chrome | edge | all | Applies to extension artifacts only. |
--output <dir> | Path | zeuslock-deploy | Output directory. Existing files with the same names are overwritten. |
--api-key <key> | zl_… | none | Key to embed. Highest precedence. |
--key-id <id> | Any text | none | Use an existing key from keys list. |
--create-key-name <name> | Any text | none | Create a new key and embed it. This changes organization state. |
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock deploy generate --key-id key-uuid
zeuslock deploy generate --artifact agent --output ./rollout
zeuslock deploy generate --artifact extension --browser chrome --create-key-name fleet-2026If your organization has more than one active key, the command refuses to guess — pass --key-id, --api-key or --create-key-name.
Extension configuration is delivered in two separate files on purpose: browser policy controls installation, while the API key travels in the managed-configuration file. Deploy both, or the extension installs and then asks each user to configure it.
zeuslock deploy agent-verify
Confirm that machines actually enrolled and are checking in.
Credential: Personal CLI access token · Impact: Reads only
Exits non-zero unless a matching agent exists in the expected state, so it can gate a rollout script. Returns one of verified, offline, online or not_found — the distinction between "never arrived" and "arrived and went quiet" is what tells you whether the deployment or the machine is at fault.
| Option | Values | Default | What it does |
|---|---|---|---|
--agent-id <id> | Any text | none | Exact agent id match. |
--hostname <name> | Any text | none | Exact hostname match, case-insensitive. |
--platform <platform> | windows | macos | linux | none | Platform filter. |
--status <status> | online | offline | any | online | The state you expect. Use any to check enrolment without requiring a live heartbeat. |
--json | Boolean | off | Print machine-readable JSON instead of a table. |
zeuslock deploy agent-verify --hostname LAPTOP-01
zeuslock deploy agent-verify --platform windows --status any --jsonTroubleshooting
| What you see | What it means | What to do |
|---|---|---|
Not logged in. Run `zeuslock auth login` first. | No personal token is saved on this machine. | Generate one on the dashboard CLI page and run zeuslock auth login --token zlu_…. |
invalid CLI token | The token is revoked, expired, or belongs to a different environment. | Tokens are environment-specific: a staging token returns 401 against production. Check ZEUSLOCK_API_URL, then issue a new token. |
API key is required. | A content command ran without an organization API key. | A personal token does not work for scan, anonymize, hook run or SIEM. Run zeuslock auth api-key set. |
Multiple active API keys are available. | deploy generate will not guess which key to embed. | Pass --key-id, --api-key or --create-key-name. |
| A command needs 90 or 365 days and refuses. | Long history windows and export are plan-gated. | Business or Enterprise is required. Shorter windows keep working. |
| A command hangs. | siem tail polls until stopped; that is expected. | Press Ctrl-C, or use --max-polls for a bounded run. |
Working against staging
Credentials are environment-specific and do not cross over. Point the CLI at staging and authenticate again with a staging token.
export ZEUSLOCK_API_URL="https://api-staging.zeuslock.ai"
zeuslock auth login --token zlu_your_staging_token
zeuslock statusWhat the CLI deliberately does not do
The CLI mirrors the dashboard and backend rather than inventing capabilities on top of them. These are absent on purpose, so you do not go looking:
| Not available | Why |
|---|---|
| Email and password login | The login endpoint requires a reCAPTCHA challenge that a terminal cannot complete. |
| Applying or editing policies | rules is export and diff only; policy changes stay in the dashboard, where they are reviewed. |
| Configuring SIEM destinations | Splunk, Sentinel and Elastic connections are managed in the dashboard. The CLI reads events only. |
| Rotating a key or token in one step | There is no atomic rotate endpoint. Create the replacement, move traffic to it, then revoke the old one. |
| Bulk user removal | The backend removes one user at a time, and the safety guards apply to each. |
| Building installers | deploy generate produces configuration files. Download installers from the dashboard. |