Command-Line Tool (CLI)

Install the ZeusLock CLI from npm, sign in with a personal token from the dashboard CLI page, and work with incidents, agents, users and scans from your terminal.

What the CLI is

The ZeusLock CLI (zeuslock) brings the dashboard to your terminal: incidents, agents, users, API keys, Shadow AI, MCP, SIEM export, plus scanning and anonymising files. It needs Node.js 22.12 or newer. The current version is 0.2.2.

Install and sign in

  1. Install the CLI from npm and check the version:

    npm install -g zeuslock-dlp-cli@latest
    zeuslock --version

    Result: the version is printed, for example 0.2.2.

  2. In the dashboard, open CLI in the sidebar. Under CLI access tokens, click + Generate token, enter a Name (for example work-laptop), choose Expires in (30 days, 90 days (recommended) or 1 year) and click Generate.

    Result: a zlu_… token is shown. Copy it now and store it somewhere safe.

  3. Save the token on your machine and check who you are:

    zeuslock auth login --token zlu_YOUR_CLI_TOKEN
    zeuslock whoami

    Result: whoami shows your e-mail, role and organisation.

Instead of saving the token, you can set it for the current terminal, as the dashboard's Quick start does. macOS / Linux:

export ZEUSLOCK_API_URL="https://api.zeuslock.ai"
export ZEUSLOCK_API_TOKEN="zlu_YOUR_CLI_TOKEN"
zeuslock whoami

Windows (PowerShell):

$env:ZEUSLOCK_API_URL = "https://api.zeuslock.ai"
$env:ZEUSLOCK_API_TOKEN = "zlu_YOUR_CLI_TOKEN"
zeuslock whoami

On-premises, point the CLI at your own API host:

zeuslock auth login --token zlu_YOUR_CLI_TOKEN --api-url https://api.your-company.example

Useful commands

zeuslock status
zeuslock incidents list --days 7
zeuslock incidents stats
zeuslock agents list --status online
zeuslock users list
zeuslock shadow-ai stats --days 30

Every command has --help; most accept --json for scripts.

Scanning uses an organisation API key

scan, anonymize, Git hooks and SIEM commands act for the organisation, so they use an organisation API key (zl_…) instead of your personal token. Create one on API Keys (see Generate & Manage API Keys); auth api-key set asks for it so it stays out of your shell history:

zeuslock auth api-key set
zeuslock scan ./document.txt
zeuslock anonymize ./dataset.txt --output dataset.safe.txt
zeuslock hook install

Known limits

  • There is no e-mail and password login: use a token.
  • Tokens never refresh. When one expires or is revoked, generate a new one and sign in again.
  • A token works only against the server it was created on.
  • The CLI cannot edit policies or configure SIEM destinations: do that in the dashboard.

If something fails

ProblemFix
zeuslock: command not foundInstall Node.js 22.12 or newer, make sure npm's global folder is on your PATH, run the install again and open a new terminal.
Not logged in. Run `zeuslock auth login` first.No token is saved. Run zeuslock auth login --token zlu_….
401 or invalid CLI tokenThe token is revoked, expired, incomplete or from another server. Generate a new one on the CLI page.
API key is required.A content command needs the organisation key: run zeuslock auth api-key set.

Full reference

Every command, option and default: ZeusLock CLI command reference.