- Local proxy (run)
- Standalone proxy (start + connect)
run on its own is the whole setup.Description
These subcommands run the Infisical Agent Proxy, which brokers real credentials onto your agents’ traffic on the wire. Which you use depends on where the agent runs:runis for an agent on your own computer. It does the proxy’s work and the agent’s launch in one process, authenticating as your logged-in user, and sandboxes the agent. It always starts its own proxy, so--proxyis rejected rather than ignored. See Local Agent Proxy.startruns the proxy as a long-running service on a host of its own, serving agents across your network.connectlaunches an agent behind a proxy already running elsewhere, setting up proxy routing, CA trust, and placeholder credentials. It needs a proxy address, which is why it goes withstart. Both authenticate with a machine identity via Universal Auth, and the proxy’s is always separate from your agents’; see Standalone Agent Proxy.
run is complete by itself, and a deployed proxy pairs only with connect. All three read the same proxied services and secrets from Infisical.
Subcommands & flags
Local proxy, on your own computer
infisical secrets agent-proxy run
infisical secrets agent-proxy run
-- is the agent’s own start command. run starts a proxy alongside the agent, authenticating as your logged-in user, and stops it when the agent exits. See Local Agent Proxy for the full picture.Because the proxy and the agent share a machine, the sandbox is the boundary: the agent cannot read your keyring, your credential files, or the proxy’s CA key, and its only route to the network is the proxy. Real secret values are never placed in the agent’s environment, and it gets no Infisical token, only proxy routing, CA trust, and the placeholders for secret-substitution services.Requires macOS, or Linux with bubblewrap installed; see Requirements for the per-distribution command. Where no OS sandbox is available, run refuses to start unless you pass --no-sandbox.--proxy is rejected: run always starts its own proxy. To route through a proxy on another host, use agent-proxy connect --proxy=<host>:<port>.Environment variables
INFISICAL_PROJECT_ID / INFISICAL_ENVIRONMENT / INFISICAL_SECRET_PATH
INFISICAL_PROJECT_ID / INFISICAL_ENVIRONMENT / INFISICAL_SECRET_PATH
--projectId, --env, and --path, and to the workspaceId, defaultEnvironment, and defaultSecretPath fields in .infisical.json.INFISICAL_AGENT_PROXY_SANDBOX
INFISICAL_AGENT_PROXY_SANDBOX
0, false, or off to disable the OS sandbox, the same as --no-sandbox. Deliberately cannot be set from .infisical.json, so a committed file cannot silently disable the boundary.INFISICAL_DOMAIN
INFISICAL_DOMAIN
--domain flag.Flags
--env
--env
dev, staging, prod). Falls back to INFISICAL_ENVIRONMENT, then to defaultEnvironment in .infisical.json; required otherwise.--path
--path
INFISICAL_SECRET_PATH, then to defaultSecretPath in .infisical.json./--projectId
--projectId
INFISICAL_PROJECT_ID, then to .infisical.json.--token
--token
INFISICAL_TOKEN or INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN in your own environment (these are read by the CLI and scrubbed from the agent’s environment). Activity records attribute requests to token rather than your email.--sandbox / --no-sandbox
--sandbox / --no-sandbox
--no-sandbox credentials are still brokered and the environment is still scrubbed, but the agent runs uncontained: it can read your keyring and credential files and reach the network directly, bypassing the proxy. run warns when it starts this way. Can also be set via INFISICAL_AGENT_PROXY_SANDBOX.--sandbox (the sandbox is on)--allow-read
--allow-read
--no-sandbox when an agent needs one config file. run prints what was re-opened.--allow-write
--allow-write
/tmp, and the supported agents’ own state directories. Repeatable.--allow-host
--allow-host
--unmatched-host=block. Repeatable. Has no effect under the default allow policy, where unmatched hosts already pass through.--pass-env
--pass-env
TOKEN, SECRET, PASSWORD, API_KEY, and similar), Infisical’s own variables, and agent-socket addresses such as SSH_AUTH_SOCK; this re-admits a specific one. Repeatable.--set-env
--set-env
KEY=VALUE. Applied last, so it overrides anything else run sets. Repeatable.--unmatched-host
--unmatched-host
allow forwards them untouched with no credentials applied; block rejects them with 403, restricting the agent to the services you have defined plus any --allow-host entries.allow--poll-interval
--poll-interval
60--log-file
--log-file
logrotate (copytruncate) if you keep one. --log-level filters which decisions are recorded, the same as on start.Standalone proxy, on a host of its own
These two are used together, on different hosts:start on the proxy host, connect on each agent host.
infisical secrets agent-proxy start
infisical secrets agent-proxy start
CONNECT tunnels and plain-HTTP services through regular forward-proxy requests; credentials are brokered on both. Requests for https:// URLs sent as plain forward-proxy requests (rather than CONNECT) are rejected so the proxy can never be used to downgrade TLS.Environment variables
INFISICAL_UNIVERSAL_AUTH_CLIENT_ID / INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET
INFISICAL_UNIVERSAL_AUTH_CLIENT_ID / INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET
--client-id and --client-secret.INFISICAL_DOMAIN
INFISICAL_DOMAIN
https://eu.infisical.com for EU Cloud, or your self-hosted URL). Alternative to the --domain flag.Flags
--port
--port
17322--unmatched-host
--unmatched-host
allow forwards them untouched with no credentials applied (the normal mode: documentation, package registries, and services the agent authenticates to itself pass straight through); block rejects them with 403, restricting agents to the services you have defined.allowblock blocks every host without a matching proxied service, including your Infisical instance itself. Since agent traffic routes through the proxy, Infisical CLI commands run from inside the agent (using the INFISICAL_TOKEN from its environment) will also be rejected in this mode.--poll-interval
--poll-interval
60--client-id / --client-secret
--client-id / --client-secret
INFISICAL_UNIVERSAL_AUTH_CLIENT_ID / INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET environment variables.--log-format
--log-format
console (human-readable, colorized in a terminal and plain otherwise) or json (machine). Logs are written to stderr.console--log-file
--log-file
json to this file, in addition to the console/json stream. Lets you watch the console and persist machine-readable logs at the same time. Rotate it with logrotate (copytruncate) or restart the proxy.--log-level
--log-level
passthrough=debug, brokered=info, blocked=warn, error=error), so this doubles as the activity filter: debug shows everything, the default info hides passthrough, warn shows only blocked and errors.infoinfisical secrets agent-proxy connect
infisical secrets agent-proxy connect
-- is the agent’s own start command. The wrapper authenticates the agent’s machine identity, then starts the agent process with:HTTPS_PROXY/HTTP_PROXYpointing at the agent proxy, plusNO_PROXY(always includeslocalhost,127.0.0.1, merged with anyNO_PROXYalready in your environment and the--no-proxyflag).- The organization’s root CA written to
~/.infisical/agent-proxy/mitm-ca.pemand trusted viaSSL_CERT_FILE,NODE_EXTRA_CA_CERTS,REQUESTS_CA_BUNDLE,CURL_CA_BUNDLE,GIT_SSL_CAINFO, andDENO_CERT. - Dummy placeholder environment variables for credential-substitution services the agent has Proxy access to.
- Real values for regular secrets the agent has Read Value on in the scoped folder, including secrets imported into it (similar to
infisical run). This is opt-in; an agent identity scoped to just the proxy permission has no read access, and brokered credentials never appear in the agent’s environment. If the agent can read a secret that a proxied service brokers to it,connectrefuses to start, since the agent would receive the real value directly and bypass the proxy; fix the permissions or pass--allow-readable-brokered-secretsto override. INFISICAL_TOKENset to the agent’s access token, so the agent can run Infisical CLI commands itself.
.infisical.json → the built-in default. An explicitly-passed flag always wins. This is why, where the environment variables are already set on the host, the command collapses to infisical secrets agent-proxy connect -- claude.Environment variables
INFISICAL_UNIVERSAL_AUTH_CLIENT_ID / INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET
INFISICAL_UNIVERSAL_AUTH_CLIENT_ID / INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET
--client-id and --client-secret.INFISICAL_PROJECT_ID
INFISICAL_PROJECT_ID
--projectId flag or the workspaceId field in .infisical.json (created by infisical init).INFISICAL_ENVIRONMENT
INFISICAL_ENVIRONMENT
--env flag or the defaultEnvironment field in .infisical.json.INFISICAL_SECRET_PATH
INFISICAL_SECRET_PATH
--path flag or the defaultSecretPath field in .infisical.json.INFISICAL_AGENT_PROXY_ADDRESS
INFISICAL_AGENT_PROXY_ADDRESS
host:port. Alternative to the --proxy flag.INFISICAL_DOMAIN
INFISICAL_DOMAIN
--domain flag.Flags
--proxy
--proxy
host:port. Required, unless provided via INFISICAL_AGENT_PROXY_ADDRESS.--env
--env
dev, staging, prod). Falls back to INFISICAL_ENVIRONMENT, then to the defaultEnvironment (and git-branch mapping) in .infisical.json; required otherwise.--path
--path
INFISICAL_SECRET_PATH, then to the defaultSecretPath field in .infisical.json./--no-proxy
--no-proxy
localhost,127.0.0.1 and any NO_PROXY already set in your environment.--projectId
--projectId
INFISICAL_PROJECT_ID environment variable, then to .infisical.json.--client-id / --client-secret
--client-id / --client-secret
INFISICAL_UNIVERSAL_AUTH_CLIENT_ID / INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET environment variables.--token
--token
--allow-readable-brokered-secrets
--allow-readable-brokered-secrets
connect refuses to start in that case, since the agent would receive the real value directly and bypass the proxy, defeating the point of brokering it. This is a misconfiguration guardrail, not a security boundary: the real fix is to not grant the agent read access to brokered secrets. Use this flag only for the rare intentional case. Can also be set via INFISICAL_AGENT_PROXY_ALLOW_READABLE_BROKERED_SECRETS.falseShared
Flags accepted by every subcommand
Flags accepted by every subcommand
--domain
--domain
https://eu.infisical.com for EU Cloud, or your self-hosted URL). Can also be set via the INFISICAL_DOMAIN environment variable or the domain field in .infisical.json. Required for non-US Cloud users.https://app.infisical.com