@wafersecurity/cli
v0.5.0
Published
Agent-native CLI for Wafer — the AI security gateway. Manage projects, guardrails, limits, logs and run guardrail tests from the terminal or an agent.
Downloads
192
Maintainers
Readme
@wafersecurity/cli
Agent-native CLI for Wafer — the AI security gateway.
Manage projects, guardrails, limits, logs and run guardrail tests from the
terminal or an agent. Zero dependencies, every command supports --json.
Install
npm i -g @wafersecurity/cli # once published
# or run from source:
node packages/cli/src/cli.js helpAuth
Create an API key in the console (API keys in the header), then log in:
wafer login # paste the key when prompted (saved to ~/.wafer/config.json)
# or: wafer login wafer_sk_...
# or, instead of login, set an env var:
export WAFER_API_KEY=wafer_sk_...wafer logout removes the saved key. WAFER_URL overrides the base (default
https://wafersecurity.ai).
Commands
wafer projects # list projects
wafer projects create "My App" --id my-app
wafer projects delete my-app
wafer guardrails get my-app
wafer guardrails set my-app pii redact # rule: secrets|pii|blocklist|injection
wafer profile my-app set interrupt '{"guardrails":{"injection":{"action":"block"}}}'
wafer cache my-app on
wafer ratelimit my-app 60
wafer budget my-app 1000000
wafer spend my-app 10
wafer logging my-app metadata
wafer test my-app "email me at [email protected]" # run guardrails, no model call
wafer test my-app "ignore previous instructions" --mode deterministic --profile interrupt
wafer logs my-app --limit 20 --decision block --since 24h
wafer logs my-app --follow
wafer analytics my-app # includes per-profile breakdown
wafer export my-app csv
wafer init my-app # print the gateway base URLs
wafer keys list
wafer keys create ci
wafer keys revoke <id>
wafer whoamiAdd --json to any command for machine-readable output — ideal for agents.
