HomeGuidesAPI ReferenceRelease notes
Log In
Guides

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 url

sentinel 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 off
ℹ️

Changes 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.