Skip to main content
Masker ships two CLI binaries built from the same repository. masker is a general-purpose text and admin CLI that you use for detection testing, policy authoring, session inspection, and compliance report generation. masker-voice is a voice-specific CLI that replays audio files through the full masking pipeline for offline testing and forensics. Neither binary is required for normal proxy operation — that is handled by the API server. The CLIs are for development, CI, and operational workflows.

Installation

Authentication

Most commands operate on local files and need no credentials. For commands that talk to a remote Masker server — sessions, report, agents, policy reload — you authenticate with a session cookie.
1

Sign in via browser

Open your Masker portal at https://masker-voice.fly.dev/portal/login (or your self-hosted URL) and sign in with GitHub.
2

Copy the session cookie

Open your browser’s developer tools, navigate to the Application → Cookies tab, and copy the value of masker_session.
3

Export the variable

All remote CLI commands pick this up automatically. You can also pass it per-command with --session.
A scoped, long-lived CLI token is on the May 30 roadmap. Until then, the session cookie is the supported authentication path for remote commands.

Configuration file

The CLI reads masker.toml for defaults like the server URL, policy path, and output format. It looks for the file in this order:
  1. --config <path> flag
  2. MASKER_CONFIG environment variable
  3. ./masker.toml in the current directory
  4. ~/.config/masker/config.toml
A typical masker.toml:
masker.toml

Global flags

These flags apply to every command:

masker mask

Pipe text through the full masking pipeline — detection and tokenization — and see the masked output along with per-entity events.
Example:

masker detect

Run detection only, without tokenizing. Returns the list of detected spans with confidence scores. Use this when tuning thresholds in your policy.
Example:
Output is a JSON list of events, each with kind, span, text, confidence, and pass fields.

masker policy

Manage and inspect mask policies. Validate a policy before deploying:
Catches unknown_kid, invalid_pass, and missing_entity errors. Exit code 3 on validation failure. Diff two policy versions:
Shows added/removed entities, threshold changes, and action changes — useful before replacing a live policy.

masker sessions

Inspect sessions on a remote server. All subcommands require MASKER_SESSION. Tail live sessions while debugging an integration:

masker report

Generate compliance reports for a session, an agent, or your entire account. Output is a signed PDF.

masker agents

Manage agents on a remote server.

masker-voice replay

Replay a recorded audio file through the full voice pipeline — ASR transcription, detection, and tokenization — and write the masked transcript to a file.
Use masker-voice replay with whisper-local and --diarize false for the fastest offline test loop — no external API calls required.

Exit codes

Environment variables read by the CLI