@pretense/cli
v0.4.0
Published
AI firewall CLI — protect code before LLM API calls
Maintainers
Readme
@pretense/cli
AI firewall CLI that mutates proprietary code identifiers before sending to LLM APIs. Your code hits AI naked -- Pretense fixes that.
Install
npm install -g @pretense/cliQuickstart
# Initialize config in your project
pretense init
# Save a dashboard API key (read_write for mutation via proxy), or set PRETENSE_API_KEY
pretense login --key YOUR_KEY
# Start the proxy (default port 9339) — validates key before binding
pretense start
# Point your AI tools at the proxy
export ANTHROPIC_BASE_URL=http://localhost:9339
export OPENAI_BASE_URL=http://localhost:9339/v1
# Scan a file for identifiers and secrets
pretense scan src/
# Mutate a file and print to stdout
pretense mutate src/app.ts
# Reverse mutations using stored map
pretense reverse mutated-output.ts
# View audit log
pretense audit --json
# Plan / quota (live when backend reachable; falls back offline)
pretense statusCommands
| Command | Description |
| --------------------------- | -------------------------------------------------------------- |
| pretense init | Scan cwd, create .pretense/ config |
| pretense login [--key …] | Save dashboard API key to ~/.pretense/config.json |
| pretense logout | Remove saved dashboard API key |
| pretense start | Validate key, start proxy on :9339 |
| pretense scan <file\|dir> | Scan for identifiers + secrets |
| pretense mutate <file> | Redact scanner hits (secrets/PII), mutate identifiers → stdout |
| pretense reverse <file> | Reverse using stored map |
| pretense audit | Print audit log |
| pretense status | Plan, quota, usage (usage is an alias) |
| pretense credits | Remaining mutation budget (tokens is an alias) |
| pretense upgrade | Compare plans / upgrade |
| pretense version | Print version |
Env: PRETENSE_API_KEY, PRETENSE_API_URL, PRETENSE_API_TIMEOUT_MS (backend HTTP timeout, default 15s).
Exit Codes
0-- Success1-- Error2-- Secrets found
Learn More
Visit pretense.ai for documentation and enterprise features.
