Sentinel CLI proxy
Let the Sentinel CLI manage system-wide proxy environment variables
Instead of managing environment variables manually across different terminals, the Sentinel CLI can manage system-wide proxy states natively.
1. Configure your providers and gateway URL
Tell the CLI which providers you want to intercept and where your gateway is located:
sentinel config providers
sentinel config urlsentinel config providers accepts any of openai, anthropic, and google (space-separated), or all to select every supported provider.
(This updates your local configuration under ~/.config/sentinel/config.json)
2. Toggle the proxy globally
Once configured, you can turn the interception environment rules on or off across your entire session layout:
# Inject the environment variables globally across your session environment
sentinel proxy on
# Remove the environment variables and restore default direct-to-cloud routing
sentinel proxy offChanges apply to new shell sessions. Open a fresh terminal after toggling the proxy on or off.
When the proxy is on, the CLI writes the provider base-URL variables (OPENAI_BASE_URL, ANTHROPIC_BASE_URL, GOOGLE_GEMINI_BASE_URL) pointing at your configured gateway. sentinel proxy off removes them and restores direct-to-cloud routing.
3. Verify your policy
Send a test payload through the gateway to confirm your guardrails are working — no provider key required, and nothing is recorded in telemetry:
sentinel test --text "My email is [email protected] and my key is sk-proj-abc123"The CLI prints whether the prompt passed, was redacted, or was blocked, along with the redacted text.
Updated 12 days ago
