#secrets-manager-run--flag-path. Here, the part before -- is the command’s heading, and the item is listed under it: #secrets-manager-run--flag-path is the --path flag under #secrets-manager-run.
Some commands moved, so a link to the CLI reference can use an anchor that no longer exists. To find where an old anchor points now:
- If the anchor exists on the CLI reference, use it as it is
- Otherwise, find the longest old anchor in the list of moved anchors that the link’s anchor starts with, and replace that part with its new anchor:
#<old>-<rest>becomes#<new>-<rest> - If the result doesn’t exist because the command no longer has that argument or flag, use the command’s anchor, the part before
--
#smis now#secrets-manager#sm-projects-listis now#secrets-manager-projects-get#sm-secrets-foldersis now#secrets-manager-folders#sm-secrets-setis now#secrets-manager-secrets-create#sm-secrets-folders-create--flag-nameis now#secrets-manager-folders-create--arg-name#sm-secrets-folders-delete--flag-nameis now#secrets-manager-folders-delete--arg-name#sm-secrets-generate-example-envis now#secrets-manager-secrets#dynamic-secretsis now#secrets-manager-dynamic-secrets#exportis now#secrets-manager-secrets-export#runis now#secrets-manager-run#secretsis now#secrets-manager-secrets#secrets-foldersis now#secrets-manager-folders#secrets-folders-create--flag-nameis now#secrets-manager-folders-create--arg-name#secrets-folders-delete--flag-nameis now#secrets-manager-folders-delete--arg-name#secrets-generate-example-envis now#secrets-manager-secrets#secrets-setis now#secrets-manager-secrets-create#pam-agenticis now#pam-access#pam-agentic-accessis now#pam-access
Global flags
Every command accepts these flags.Flags
--domain <string>(defaulthttps://app.infisical.com): The Infisical instance to connect to, such ashttps://eu.infisical.comfor EU Cloud or your self-hosted URL. Check out Set the Infisical instance for more information.--log-destination <string>: Where to write logs:stderrorstdout. Defaults tostderr. Can also be set withLOG_DESTINATION.--log-format <string>: How to format logs:consolefor colored text,plainfor text without color, orjsonfor structured logs. Defaults toconsole. SetNO_COLOR=1to drop the colors fromconsole. Can also be set withLOG_FORMAT.--log-level <string>(-l): The lowest level of log message to print:trace,debug,info,warn,error, orfatal. Defaults toinfo. Can also be set withLOG_LEVEL.--org <string>: The organization to use for this command, by name, slug, or ID. It overrides the profile’s organization without changing it. Can also be set withINFISICAL_ORG.--profile <string>: The login profile to use for this command. Runinfisical profile listto see your profiles. Can also be set withINFISICAL_PROFILE.--silent: Hide update notices, the notice naming the profile in use, and the warning that a token is overriding your login. Useful in scripts and CI.--telemetry(defaulttrue): Send usage telemetry to Infisical.
agent
infisical.address, which defaults to Infisical Cloud. The global --domain flag has no effect. To pass the configuration without a file, set INFISICAL_AGENT_CONFIG_BASE64 to the base64-encoded YAML. It takes precedence over --config.
For a daemon that only manages certificates, use infisical cert-manager agent.
Flags
--config <string>(defaultagent-config.yaml): The path to the agent’s YAML configuration file. Ignored whenINFISICAL_AGENT_CONFIG_BASE64is set.
Examples
Start the agent with the default config fileagent service
infisical-agent. To run several agents with different configs on one machine, install each agent with its own name.
- On Linux, you run the commands as root, and the service is a systemd service that logs to the systemd journal (
sudo journalctl -u <name>) - On Windows, you run the commands from a terminal opened with Run as administrator, and the service is a Windows service that logs to
%ProgramData%\Infisical\Agent\<name>.log(errors also go to the Windows Event Log)
start, stop, and uninstall only act on services that install created.
agent service install
/etc/infisical/agents/<name>.service-config.yamlon Linux%ProgramFiles%\Infisical\Agent\<name>\service-config.yamlon Windows, next to the service’s own copy ofinfisical.exe(to upgrade the service, uninstall it and install it again)
uninstall deletes the copy.
install refuses a config that:
- Sets
infisical.exit-after-auth: true, which would make the agent exit after its first render - Reads or writes files in
/home,/tmp, or/var/tmpon Linux, because the service can’t read/homeand has its own private/tmpand/var/tmp(keep these files in a directory such as/etc/infisical/agents)
Arguments
name(optional): The service’s name. Defaults toinfisical-agent.
Flags
--config <string>(defaultagent-config.yaml): The path to the agent’s YAML configuration file. The service doesn’t useINFISICAL_AGENT_CONFIG_BASE64.
Examples
Install a service on Linuxagent service start
Arguments
name(optional): The service to start. Defaults toinfisical-agent.
Examples
Start a service on Linuxagent service stop
infisical.revoke-credentials-on-shutdown: true, the agent revokes its credentials before it exits, which can take up to five minutes. The service starts again the next time the machine boots.
Arguments
name(optional): The service to stop. Defaults toinfisical-agent.
Examples
Stop a service on Linuxagent service uninstall
Arguments
name(optional): The service to remove. Defaults toinfisical-agent.
Examples
Remove a service on Linuxagent start
infisical agent, agent start ignores INFISICAL_AGENT_CONFIG_BASE64.
Flags
--config <string>(defaultagent-config.yaml): The path to the agent’s YAML configuration file. Can also be set withINFISICAL_AGENT_CONFIG_PATH.
Examples
Start the agent with a config set in the environmentagent-vault
av is an alias, so infisical av run works wherever infisical agent-vault run does.
Agent Vault commands don’t read domain from the project config file. To connect them to an instance other than US Cloud, pass --domain, set INFISICAL_DOMAIN, or log in to that instance.
agent-vault proxy
--data-dir if there is one, or exits.
You set the proxy’s traffic policy, exceptions, and poll interval in Infisical, not with flags.
Flags
--ca-cert <string>: Your own certificate authority to serve instead of the one Infisical generates, as PEM text, PEM encoded as base64, or the path to a PEM file. Pass it with--ca-key. Can also be set withINFISICAL_AGENT_VAULT_CA_CERT.--ca-key <string>: The ECDSA P-256 private key for--ca-cert, in the same formats. Can also be set withINFISICAL_AGENT_VAULT_CA_KEY, which keeps the key off the command line.--data-dir <string>: The directory where the proxy keeps a cache of its settings and certificate authority, if the directory is writable. The proxy starts from the cache if it can’t reach Infisical. Defaults to~/.infisical/agent-vault, or/etc/infisical/agent-vaultwhen run as root. Can also be set withINFISICAL_AGENT_VAULT_DATA_DIR.--log-file <string>: A file to also write logs to, as JSON lines. The file is appended to.--log-format <string>(defaultconsole): The format of the logs written to stderr:consoleorjson.--port <int>(default17323): The port to listen on, on all interfaces.0picks any free port, which the startup line reports. Can also be set withINFISICAL_AGENT_VAULT_PORT.--proxy-token <string>: The proxy token, which Infisical shows once when you create the proxy or rotate its token. Can also be set withINFISICAL_AGENT_VAULT_PROXY_TOKEN, which keeps it off the command line.
Examples
Start a proxyagent-vault run
- Pass
--session-token(or setINFISICAL_AGENT_VAULT_SESSION_TOKEN), to use an existing session that already exists in Infisical - Pass
--access-bundle(or setINFISICAL_AGENT_VAULT_ACCESS_BUNDLE), to create a session with that access bundle
--access-bundle, the command also needs the Agent Vault project that holds the access bundle. It reads the project in this order, and stops with an error if none is set:
--project-idINFISICAL_AGENT_VAULT_PROJECT_IDINFISICAL_PROJECT_ID
--session-token.
The CLI gives flags precedence over environment variables. If you pass either a session token or access bundle as a flag, the CLI will ignore any session token or access bundle that you’ve set as an environment variable.
--proxy or by setting INFISICAL_AGENT_VAULT_PROXY_ADDRESS.
The command starts the agent with HTTP_PROXY and HTTPS_PROXY set to the proxy’s address, and sets the variables that make the agent’s HTTP clients trust the proxy’s certificate. It also sets INFISICAL_AGENT_VAULT_URL to the URL of the Infisical instance that the proxy connects to, so the agent can list the services its session can use through the proxy. The agent inherits the rest of your environment, and the command exits with the agent’s exit code. It also gives the agent INFISICAL_AGENT_VAULT_SESSION_TOKEN, INFISICAL_AGENT_VAULT_PROXY_ADDRESS, INFISICAL_AGENT_VAULT_CA_FILE (unless you pass --no-ca-trust), and INFISICAL_DOMAIN (unless it’s already set), so the agent can run infisical agent-vault connect.
Before the agent starts, the command gets the session’s skills through the proxy (the access bundle’s, the ones picked from the project, and the ones sent with it), installs them in ~/.agents/skills, and links them for Claude Code and Hermes. It also installs Agent Vault’s built-in skill, infisical-agent-vault, which tells the agent how to work behind the proxy. The installed skills stay after the agent exits.
- To install the skills in another folder, pass
--skills-dir - To leave out only the built-in skill, pass
--no-agent-vault-skill - To start the agent without any skills, pass
--no-skills - To pick up skills that changed while the agent runs, restart the agent
claude, the command also adds the session’s MCP servers that are ready to Claude Code with --mcp-config, on top of any you pass, so Claude Code has their tools from the start. To leave them out, pass --no-mcp-servers.
For the folders the command links and replaces, see Skill folders.
Arguments
command(required): The agent’s command, after--. Everything after--is passed to it unchanged.
Flags
--access-bundle <stringArray>: The access bundle to create a session with, by name, such ascoding-agent. A session holds one access bundle, so pass the flag only once. Can’t be combined with--session-token. Can also be set withINFISICAL_AGENT_VAULT_ACCESS_BUNDLE.--ca-file <string>: Where to write the certificate authority fetched from the proxy. This is an output path, not a certificate to trust. Defaults toca-<proxy-id>.pemin~/.infisical/agent-vault, or/etc/infisical/agent-vaultwhen run as root, one file per proxy.--ca-fingerprint <string>: The SHA256 fingerprint of the proxy’s certificate authority, from the Proxies page. The command stops before writing anything or starting the agent if the proxy serves a different one. Accepted with or without theSHA256:prefix and colons.--client-id <string>: The client ID of the machine identity that creates the session, for--access-bundle. Can also be set withINFISICAL_UNIVERSAL_AUTH_CLIENT_ID.--client-secret <string>: The client secret of the machine identity that creates the session, for--access-bundle. Can also be set withINFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET.--keep-session: Leave a session created with--access-bundleactive when the agent exits, instead of revoking it. Can’t be combined with--session-token.--label <string>: A short description of what a session created with--access-bundleis for, shown on the Sessions page, such asnightly deploy. Up to 128 characters, without line breaks, tabs, or invisible characters. Can’t be combined with--session-token.--metadata <stringArray>: A key and value to attach to a session created with--access-bundle, askey=value, such asrunId=8812. Pass the flag once for each key. The value is everything after the first=, so it can contain=but the key can’t. The value can’t be empty. Up to 20 keys. A key can be up to 255 characters and a value up to 1020, and neither can contain line breaks, tabs, or invisible characters. Can’t be combined with--session-token.--no-agent-vault-skill: Start the agent without Agent Vault’s built-in skill,infisical-agent-vault, which tells the agent how to work behind the proxy and how to list its services. The session’s other skills are still installed.--no-skillsleaves out the built-in skill too.--no-ca-trust: Skip writing the certificate authority, setting the trust variables, and adding it to the macOS keychain, for a machine that already trusts this proxy.--ca-fingerprintis still checked.--no-mcp-servers: Start Claude Code without the session’s MCP servers. By default, if the agent’s command isclaude, the command adds the session’s MCP servers that are ready to it with--mcp-config.--no-proxy <string>: More hosts for the agent to reach directly instead of through the proxy, separated by commas. Always merged withlocalhost,127.0.0.1and anyNO_PROXYin your environment.--no-skills: Start the agent without installing any skills, including the built-ininfisical-agent-vaultskill. Can’t be combined with--skills-dir.--project-id <string>: The ID of the Agent Vault project to create the session in, for--access-bundle. If you leave it out, the CLI readsINFISICAL_AGENT_VAULT_PROJECT_ID, thenINFISICAL_PROJECT_ID. Can’t be combined with--session-token.--proxy <string>: The Agent Vault proxy’s address ashost:port, such as10.0.1.5:17323. A leadinghttp://orhttps://is dropped. Required unlessINFISICAL_AGENT_VAULT_PROXY_ADDRESSis set.--session-token <string>: A session token created in Infisical. The command never revokes this session. Can’t be combined with--access-bundle. Can also be set withINFISICAL_AGENT_VAULT_SESSION_TOKEN, which keeps it off the command line.--skills-dir <string>: The folder to install the session’s skills in, instead of~/.agents/skills. The CLI doesn’t link skills in this folder for Claude Code or Hermes. Can’t be empty, and can’t be combined with--no-skills.--ttl <string>(defaultnever): How long a session created with--access-bundlelasts: one number and one unit, such as30m,8h, or7d(not2h30m), ornever. Defaults toneverbecause the session is revoked when the agent exits, so an expiry only governs one that outlives the command. Can’t be combined with--session-token.
Environment variables
INFISICAL_AGENT_VAULT_ACCESS_BUNDLE: The access bundle to create a session with, by name. Used if neither--access-bundlenor--session-tokenis passed.INFISICAL_AGENT_VAULT_PROJECT_ID: The ID of the Agent Vault project to create the session in. Used if--project-idisn’t passed.INFISICAL_AGENT_VAULT_PROXY_ADDRESS: The Agent Vault proxy’s address ashost:port. Used if--proxyisn’t passed.INFISICAL_AGENT_VAULT_SESSION_TOKEN: A session token created in Infisical, which keeps the token off the command line. Used if neither--session-tokennor--access-bundleis passed.INFISICAL_PROJECT_ID: The ID of the Agent Vault project to create the session in. Used if--project-idandINFISICAL_AGENT_VAULT_PROJECT_IDaren’t set.INFISICAL_UNIVERSAL_AUTH_CLIENT_ID: The client ID of the machine identity that creates the session. Used if--client-idisn’t passed.INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET: The client secret of the machine identity that creates the session. Used if--client-secretisn’t passed.
Examples
Run an agent with a session tokenagent-vault connect
127.0.0.1 for each database or SSH service you name, or for every one in the session with --all. Each connection goes to the Agent Vault proxy over TLS, and the proxy logs in with the service’s account, so the client uses any username and no password. The command keeps running. Once the ports are open, it prints each service’s address and an example command, and the ports stay open until you stop the command with Ctrl+C.
Before it opens any port, the command checks each service with the proxy. If the proxy refuses a service you named, the command stops with the proxy’s reason. With --all, it skips each refused service and prints its name and the reason. It stops only if the proxy refuses every service.
Under infisical agent-vault run, the command reads the session token, the proxy’s address, and the proxy’s certificate authority from the variables run sets, so it needs no flags. Before it sends the session token to the proxy, it checks the proxy’s certificate authority. If you pass --ca-fingerprint, it checks against that fingerprint only. Otherwise, it checks against the file run wrote, then against the fingerprints Infisical lists for the session’s proxies. If none of them matches, it refuses to connect.
Arguments
service: The names of the database or SSH services to open ports for. Required unless you pass--all.
Flags
--all: Open a port for every database and SSH service in the session, skipping any the proxy refuses. Can’t be combined with service names.--ca-fingerprint <string>: The SHA256 fingerprint of the proxy’s certificate authority, from the Certificate Authority column on the Proxies page. The command trusts the proxy only if it serves this certificate authority, and checks nothing else. Accepted with or without theSHA256:prefix and colons.--port <int>: The local port to open. Works only with one named service. Without it, the command picks a free port.--proxy <string>: The Agent Vault proxy’s address ashost:port, such as10.0.1.5:17323. A leadinghttp://orhttps://is dropped. Required unlessINFISICAL_AGENT_VAULT_PROXY_ADDRESSis set.--session-token <string>: The session token. Can also be set withINFISICAL_AGENT_VAULT_SESSION_TOKEN. Prefer the variable, because other users on the machine can read anything on a command line.
Environment variables
INFISICAL_AGENT_VAULT_CA_FILE: The proxy’s certificate authority file thatinfisical agent-vault runwrote. The command trusts the proxy if it serves a certificate authority in this file.INFISICAL_AGENT_VAULT_PROXY_ADDRESS: The Agent Vault proxy’s address ashost:port. Used if--proxyisn’t passed.INFISICAL_AGENT_VAULT_SESSION_TOKEN: The session token. Used if--session-tokenisn’t passed.
Examples
Open ports for two servicesinfisical agent-vault run
agent-vault sessions
agent-vault sessions create
-o json or -o yaml to also print the session’s ID, project ID, access bundle, label, metadata, and expiry.
The command reads the Agent Vault project in this order, and stops with an error if none is set:
--project-idINFISICAL_AGENT_VAULT_PROJECT_IDINFISICAL_PROJECT_ID
--project-id, the command prints the project’s ID and where it came from to stderr, unless you pass --silent or -o.
The session stays active until it expires or you revoke it with infisical agent-vault sessions revoke. Because --ttl defaults to never, set a --ttl unless you always revoke the session.
Flags
--access-bundle <stringArray>(required): The access bundle to create the session with, by name, such ascoding-agent. A session holds one access bundle, so pass the flag only once. Can also be set withINFISICAL_AGENT_VAULT_ACCESS_BUNDLE.--client-id <string>: The client ID of the machine identity that creates the session. Can also be set withINFISICAL_UNIVERSAL_AUTH_CLIENT_ID.--client-secret <string>: The client secret of the machine identity that creates the session. Can also be set withINFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET.--label <string>: A short description of what the session is for, shown on the Sessions page, such asnightly deploy. Up to 128 characters.--metadata <stringArray>: A key and value to attach to the session, askey=value, such asrunId=8812. Pass the flag once for each key. The value is everything after the first=, so it can contain=but the key can’t. The value can’t be empty. Up to 20 keys. A key can be up to 255 characters and a value up to 1020, and neither can contain line breaks, tabs, or invisible characters.--output <string>(-o): Print the session’s ID, token, project ID, access bundle, label, metadata, and expiry asjsonoryaml, instead of only the token.--project-id <string>: The ID of the Agent Vault project to create the session in. If you leave it out, the CLI readsINFISICAL_AGENT_VAULT_PROJECT_ID, thenINFISICAL_PROJECT_ID.--ttl <string>(defaultnever): How long the session lasts: one number and one unit, such as30m,8h, or7d(not2h30m), ornever.
Environment variables
INFISICAL_AGENT_VAULT_ACCESS_BUNDLE: The access bundle to create the session with, by name. Used if--access-bundleisn’t passed.INFISICAL_AGENT_VAULT_PROJECT_ID: The ID of the Agent Vault project to create the session in. Used if--project-idisn’t passed.INFISICAL_PROJECT_ID: The ID of the Agent Vault project to create the session in. Used if--project-idandINFISICAL_AGENT_VAULT_PROJECT_IDaren’t set.INFISICAL_UNIVERSAL_AUTH_CLIENT_ID: The client ID of the machine identity that creates the session. Used if--client-idisn’t passed.INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET: The client secret of the machine identity that creates the session. Used if--client-secretisn’t passed.INFISICAL_TOKEN: A machine identity access token to create the session as. Used if no client ID and client secret are set.
Examples
Create a session and keep its token in a variableagent-vault sessions revoke
- Pass the session’s ID to revoke it as your logged-in user or as a machine identity that has access to the session
- Pass
--session-tokenwith the session token to revoke the session without logging in, such as from the agent that holds the token
INFISICAL_AGENT_VAULT_SESSION_TOKEN. If you pass a session ID, the command ignores that variable.
If the session is already revoked or expired, the command still succeeds.
Arguments
session-id: The ID of the session to revoke, as shown on the Sessions page. Leave it out to revoke by session token.
Flags
--client-id <string>: The client ID of the machine identity to revoke the session as, when you revoke by ID. Can also be set withINFISICAL_UNIVERSAL_AUTH_CLIENT_ID.--client-secret <string>: The client secret of the machine identity to revoke the session as, when you revoke by ID. Can also be set withINFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET.--session-token <string>: The session token of the session to revoke, instead of its ID. Can’t be combined with a session ID. Can also be set withINFISICAL_AGENT_VAULT_SESSION_TOKEN.
Environment variables
INFISICAL_AGENT_VAULT_SESSION_TOKEN: The session token of the session to revoke. Used if neither a session ID nor--session-tokenis passed.
Examples
Revoke a session by its IDagent-vault skills
- infisical agent-vault skills push adds a skill from a folder or publishes a new version of it
- infisical agent-vault skills get lists the skills in a project, or shows one skill and its files
- infisical agent-vault skills pull downloads a skill’s files to a folder, so you can edit them and push them again
- infisical agent-vault skills delete deletes a skill
agent-vault skills push
name in the folder’s SKILL.md decides which skill in the project the folder updates:
- If no skill has that name, the command creates the skill
- If a skill has that name, the command publishes the folder as the skill’s next version
- If the files match the skill’s latest version, the command prints
unchangedand doesn’t create a version
.DS_Store, and refuses a folder that holds a symbolic link. To push as a machine identity from a script or CI, pass --client-id and --client-secret, or set INFISICAL_TOKEN to the identity’s access token. The user or machine identity needs the Admin role in the Agent Vault project.
The command reads the project the same way as infisical agent-vault sessions create: from --project-id, then INFISICAL_AGENT_VAULT_PROJECT_ID, then INFISICAL_PROJECT_ID. It stops with an error if none is set.
Arguments
folder(required): The folder that holds one skill, withSKILL.mdat its root.
Flags
--client-id <string>: The client ID of the machine identity to push as. Can also be set withINFISICAL_UNIVERSAL_AUTH_CLIENT_ID.--client-secret <string>: The client secret of the machine identity to push as. Can also be set withINFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET.--project-id <string>: The ID of the Agent Vault project to push the skill to. If you leave it out, the CLI readsINFISICAL_AGENT_VAULT_PROJECT_ID, thenINFISICAL_PROJECT_ID.
Environment variables
INFISICAL_AGENT_VAULT_PROJECT_ID: The ID of the Agent Vault project to push the skill to. Used if--project-idisn’t passed.INFISICAL_PROJECT_ID: The ID of the Agent Vault project to push the skill to. Used if--project-idandINFISICAL_AGENT_VAULT_PROJECT_IDaren’t set.INFISICAL_UNIVERSAL_AUTH_CLIENT_ID: The client ID of the machine identity to push as. Used if--client-idisn’t passed.INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET: The client secret of the machine identity to push as. Used if--client-secretisn’t passed.INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN: A machine identity access token to push as. Used if no client ID and client secret are set.INFISICAL_TOKEN: A machine identity access token to push as. Used if no client ID and client secret are set andINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKENisn’t set.
Examples
Push a skill as the logged-in useragent-vault skills get
--client-id and --client-secret, or set INFISICAL_TOKEN to the identity’s access token. Without them, the command runs as your logged-in user.
The command reads the project the same way as infisical agent-vault skills push: from --project-id, then INFISICAL_AGENT_VAULT_PROJECT_ID, then INFISICAL_PROJECT_ID.
Arguments
name(optional): The name of the skill to show. Without it, the command lists every skill in the project.
Flags
--client-id <string>: The client ID of the machine identity to get the skills as. Can also be set withINFISICAL_UNIVERSAL_AUTH_CLIENT_ID.--client-secret <string>: The client secret of the machine identity to get the skills as. Can also be set withINFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET.--output <string>(-o): Print the skills, or the one skill and its files, asjsonoryamlinstead of a table.--project-id <string>: The ID of the Agent Vault project that holds the skills. If you leave it out, the CLI readsINFISICAL_AGENT_VAULT_PROJECT_ID, thenINFISICAL_PROJECT_ID.
Environment variables
INFISICAL_AGENT_VAULT_PROJECT_ID: The ID of the Agent Vault project that holds the skills. Used if--project-idisn’t passed.INFISICAL_PROJECT_ID: The ID of the Agent Vault project that holds the skills. Used if--project-idandINFISICAL_AGENT_VAULT_PROJECT_IDaren’t set.INFISICAL_UNIVERSAL_AUTH_CLIENT_ID: The client ID of the machine identity to get the skills as. Used if--client-idisn’t passed.INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET: The client secret of the machine identity to get the skills as. Used if--client-secretisn’t passed.INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN: A machine identity access token to get the skills as. Used if no client ID and client secret are set.INFISICAL_TOKEN: A machine identity access token to get the skills as. Used if no client ID and client secret are set andINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKENisn’t set.
Examples
List the skills in a projectagent-vault skills pull
--version, and prints the version and the folder:
--force.
pull and push skip hidden files, so a skill’s hidden files are lost if you pull it and push it again.
An admin of the project can pull any version of any skill. A member can pull only the latest version of the skills on the access bundles they’ve been granted. To pull a skill, edit it, and push it again, you need the Admin role, because skills push needs it. To run as a machine identity from a script or CI, pass --client-id and --client-secret, or set INFISICAL_TOKEN to the identity’s access token. Without them, the command runs as your logged-in user.
The command reads the project the same way as infisical agent-vault skills push: from --project-id, then INFISICAL_AGENT_VAULT_PROJECT_ID, then INFISICAL_PROJECT_ID.
Arguments
name(required): The name of the skill to download.folder(optional): The folder to save the skill’s files in. Defaults to a folder with the skill’s name in the current directory.
Flags
--client-id <string>: The client ID of the machine identity to pull as. Can also be set withINFISICAL_UNIVERSAL_AUTH_CLIENT_ID.--client-secret <string>: The client secret of the machine identity to pull as. Can also be set withINFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET.--force: Replace the folder if it already exists. The folder then holds only the skill’s files, so the command deletes every other file in it, including hidden files such as.git.--project-id <string>: The ID of the Agent Vault project that holds the skill. If you leave it out, the CLI readsINFISICAL_AGENT_VAULT_PROJECT_ID, thenINFISICAL_PROJECT_ID.--version <int>: The version of the skill to download, instead of the latest. Only an admin of the project can download a version other than the latest.
Environment variables
INFISICAL_AGENT_VAULT_PROJECT_ID: The ID of the Agent Vault project that holds the skill. Used if--project-idisn’t passed.INFISICAL_PROJECT_ID: The ID of the Agent Vault project that holds the skill. Used if--project-idandINFISICAL_AGENT_VAULT_PROJECT_IDaren’t set.INFISICAL_UNIVERSAL_AUTH_CLIENT_ID: The client ID of the machine identity to pull as. Used if--client-idisn’t passed.INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET: The client secret of the machine identity to pull as. Used if--client-secretisn’t passed.INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN: A machine identity access token to pull as. Used if no client ID and client secret are set.INFISICAL_TOKEN: A machine identity access token to pull as. Used if no client ID and client secret are set andINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKENisn’t set.
Examples
Pull the latest version of a skillagent-vault skills delete
--yes. If there’s no terminal to ask in, such as in a script or an agent, and you don’t pass --yes, the command deletes nothing, fails with confirmation_required, and prints the command to run again with --yes.
The command needs --project-id, even if you’ve set the project in an environment variable.
Arguments
name(required): The name of the skill to delete.
Flags
--client-id <string>: The client ID of the machine identity to delete as. Can also be set withINFISICAL_UNIVERSAL_AUTH_CLIENT_ID.--client-secret <string>: The client secret of the machine identity to delete as. Can also be set withINFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET.--output <string>(-o): Print the deleted skill asjsonoryaml.--project-id <string>(required): The ID of the Agent Vault project that holds the skill.--yes(-y): Delete without asking for confirmation. Required when there’s no terminal to ask in, such as in a script or an agent.
Environment variables
INFISICAL_UNIVERSAL_AUTH_CLIENT_ID: The client ID of the machine identity to delete as. Used if--client-idisn’t passed.INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET: The client secret of the machine identity to delete as. Used if--client-secretisn’t passed.INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN: A machine identity access token to delete as. Used if no client ID and client secret are set.INFISICAL_TOKEN: A machine identity access token to delete as. Used if no client ID and client secret are set andINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKENisn’t set.
Examples
Delete a skillbootstrap
--output=k8-secret, the command writes the result to a Kubernetes secret instead, creating it or updating it if it exists. It must run inside a Kubernetes pod whose service account can get, create, and update secrets in the namespace.
Flags
--domain <string>(required): The URL of the Infisical instance to bootstrap. Can also be set withINFISICAL_DOMAIN, or the olderINFISICAL_API_URL.--email <string>(required): The email address of the admin user to create. Can also be set withINFISICAL_ADMIN_EMAIL.--ignore-if-bootstrapped: Exit without an error message if bootstrapping fails, for example because the instance is already bootstrapped. Use it to make scripts safe to run twice.--k8-secret-name <string>: The name of the Kubernetes secret to create or update. Required with--output=k8-secret.--k8-secret-namespace <string>: The namespace of the Kubernetes secret. Required with--output=k8-secret.--k8-secret-template <string>(default{"data":{"token":"{{.Identity.Credentials.Token}}"}}): A Go template that renders the secret’sdataandstringDataas JSON, for--output=k8-secret. It can read the response fields, such as.Identity.Credentials.Token,.Organization.ID, and.User.Email, and use theencodeBase64function.--organization <string>(required): The name of the organization to create. Can also be set withINFISICAL_ADMIN_ORGANIZATION.--output <string>: Where to send the result.k8-secretwrites it to a Kubernetes secret. Any other value, or none, prints it as JSON.--password <string>(required): The password of the admin user to create. Can also be set withINFISICAL_ADMIN_PASSWORD.
Examples
Bootstrap an instancecert-manager
cert-manager agent
SIGINT, SIGTERM, or SIGQUIT.
On restart, the agent reuses each certificate it already issued instead of requesting a new one. It tracks each certificate in a hidden state file next to it, named .<certificate-file>.infisical-agent-state.json. The agent issues a new certificate if that file is missing, the certificate files changed on disk, or the certificate’s configuration changed. Certificates configured with certificate-id, csr, or csr-path aren’t reused.
The configuration can’t include secret templates. To render secrets as well, use infisical agent. To pass the configuration without a file, set INFISICAL_AGENT_CONFIG_BASE64 to the base64-encoded YAML.
Flags
--config <string>(defaultcertificate-agent-config.yaml): The path to the agent’s YAML configuration file. Ignored whenINFISICAL_AGENT_CONFIG_BASE64is set.--verbose(-v): Log at debug level, for troubleshooting.
Examples
Start the certificate agentgateway
gateway start
--enroll-method, the gateway authenticates as itself. With token, it exchanges a one-time enrollment token from Infisical for an access token on first start. With aws, gcp, or kubernetes, it proves its cloud identity on each start. It saves its credentials to ~/.infisical/gateways/<name>.conf, or /etc/infisical/gateways/<name>.conf when run as root, so later starts need only the name.
With --auth-method or --token, the gateway logs in as a machine identity instead, using the same flags as infisical login.
Arguments
name(required): The gateway’s name. Use the same name on every start so the gateway reuses its saved credentials. Can also be set withINFISICAL_GATEWAY_NAME.
Flags
--auth-method <string>: Log in as a machine identity with this method instead of enrolling:universal-auth,kubernetes,azure,gcp-id-token,gcp-iam,aws-iam, oroidc-auth. Can also be set withINFISICAL_AUTH_METHOD.--bind <string>: The localhost:portto listen on when Infisical connects to the gateway directly. Defaults to all interfaces on the configured direct port. Can also be set withINFISICAL_GATEWAY_BIND_ADDRESS.--client-id <string>: The machine identity’s client ID, for--auth-method=universal-auth. Can also be set withINFISICAL_UNIVERSAL_AUTH_CLIENT_ID.--client-secret <string>: The machine identity’s client secret, for--auth-method=universal-auth. Can also be set withINFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET.--domain <string>: The Infisical instance to connect to. Without it, the gateway uses the domain it saved when it enrolled, then your active profile’s domain.--enroll-method <string>: How the gateway authenticates on its own:tokenfor a one-time enrollment token from Infisical,aws,gcp, orkubernetes. Can also be set withINFISICAL_GATEWAY_ENROLL_METHOD.--gateway-id <string>: The gateway’s ID from Infisical. Required with--enroll-method=aws,gcp, orkubernetes, unless the gateway saved it on an earlier start. Can also be set withINFISICAL_GATEWAY_ID.--gcp-auth-type <string>: How the gateway proves its GCP identity with--enroll-method=gcp:gcereads a token from the instance metadata server, covering Compute Engine VMs and GKE workload identity, andiamsigns a JWT through the IAM Credentials API. Defaults togce. Can also be set withINFISICAL_GATEWAY_GCP_AUTH_TYPE.--jwt <string>: The JWT to exchange for an access token, for--auth-method=oidc-auth.--listen-address <string>: The stablehost:portthe gateway advertises so Infisical can connect to it directly instead of through a relay. Can also be set withINFISICAL_GATEWAY_LISTEN_ADDRESS.--machine-identity-id <string>: The machine identity’s ID, for every--auth-methodexceptuniversal-auth.--name <string>(deprecated): Deprecated: pass the name as an argument instead, as ininfisical gateway start <name>.--organization-slug <string>: The slug of a sub-organization to scope the machine identity’s session to. Without it, the session uses the organization the machine identity was created in.--pam-session-recording-path <string>: The directory to store PAM session recordings in. Defaults to/var/lib/infisical/session_recordings. Can also be set withINFISICAL_PAM_SESSION_RECORDING_PATH.--pkcs11-module <string>: The absolute path to a PKCS#11 driver, such as/opt/fortanix/pkcs11/fortanix_pkcs11.so. The gateway loads it and serves HSM operations through it. Can also be set withINFISICAL_PKCS11_MODULE.--relay <string>(deprecated): Deprecated: use--target-relay-nameinstead.--service-account-key-file-path <string>: The path to a GCP service account key file, for--auth-method=gcp-iam. Can also be set withINFISICAL_GCP_IAM_SERVICE_ACCOUNT_KEY_FILE_PATH.--service-account-token-path <string>: The path to the Kubernetes service account token, for--auth-method=kubernetes. Defaults to/var/run/secrets/kubernetes.io/serviceaccount/token. Can also be set withINFISICAL_KUBERNETES_SERVICE_ACCOUNT_TOKEN_PATH.--target-relay-name <string>: The relay to connect through. Without it, the gateway picks the healthy relay with the lowest latency.--token <string>: With--enroll-method=token, the one-time enrollment token. Otherwise, a machine identity access token to connect with, which can also be set withINFISICAL_TOKEN.
Examples
Enroll and start a gatewaygateway systemd
gateway systemd install
/etc/infisical/gateways/<name>.conf. Start it with sudo systemctl start <name>. Run the command as root on Linux.
Arguments
name(required): The gateway’s name. The service is named after it.
Flags
--bind <string>: The localhost:portto listen on when Infisical connects to the gateway directly. Defaults to all interfaces on the configured direct port.--domain <string>: The Infisical instance to connect to.--enroll-method <string>: How the gateway authenticates:tokenfor a one-time enrollment token, orawsorgcpto prove its cloud identity each time the service starts.kubernetesisn’t available, because in-cluster gateways aren’t managed by systemd.--gateway-id <string>: The gateway’s ID from Infisical. Required with--enroll-method=awsor--enroll-method=gcp.--gcp-auth-type <string>: How the gateway proves its GCP identity with--enroll-method=gcp:gceoriam. Defaults togce.--listen-address <string>: The stablehost:portthe gateway advertises so Infisical can connect to it directly instead of through a relay.--log-file <string>: A file to write the service’s logs to, such as/var/log/infisical/gateway.log. Without it, logs aren’t written to a file.--name <string>(deprecated): Deprecated: pass the name as an argument instead, as ininfisical gateway systemd install <name>.--pkcs11-module <string>: The absolute path to a PKCS#11 driver. The service starts the gateway with the driver loaded for HSM operations.--relay <string>(deprecated): Deprecated: use--target-relay-nameinstead.--service-account-key-file-path <string>: The path to a GCP service account key file, for--gcp-auth-type=iam. Use an absolute path outside/homeand/tmp, such as one in/etc/infisical, because the service can’t read those directories.--target-relay-name <string>: The relay to connect through. Without it, the gateway picks the healthy relay with the lowest latency.--token <string>: With--enroll-method=token, the one-time enrollment token. Otherwise, a machine identity access token.
Examples
Install a gateway servicegateway systemd uninstall
Arguments
name(optional): The gateway whose service to remove. Without it, the command removes the singleinfisical-gatewayservice that older CLI versions installed.
Examples
Remove a gateway serviceinit
.infisical.yaml, so later commands in this directory and its subdirectories know which project to use. It needs a user login, and starts one if you have no profile.
If the current directory already has an .infisical.yaml or a legacy .infisical.json, the command asks before writing a new .infisical.yaml. The new file holds only the project ID, and the CLI reads it instead of the old file, so settings you added, such as the default environment, no longer apply. To keep those settings, edit the existing file instead of running init. See project config for the file format.
If you run
init without a terminal, such as in CI or from a script, the command never prompts. It exits with an error unless you pass --project-id, and it doesn’t replace an existing .infisical.yaml or legacy .infisical.json. To link a different project, edit secrets-management.project-id in .infisical.yaml, or workspaceId in a legacy .infisical.json.Flags
--project-id <string>: Project ID to link this directory to. When set, skips the interactive org and project pickers and writes.infisical.yamldirectly. Find the ID with infisical secrets-manager projects get.
Examples
Link the current directory to a projectkmip
kmip start
--enroll-method, or as a machine identity with --identity-client-id and --identity-client-secret.
Arguments
server-name(required): The KMIP server’s name. Can also be passed with--server-nameorINFISICAL_KMIP_SERVER_NAME.
Flags
--certificate-ttl <string>: How long the server’s certificate is valid. Defaults to1y. Can also be set withINFISICAL_KMIP_CERTIFICATE_TTL.--domain <string>: The Infisical instance to connect to.--enroll-method <string>: How the server authenticates on its own:tokenfor a one-time enrollment token, oraws. When set, the machine identity flags are ignored.--hostnames-or-ips <string>: The hostnames or IP addresses clients use to reach the server, separated by commas. They go into its certificate. Can also be set withINFISICAL_KMIP_HOSTNAMES_OR_IPS.--identity-auth-method <string>(defaultuniversal-auth): How to log in as a machine identity when you don’t use--enroll-method.--identity-client-id <string>: The machine identity’s client ID. Can also be set withINFISICAL_UNIVERSAL_AUTH_CLIENT_ID.--identity-client-secret <string>: The machine identity’s client secret. Can also be set withINFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET.--kmip-server-id <string>: The KMIP server’s ID from Infisical, for--enroll-method=aws.--listen-address <string>: The address to listen on. Defaults tolocalhost:5696. Can also be set withINFISICAL_KMIP_LISTEN_ADDRESS.--server-name <string>: The server’s name, if you don’t pass it as an argument.--token <string>: The one-time enrollment token, for--enroll-method=token.
Examples
Enroll and start a KMIP serverkmip systemd
kmip systemd install
Arguments
server-name(required): The KMIP server’s name. Can also be passed with--server-name.
Flags
--certificate-ttl <string>: How long the server’s certificate is valid.--domain <string>: The Infisical instance to connect to.--enroll-method <string>: How the server authenticates on its own:tokenoraws. When set, the machine identity flags are ignored.--hostnames-or-ips <string>: The hostnames or IP addresses clients use to reach the server, separated by commas.--identity-client-id <string>: The machine identity’s client ID, when you don’t use--enroll-method.--identity-client-secret <string>: The machine identity’s client secret, when you don’t use--enroll-method.--kmip-server-id <string>: The KMIP server’s ID from Infisical, for--enroll-method=aws.--listen-address <string>: The address to listen on.--server-name <string>: The server’s name, if you don’t pass it as an argument.--token <string>: The one-time enrollment token, for--enroll-method=token.
Examples
Install a KMIP server servicekmip systemd uninstall
Examples
Remove the KMIP server servicelogin
infisical login opens a browser, and falls back to prompts in the terminal if the browser login fails. Pass --interactive to go straight to the prompts, or --email, --password, and --organization-id to log in with no prompts at all.
Without a terminal (when standard input isn’t a TTY), the browser login waits for the browser to send the session back to the CLI, and doesn’t offer to let you paste a token instead.
A user login is stored as a profile: an account on an Infisical instance, plus the organization it uses. Without --save-as or --profile, the profile is named after the account and organization, such as [email protected]. Credentials are kept in your system keyring; see infisical vault to store them elsewhere.
If you log in as a machine identity (any --method other than user), the CLI doesn’t create a profile. It prints an access token, which later commands read from --token or INFISICAL_TOKEN.
For any instance other than US Cloud, pass --domain or set INFISICAL_DOMAIN.
Flags
--clear-domains: Remove all saved self-hosted domains from the CLI’s config file, then exit without logging in.--client-id <string>: The client ID of a machine identity, for--method=universal-auth. Can also be set withINFISICAL_UNIVERSAL_AUTH_CLIENT_ID.--client-secret <string>: The client secret of a machine identity, for--method=universal-auth. Can also be set withINFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET.--email <string>: Your email address, for logging in without prompts along with--passwordand--organization-id. Can also be set withINFISICAL_EMAIL.--interactive(-i): Prompt for your email and password in the terminal instead of opening a browser.--jwt <string>: The JWT to exchange for an access token, for--method=oidc-authand--method=jwt-auth. Can also be set withINFISICAL_JWT.--machine-identity-id <string>: The ID of the machine identity to log in as. Required for every--methodexceptuseranduniversal-auth. Can also be set withINFISICAL_MACHINE_IDENTITY_ID.--method <string>(defaultuser): How to authenticate:userfor your own account, or a machine identity method:universal-auth,kubernetes,azure,gcp-id-token,gcp-iam,aws-iam,oidc-auth, orjwt-auth.--oidc-jwt <string>(deprecated): Deprecated: use--jwtinstead. The JWT for--method=oidc-auth.--organization-id <string>: The organization to log in to, for logging in without prompts. Not needed with--profile, which already has one. Can also be set withINFISICAL_ORGANIZATION_ID.--organization-slug <string>: The slug of a sub-organization to scope a machine identity’s session to. Without it, the session uses the organization the machine identity was created in.--password <string>: Your password, for logging in without prompts. Can also be set withINFISICAL_PASSWORD.--plain: Print only the access token, with no other output. Combine with--silentto capture the token in a variable.--save-as <string>: Store this user login as a profile with this name, creating the profile or replacing its session. To sign back in to an existing profile, pass--profileinstead.--service-account-key-file-path <string>: The path to a GCP service account key file, for--method=gcp-iam. Can also be set withINFISICAL_GCP_IAM_SERVICE_ACCOUNT_KEY_FILE_PATH.--service-account-token-path <string>: The path to the Kubernetes service account token, for--method=kubernetes. Defaults to/var/run/secrets/kubernetes.io/serviceaccount/token. Can also be set withINFISICAL_KUBERNETES_SERVICE_ACCOUNT_TOKEN_PATH.
Examples
Log in through the browserlogin status
Flags
--json: Print the status as JSON.--token <string>: A machine identity access token to inspect instead of the active session or environment variables.
Examples
Check the current sessionlogout
infisical login --profile <name> signs back in without setting it up again. To remove the profile, run infisical profile delete.
Without --all or --profile, the command logs out of the profile in effect. See infisical profile for how that profile is chosen.
Flags
--all: Log out of every profile on this machine.--local-only: Remove the stored credentials without revoking the session on the server. The session stays valid until it expires.
Examples
Log out of the current profilemigrate-config
.infisical.json into .infisical.yaml. The command looks for the project config in the current directory, then in each parent directory. It writes .infisical.yaml next to the file it finds, copies every setting into it, and deletes .infisical.json.
If the project already uses .infisical.yaml, the command changes nothing. It warns you when a leftover .infisical.json sits in the same directory, because .infisical.yaml takes precedence and the old file is no longer read. See Migrate to .infisical.yaml for the full steps.
Examples
Convert the legacy project configorg
--org to any command to use a different organization for that command only.
org list
Examples
List your organizationsorg switch
--org to that command instead. To keep a second organization available at the same time, give it its own profile with infisical profile create.
Arguments
organization(optional): The organization to use, by name, slug, or ID. Without it, the CLI asks you to pick one.
Flags
--org-id <string>(deprecated): Deprecated: pass the organization as an argument instead. The ID of the organization to use.
Examples
Pick an organization from a listpam
infisical pam access <folder/account> -- <command>. PAM for AI agents describes how an agent uses these commands.
pam access
--token, --auth-method, INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN or INFISICAL_TOKEN, or INFISICAL_AUTH_METHOD, checked in that order. Otherwise, it runs as the user you logged in as with infisical login.
With a command after --, the CLI opens the session, runs the command once, ends the session, and exits with the command’s exit code. SSH accounts run the command on the target. Database, Redis, Snowflake, Kubernetes, GCP, and Azure accounts run it on your machine, pointed at a local proxy:
INFISICAL_PAM_HOST,INFISICAL_PAM_PORT, andINFISICAL_PAM_URLhold the proxy’s address and connection string- The variables each client reads are set too:
PGHOST,PGPORT,PGUSER, andPGDATABASEfor PostgreSQL and CockroachDB,MYSQL_HOSTandMYSQL_TCP_PORTfor MySQL,SQLCMDSERVER,SQLCMDUSER, andSQLCMDDBNAMEfor SQL Server,SNOWSQL_ACCOUNT,SNOWSQL_USER, andSNOWSQL_PWDfor Snowflake,KUBECONFIGfor Kubernetes, which points at a temporary file rather than your own kubeconfig, theCLOUDSDK_PROXY_*,CLOUDSDK_AUTH_ACCESS_TOKEN_FILE, andCLOUDSDK_CORE_CUSTOM_CA_CERTS_FILEsettings forgcloud, andAZURE_CONFIG_DIRandHTTPS_PROXYforaz, which the CLI signs in before it runs the command - Any username works and no password is needed (Oracle needs the placeholder password that
infisical pam accounts get <folder/account>shows)
HTTPS_PROXY, AWS_CA_BUNDLE, and placeholder credentials, and the gateway signs each AWS request. AWS IAM accounts without a gateway run the command with the session’s temporary credentials in AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_SESSION_TOKEN, and the CLI stops it when they expire.
Your shell expands variables before the CLI sets them. To use one of these variables in the command, wrap the command in sh -c '...'. A host or port in a MySQL option file, such as ~/.my.cnf or /etc/my.cnf, overrides MYSQL_HOST and MYSQL_TCP_PORT, and mysql then connects directly instead of through the proxy. Pass the address as flags instead: -- sh -c 'mysql --no-defaults -h "$INFISICAL_PAM_HOST" -P "$INFISICAL_PAM_PORT" -e "select 1"'. Windows accounts can’t run a command after --. To use one from a script or an agent, start the RDP proxy in the background and open the .rdp file it prints with an RDP client.
Without a command, SSH accounts connect you to a shell on the target. Pass --proxy to start a local proxy instead. If no terminal is attached, the CLI starts the proxy instead of a shell. For database, Redis, Snowflake, Kubernetes, GCP, Azure, and Windows accounts, and AWS IAM accounts with a gateway, the CLI starts a local proxy on 127.0.0.1 and prints how to connect to it. For AWS IAM accounts without a gateway, the CLI writes temporary credentials to your AWS credentials file instead. The page for each account type describes how to connect. A proxy runs until you press Ctrl+C or the session expires, and the CLI then restores anything it changed, such as your kubeconfig. To use several database, Redis, or SSH accounts at once, such as to copy data between two databases, start a proxy for each in the background with its own --port, such as infisical pam access prod/orders-db --port 15432 < /dev/null > orders-db.log 2>&1 &. Stop each one with kill, which ends its session. Kubernetes and GCP proxies edit your shared kubeconfig and gcloud configuration, so stopping one breaks the others. For those accounts, run one command per account with -- instead. In a terminal, Azure accounts and AWS IAM accounts with a gateway also open a shell that uses the proxy. Ctrl+C in that shell stops only the running command, so type exit to end the session.
In a terminal, the CLI asks before it files an access request for an account that requires approval, and has you complete MFA in your browser. Without a terminal, such as when an AI agent runs it, the CLI never prompts:
- Approval: the CLI files an access request with
--reasonand--durationand exits with an error saying the request is waiting (if a request is already waiting, it files nothing new). If an auto-approval rule approves the request, the CLI connects right away - MFA: the CLI exits with an error that has a link where a person completes verification
- Login: if you aren’t logged in or your login expired, the CLI exits with an error instead of starting a login
infisical pam accounts get <folder/account>. After approval, run the command again. After a person completes MFA, run the command again with --mfa-session and the value from the error.
Every error says what went wrong. Most errors also give the command to run next. The CLI’s own errors exit with 1. A command that can’t be started exits with 127, and a command stopped by a signal exits with 128 plus the signal number.
Arguments
path(required): The account to open, asfolder/account. A leading/is optional.command(optional): A command to run once, after--. SSH accounts run it on the target. Database, Redis, Snowflake, Kubernetes, GCP, Azure, and AWS IAM accounts run it on your machine. The CLI exits with the command’s exit code.
Flags
--auth-method <string>: Log in as a machine identity with this method:universal-auth,kubernetes,azure,gcp-id-token,gcp-iam,aws-iam,oidc-auth,jwt-auth, orldap-auth. The CLI renews the machine identity’s token while the session runs. Can also be set withINFISICAL_AUTH_METHOD.--client-id <string>: The machine identity’s client ID, for--auth-method=universal-auth. Can also be set withINFISICAL_UNIVERSAL_AUTH_CLIENT_ID.--client-secret <string>: The machine identity’s client secret, for--auth-method=universal-auth. Can also be set withINFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET.--duration <string>(default1h): How long the session lasts, in Go duration format such as30m,1h, or2h30m. With a command after--, the CLI stops the command when the session ends. The account’s template can cap the session at a shorter length. Also the duration of an access request the CLI files.--jwt <string>: The JWT to log in with, for--auth-method=oidc-authorjwt-auth. Can also be set withINFISICAL_JWT.--ldap-password <string>: The LDAP password, for--auth-method=ldap-auth. Can also be set withINFISICAL_LDAP_PASSWORD.--ldap-username <string>: The LDAP username, for--auth-method=ldap-auth. Can also be set withINFISICAL_LDAP_USERNAME.--machine-identity-id <string>: The machine identity’s ID, for every--auth-methodexceptuniversal-auth. Can also be set withINFISICAL_MACHINE_IDENTITY_ID.--mfa-session <string>: The MFA session to use after a person completed verification in the browser. The MFA error gives the value and the link to open.--no-approval-request: Don’t file an access request when the account requires approval. The CLI exits with an error instead.--organization-slug <string>: The slug of a sub-organization to scope the machine identity’s session to. Without it, the session uses the organization the machine identity was created in.--port <int>(default0): The port the local proxy listens on at127.0.0.1.0picks a free port. For SSH accounts, it applies only when a proxy runs. Has no effect on AWS IAM accounts without a gateway.--proxy: Start a local proxy for your own SSH, SCP, or SFTP client instead of opening a shell. It changes only SSH accounts, and you can’t combine it with a command after--.--reason <string>: Why you’re accessing the account, recorded for audit and shown to approvers on an access request. If the account requires a reason and you don’t pass one, the CLI prompts for it in a terminal and exits with an error otherwise.--service-account-key-file-path <string>: The path to a GCP service account key file, for--auth-method=gcp-iam. Can also be set withINFISICAL_GCP_IAM_SERVICE_ACCOUNT_KEY_FILE_PATH.--service-account-token-path <string>: The path to the Kubernetes service account token, for--auth-method=kubernetes. Required with that method. Can also be set withINFISICAL_KUBERNETES_SERVICE_ACCOUNT_TOKEN_PATH.--target <string>: The host to connect to, for accounts that allow several hosts, such as Windows AD accounts.--token <string>: A machine identity access token to run as. Service tokens aren’t accepted. Without it, the CLI readsINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN, thenINFISICAL_TOKEN.
Examples
Run one query against a databasepam accounts
pam accounts get
ready: runinfisical pam accesson it nowneeds approval(needs_approvalin JSON):infisical pam accessfiles an access request for a person to approvepending: a request is waiting for approvalapproved: approved access is active until the time shownunavailable: the account can’t be used right now. Name the account to see why, or readdisabledReasonwith-o json
folder/account to see its details, any reason or MFA it requires, and a command that connects to it. A bare account name finds the account in any folder. With -o json, each account also has an example field holding that command, which is empty for an unavailable account.
Arguments
path(optional): A folder, to list only its accounts, or one account to show, asfolder/account. Without it, the command lists every account you can access.
Flags
--output <string>(-o): Print the accounts asjsonoryamlinstead of a table.--token <string>: A machine identity access token to run as. The command also accepts the other machine identity flags of infisical pam access, such as--auth-method.
Examples
List the accounts you can accessprofile
infisical login --save-as <name>.
A command uses the first of these that’s set:
--profileon the command- The
INFISICAL_PROFILEenvironment variable, set by infisical profile pin - A directory bound with infisical profile bind
- The machine’s default profile, set with infisical profile use
profile bind
Arguments
name(optional): The profile to bind. Defaults to the profile in effect.path(optional): The directory to bind. Defaults to the current directory.
Examples
Bind this directory to the profile in effectprofile create
--org, or pick it when asked.
Creating a profile doesn’t change which profile other terminals use. Pass --pin to start using it in this terminal, or --use to make it the default for the machine.
To add a different account, or an account on another instance, use infisical login --save-as <name> instead.
Arguments
name(required): The name of the new profile.
Flags
--pin: Also pin this terminal to the new profile. Run the command throughevalfor the pin to take effect.--use: Also make the new profile the default for this machine.
Examples
Create a profile for another organizationprofile current
secrets-manager commands use in this directory when you don’t pass --projectId, --env, or --path, and where each value comes from, such as INFISICAL_ENVIRONMENT or .infisical.yaml. Run it before you write secrets, to check where they’ll go.
If you authenticate as a machine identity, run, secrets export, and secrets get don’t read the project from the project config file, so pass --projectId or set INFISICAL_PROJECT_ID.
Flags
--plain: Print only the profile name, for use in shell prompts.
Examples
Show the profile in effectprofile delete
Arguments
name(required): The profile to delete.
Flags
--local-only: Remove the profile without revoking its session on the server. The session stays valid until it expires.
Examples
Delete a profileprofile list
Examples
List your profilesprofile pin
export statement for POSIX shells such as Bash and Zsh, so run it through eval. If you run it without eval, it prints the eval form and changes nothing. In PowerShell, set the variable directly with $env:INFISICAL_PROFILE = 'acme'. In scripts and CI, set INFISICAL_PROFILE or pass --profile instead.
Arguments
name(required): The profile to pin this terminal to.
Examples
Pin this terminal to a profileprofile rename
Arguments
name(required): The profile’s current name.new-name(required): The name to give it.
Examples
Rename a profileprofile set-org
--org to that command instead. To keep a second organization available at the same time, give it its own profile with infisical profile create.
Arguments
organization(optional): The organization to use, by name, slug, or ID. Without it, the CLI asks you to pick one.
Flags
--org-id <string>(deprecated): Deprecated: pass the organization as an argument instead. The ID of the organization to use.
Examples
Pick an organization from a listprofile unbind
Arguments
path(optional): The bound directory. Defaults to whichever binding covers the current directory, so running the command inside a bound tree removes that binding.
Examples
Remove the binding that covers this directoryprofile unpin
unset statement, so run it through eval. If you run it without eval, it prints the eval form and changes nothing. In PowerShell, run Remove-Item Env:INFISICAL_PROFILE instead.
Examples
Unpin this terminalprofile use
Arguments
name(required): The profile to make the default.
Examples
Make a profile the defaultproxy
proxy start
--listen-address instead of your Infisical instance. They call the same API endpoints with the same credentials, and the proxy forwards requests, caches the responses, and refreshes the cache.
Flags
--access-token-check-interval <string>(default5m): How often to check that cached access tokens are still valid, such as5mor1h.--client-id <string>: A universal auth machine identity’s client ID. Required with--enable-event-subscriptions. Can also be set withINFISICAL_UNIVERSAL_AUTH_CLIENT_ID.--client-secret <string>: The machine identity’s client secret. Required with--enable-event-subscriptions. Can also be set withINFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET.--domain <string>: The Infisical instance to forward requests to, such ashttps://app.infisical.com.--enable-event-subscriptions: Invalidate cached secrets in real time from Infisical events instead of refreshing them on a timer. Falls back to polling when events are unavailable. Requires--client-idand--client-secret.--eviction-strategy <string>(defaultoptimistic): How to handle the cache when Infisical is unreachable.optimistic, the only strategy, keeps serving cached data.--listen-address <string>(defaultlocalhost:8081): The address to listen on.--polling-fallback-interval <string>(default10m): How often to poll for secret changes when event subscriptions are unavailable, such as1m. Used only with--enable-event-subscriptions.--static-secrets-refresh-interval <string>(default1h): How often to refresh cached secrets, such as30mor1h. Not used with--enable-event-subscriptions.--tls-cert-file <string>: The proxy’s TLS certificate file. Required while--tls-enabledis on.--tls-enabled(defaulttrue): Serve the proxy over TLS. Pass--tls-enabled=falseto serve plain HTTP.--tls-key-file <string>: The proxy’s TLS private key file. Required while--tls-enabledis on.
Examples
Start the proxy with TLSrelay
relay start
--enroll-method, or as a machine identity with the same flags as infisical login. An instance relay authenticates with the secret in INFISICAL_RELAY_AUTH_SECRET.
Flags
--auth-method <string>: Log in as a machine identity with this method instead of enrolling:universal-auth,kubernetes,azure,gcp-id-token,gcp-iam,aws-iam, oroidc-auth. Can also be set withINFISICAL_AUTH_METHOD.--client-id <string>: The machine identity’s client ID, for--auth-method=universal-auth. Can also be set withINFISICAL_UNIVERSAL_AUTH_CLIENT_ID.--client-secret <string>: The machine identity’s client secret, for--auth-method=universal-auth. Can also be set withINFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET.--domain <string>: The Infisical instance to connect to. Without it, the relay uses the domain it saved when it enrolled, then your active profile’s domain.--enroll-method <string>: How the relay authenticates on its own:tokenfor a one-time enrollment token, oraws. Can also be set withINFISICAL_RELAY_ENROLL_METHOD.--host <string>: The IP address or hostname gateways use to reach the relay. Required unless you use--enroll-method. Can also be set withINFISICAL_RELAY_HOST.--jwt <string>: The JWT to exchange for an access token, for--auth-method=oidc-auth.--machine-identity-id <string>: The machine identity’s ID, for every--auth-methodexceptuniversal-auth.--name <string>: The relay’s name. Can also be set withINFISICAL_RELAY_NAME.--relay-id <string>: The relay’s ID from Infisical. Required with--enroll-method=aws, unless the relay saved it on an earlier start. Can also be set withINFISICAL_RELAY_ID.--service-account-key-file-path <string>: The path to a GCP service account key file, for--auth-method=gcp-iam.--service-account-token-path <string>: The path to the Kubernetes service account token, for--auth-method=kubernetes.--token <string>: With--enroll-method=token, the one-time enrollment token. Otherwise, a machine identity access token to connect with.--type <string>:orgfor a relay that belongs to your organization, orinstancefor a relay that serves the whole Infisical instance, run by the instance’s admins. Defaults toorg. Can also be set withINFISICAL_RELAY_TYPE.
Examples
Enroll and start a relayrelay systemd
relay systemd install
Arguments
name(optional): The relay’s name. Required with--enroll-method=token.
Flags
--domain <string>: The Infisical instance to connect to.--enroll-method <string>: How the relay authenticates:tokenfor a one-time enrollment token, oraws.--host <string>: The IP address or hostname gateways use to reach the relay. Required with--type=instance.--log-file <string>: A file to write the service’s logs to, such as/var/log/infisical/relay.log.--relay-auth-secret <string>: The secret an instance relay authenticates with. Required with--type=instance.--relay-id <string>: The relay’s ID from Infisical. Required with--enroll-method=aws.--token <string>: The one-time enrollment token, for--enroll-method=token.--type <string>(defaultorg):orgfor a relay that belongs to your organization, orinstancefor a relay that serves the whole Infisical instance, run by the instance’s admins.
Examples
Install an organization relayrelay systemd uninstall
Arguments
name(optional): The relay whose service to remove. Without it, the command removes the single relay service that older CLI versions installed.
Examples
Remove a relay servicereset
~/.infisical directory. That directory also holds cached secrets and the credentials that gateways, relays, and KMIP servers saved when you ran them as a non-root user, so those are deleted too. A session that can’t be revoked stays valid until it expires, and the command prints a warning for it. .infisical.yaml and .infisical.json files in your projects aren’t touched.
Log in again with infisical login afterwards. Directory bindings are deleted with the rest of the configuration, and terminals pinned with infisical profile pin point to a profile that no longer exists.
Flags
--local-only: Delete local data without revoking the sessions on the server. The sessions stay valid until they expire.
Examples
Reset the CLIscan
git log -p for every commit on every branch of the repository at --source. Pass --log-opts to choose the commits, --no-git to scan the files in their current state, or --pipe to scan standard input.
To change the rules or skip known findings, see Scan code locally with the CLI.
The command exits with --exit-code when it finds leaks, and with 1 when the scan fails.
Flags
--baseline-path <string>(-b): A JSON report from an earlierinfisical scanrun. Findings already in it aren’t reported again. If the file can’t be loaded, the scan logs an error and continues without it.--confidence <string>(defaultmedium): The lowest confidence a finding needs to be reported:low,medium, orhigh. Findings from rules that don’t set a confidence are always reported.--config <string>(-c): The scan config file to use. Without it, the CLI uses.infisical-scan.tomlin the--sourcedirectory, then the built-in rules. Can also be set withINFISICAL_SCAN_CONFIG.--exit-code <int>(default1): The exit code to use when the scan finds leaks. Pass0to exit successfully anyway.--follow-symlinks: Scan the files that symbolic links point to. Applies only with--no-git.--log-opts <string>: Options to pass togit log -pto choose the commits to scan, such as--all commitA..commitB. They replace the default--full-history --all. Has no effect with--no-gitor--pipe.--max-target-megabytes <int>(default0): Skip files larger than this many megabytes.0means no limit. Applies only with--no-git.--no-color: Turn off color in verbose output.--no-git: Scan the files in--sourceas a plain directory instead of reading Git history.--pipe: Scan standard input instead of--source, as incat app.log | infisical scan --pipe. Has no effect with--no-git.--platform <string>: The source code platform to link findings to:github,gitlab,azuredevops,bitbucket, orgitea, ornonefor no links. Without it, the CLI detects the platform from the repository’s remote URL. Applies only to Git history scans.--redact: Replace secrets withREDACTEDin verbose output. Reports written with--report-pathstill contain the secrets.--report-format <string>(-f, defaultjson): The report’s format:json,csv,sarif, orjunit.--report-path <string>(-r): The file to write a report of the findings to. Without it, no report is written.--source <string>(-s, default.): The repository, directory, or file to scan.--verbose(-v): Print each finding: the file, where in the file, and the secret.
Examples
Scan a repository’s historyscan git-changes
git diff. Without --staged, the scan covers changes you haven’t staged yet. With it, the scan covers what the next commit will contain, which makes it suited to a pre-commit hook. infisical scan install sets one up.
The scan uses the same config and .infisicalignore file as infisical scan, and exits with --exit-code when it finds leaks.
Flags
--confidence <string>(defaultmedium): The lowest confidence a finding needs to be reported:low,medium, orhigh. Findings from rules that don’t set a confidence are always reported.--staged: Scan the changes staged withgit addinstead of the unstaged changes.
Inherited flags
--config <string>(-c): The scan config file to use. Without it, the CLI uses.infisical-scan.tomlin the--sourcedirectory, then the built-in rules. Can also be set withINFISICAL_SCAN_CONFIG.--exit-code <int>(default1): The exit code to use when the scan finds leaks. Pass0to exit successfully anyway.--no-color: Turn off color in verbose output.--redact: Replace secrets withREDACTEDin verbose output. Reports written with--report-pathstill contain the secrets.--report-format <string>(-f, defaultjson): The report’s format:json,csv,sarif, orjunit.--report-path <string>(-r): The file to write a report of the findings to. Without it, no report is written.--source <string>(-s, default.): The Git repository to scan.--verbose(-v): Print each finding: the file, where in the file, and the secret.
Examples
Scan unstaged changesscan install
--pre-commit-hook. Without that flag, the command does nothing.
The hook runs infisical scan git-changes -v --staged before each commit and blocks the commit when it finds secrets. The CLI writes it to .git/hooks/pre-commit, or adds it to the end of that file if one exists. To turn the hook off in a repository, run git config hooks.infisical-scan false.
Flags
--pre-commit-hook: Install a Git pre-commit hook that scans staged changes before each commit.
Examples
Install the pre-commit hooksecrets-manager
secrets-manager commands inject secrets into a process, export them to a file, read and write them, and lease credentials from dynamic secrets. sm is an alias, so infisical sm run is the same command as infisical secrets-manager run.
Confirm before deleting
Every delete asks you to type the name of what it deletes, or the number of secrets if you delete more than one, and deletes nothing if what you type doesn’t match. Pass--yes (-y) to skip the question.
If there’s no terminal to ask in, such as in CI, and you don’t pass --yes, the command deletes nothing and fails with confirmation_required. Add --yes to scripts that delete with secrets-manager or sm.
Errors in scripts
If one of the following fails, it prints what went wrong and the command to run next, and exits with status1:
- The
projects,environments, andfolderscommands secrets createandsecrets update
--output=json or --output=yaml, the command prints the error to standard error in that format instead:
statusCode and requestId. code is one of the following:
secrets-manager dynamic-secrets
Flags
--env <string>(defaultdev): The environment to work in. Everyinfisical secrets-manager dynamic-secretssubcommand accepts it. Defaults toINFISICAL_ENVIRONMENT, then the default environment in.infisical.yaml, thendev.--output <string>(-o): Print the dynamic secrets asjson,yaml, ordotenvinstead of a table.--path <string>(default/): The folder to list dynamic secrets from. Defaults toINFISICAL_SECRET_PATH, then the default folder in.infisical.yaml, then/.--project-slug <string>: The slug of the project to list dynamic secrets from. Takes precedence over--projectId.--projectId <string>: The ID of the project to list dynamic secrets from. Without it or--project-slug, the CLI uses the project in.infisical.yaml. Can also be set withINFISICAL_PROJECT_ID.--token <string>: A machine identity access token to authenticate with, instead of your login. Without it, the CLI readsINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN, thenINFISICAL_TOKEN.
Examples
List dynamic secrets in devsecrets-manager dynamic-secrets lease
Inherited flags
--env <string>(defaultdev): The environment that holds the dynamic secret.
secrets-manager dynamic-secrets lease create
--plain show only credentials whose values are strings. Pass --output to get every credential the provider returns.
Arguments
name(required): The name of the dynamic secret to lease.
Flags
--kubernetes-namespace <string>: The namespace to create the lease in. Used only by Kubernetes dynamic secrets.--output <string>(-o): Print only the credentials, asjson,yaml, ordotenv, instead of the lease details and a table.--path <string>(-p, default/): The folder that holds the dynamic secret. Defaults toINFISICAL_SECRET_PATH, then the default folder in.infisical.yaml, then/.--plain: Print each credential asKEY=value, one per line, with no other output. Ignored when you pass--output.--principals <string>: The principals to put in the certificate, separated by commas. Required by SSH dynamic secrets, and each one must be allowed by the dynamic secret.--project-slug <string>: The slug of the project that holds the dynamic secret. Takes precedence over--projectId.--projectId <string>: The ID of the project that holds the dynamic secret. Without it or--project-slug, the CLI uses the project in.infisical.yaml. Can also be set withINFISICAL_PROJECT_ID.--token <string>: A machine identity access token to authenticate with, instead of your login. Without it, the CLI readsINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN, thenINFISICAL_TOKEN.--ttl <string>: How long the lease lasts, such as30mor1h. Defaults to the dynamic secret’s default TTL, and can’t exceed its max TTL.
Inherited flags
--env <string>(defaultdev): The environment that holds the dynamic secret.
Examples
Lease database credentials for an hoursecrets-manager dynamic-secrets lease delete
--yes. --env and --path must point to the folder that holds the lease’s dynamic secret, or Infisical reports that the lease doesn’t exist.
Arguments
lease-id(required): The ID of the lease to delete.
Flags
--output <string>(-o): Print the deleted lease asjson,yaml, ordotenvinstead of a table.--path <string>(-p, default/): The folder that holds the lease’s dynamic secret. Defaults toINFISICAL_SECRET_PATH, then the default folder in.infisical.yaml, then/.--project-slug <string>: The slug of the project that holds the lease. Takes precedence over--projectId.--projectId <string>: The ID of the project that holds the lease. Without it or--project-slug, the CLI uses the project in.infisical.yaml. Can also be set withINFISICAL_PROJECT_ID.--token <string>: A machine identity access token to authenticate with, instead of your login. Without it, the CLI readsINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN, thenINFISICAL_TOKEN.--yes(-y): Delete without asking for confirmation. Required when there’s no terminal to ask in, such as in CI.
Inherited flags
--env <string>(defaultdev): The environment that holds the lease’s dynamic secret.
Examples
Delete a leasesecrets-manager dynamic-secrets lease list
Arguments
name(required): The name of the dynamic secret to list leases for.
Flags
--output <string>(-o): Print the leases asjson,yaml, ordotenvinstead of a table.--path <string>(-p, default/): The folder that holds the dynamic secret. Defaults toINFISICAL_SECRET_PATH, then the default folder in.infisical.yaml, then/.--project-slug <string>: The slug of the project that holds the dynamic secret. Takes precedence over--projectId.--projectId <string>: The ID of the project that holds the dynamic secret. Without it or--project-slug, the CLI uses the project in.infisical.yaml. Can also be set withINFISICAL_PROJECT_ID.--token <string>: A machine identity access token to authenticate with, instead of your login. Without it, the CLI readsINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN, thenINFISICAL_TOKEN.
Inherited flags
--env <string>(defaultdev): The environment that holds the dynamic secret.
Examples
List a dynamic secret’s leasessecrets-manager dynamic-secrets lease renew
--env and --path must point to the folder that holds the lease’s dynamic secret, or Infisical reports that the lease doesn’t exist.
Arguments
lease-id(required): The ID of the lease to renew.
Flags
--output <string>(-o): Print the renewed lease asjson,yaml, ordotenvinstead of a table.--path <string>(-p, default/): The folder that holds the lease’s dynamic secret. Defaults toINFISICAL_SECRET_PATH, then the default folder in.infisical.yaml, then/.--project-slug <string>: The slug of the project that holds the lease. Takes precedence over--projectId.--projectId <string>: The ID of the project that holds the lease. Without it or--project-slug, the CLI uses the project in.infisical.yaml. Can also be set withINFISICAL_PROJECT_ID.--token <string>: A machine identity access token to authenticate with, instead of your login. Without it, the CLI readsINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN, thenINFISICAL_TOKEN.--ttl <string>: How long to extend the lease by, from its current expiry, such as30mor1h. Defaults to the dynamic secret’s default TTL.
Inherited flags
--env <string>(defaultdev): The environment that holds the lease’s dynamic secret.
Examples
Extend a lease by 30 minutessecrets-manager environments
dev and prod. Other commands take an environment’s slug with --env. environment is an alias, so infisical secrets-manager environment get also works.
The commands take the project from --projectId, then INFISICAL_PROJECT_ID, then .infisical.yaml, except delete, which takes it only from --projectId. They don’t accept service tokens. If INFISICAL_TOKEN holds a service token, the commands use your login instead.
secrets-manager environments create
environment_exists.
Arguments
slug(required): The slug of the new environment, such asqa.
Flags
--name <string>: The environment’s display name. Defaults to the slug.--output <string>(-o): Print the created environment asjsonoryamlinstead of a table.--projectId <string>: The project to create the environment in. Defaults toINFISICAL_PROJECT_ID, then the project linked in.infisical.yaml.--token <string>: A machine identity access token to authenticate with, instead of your login. Without it, the CLI readsINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN, thenINFISICAL_TOKEN.
Examples
Create an environmentsecrets-manager environments delete
--yes.
The environment stays pending deletion for 14 days, and is deleted permanently after that. Until then, you can restore it from the project’s settings in Infisical, and no other environment can use its slug. Pass --force to delete it permanently now.
Arguments
slug(required): The slug of the environment to delete.
Flags
--force: Delete the environment permanently now, instead of after 14 days. Also deletes an environment that’s already pending deletion, which frees its slug.--output <string>(-o): Print the deleted environment asjsonoryamlinstead of a table.--projectId <string>(required): The project that holds the environment. The command doesn’t readINFISICAL_PROJECT_IDor.infisical.yaml.--token <string>: A machine identity access token to authenticate with, instead of your login. Without it, the CLI readsINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN, thenINFISICAL_TOKEN.--yes(-y): Delete without asking for confirmation. Required when there’s no terminal to ask in, such as in CI.
Examples
Delete an environmentsecrets-manager environments get
pendingDeletion.
Arguments
slug(optional): The slug of the environment to show. Without it, the command lists every environment in the project.
Flags
--output <string>(-o): Print the environments asjsonoryamlinstead of a table.--projectId <string>: The project to read environments from. Defaults toINFISICAL_PROJECT_ID, then the project linked in.infisical.yaml.--token <string>: A machine identity access token to authenticate with, instead of your login. Without it, the CLI readsINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN, thenINFISICAL_TOKEN.
Examples
List the environments of the linked projectsecrets-manager environments update
--name and --slug, or the command fails with nothing_to_update. If another environment already has the new slug, the command fails with environment_exists.
Arguments
slug(required): The current slug of the environment to change.
Flags
--name <string>: The environment’s new display name.--output <string>(-o): Print the updated environment asjsonoryamlinstead of a table.--projectId <string>: The project that holds the environment. Defaults toINFISICAL_PROJECT_ID, then the project linked in.infisical.yaml.--slug <string>: The environment’s new slug. Commands that pass the old slug with--envstop working.--token <string>: A machine identity access token to authenticate with, instead of your login. Without it, the CLI readsINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN, thenINFISICAL_TOKEN.
Examples
Change an environment’s display namesecrets-manager folders
/backend/api, which other commands take with --path. Each folders command works on the folders directly inside --path, so to work on /backend/api, pass api as the name and --path=/backend. A folder name can contain only letters, numbers, dashes, and underscores.
The commands take the project from --projectId, then INFISICAL_PROJECT_ID, then .infisical.yaml, except delete, which takes it only from --projectId. A service token works only in its own project. If you select a different project, the command fails with token_project_mismatch.
secrets-manager folders create
--path. If a folder with that name already exists there, the command fails with folder_exists and creates nothing.
Arguments
name(required): The name of the new folder.
Flags
--description <string>: A description of the folder.--env <string>(defaultdev): The environment to create the folder in. Defaults toINFISICAL_ENVIRONMENT, then the default environment in.infisical.yaml, thendev.--output <string>(-o): Print the created folder asjsonoryamlinstead of a table.--path <string>(default/): The folder to create the new folder in. Folders in the path that don’t exist yet are created too. Defaults toINFISICAL_SECRET_PATH, then the default folder in.infisical.yaml, then/.--projectId <string>: The project to create the folder in. Defaults toINFISICAL_PROJECT_ID, then the project linked in.infisical.yaml. A service token always uses its own project.--token <string>: A machine identity access token or service token to authenticate with, instead of your login. Without it, the CLI readsINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN, thenINFISICAL_TOKEN.
Examples
Create a foldersecrets-manager folders delete
--yes.
Arguments
name(required): The name of the folder to delete.
Flags
--env <string>(defaultdev): The environment that holds the folder. Defaults toINFISICAL_ENVIRONMENT, then the default environment in.infisical.yaml, thendev.--output <string>(-o): Print the deleted folder asjsonoryamlinstead of a table.--path <string>(default/): The folder that contains the folder to delete. Defaults toINFISICAL_SECRET_PATH, then the default folder in.infisical.yaml, then/.--projectId <string>(required): The project that holds the folder. The command doesn’t readINFISICAL_PROJECT_IDor.infisical.yaml.--token <string>: A machine identity access token or service token to authenticate with, instead of your login. Without it, the CLI readsINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN, thenINFISICAL_TOKEN.--yes(-y): Delete without asking for confirmation. Required when there’s no terminal to ask in, such as in CI.
Examples
Delete a foldersecrets-manager folders get
--path, or show the folder you name. In JSON and YAML, each folder’s path is its own full path, such as /backend/api, which you can pass to --path to work inside the folder.
Arguments
name(optional): The name of the folder to show. Without it, the command lists the folders inside--path.
Flags
--env <string>(defaultdev): The environment to read folders from. Defaults toINFISICAL_ENVIRONMENT, then the default environment in.infisical.yaml, thendev.--output <string>(-o): Print the folders asjsonoryamlinstead of a table.--path <string>(default/): The folder to list folders from. Defaults toINFISICAL_SECRET_PATH, then the default folder in.infisical.yaml, then/.--projectId <string>: The project to read folders from. Defaults toINFISICAL_PROJECT_ID, then the project linked in.infisical.yaml. A service token always uses its own project.--token <string>: A machine identity access token or service token to authenticate with, instead of your login. Without it, the CLI readsINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN, thenINFISICAL_TOKEN.
Examples
List the folders at the rootsecrets-manager folders update
--name and --description, or the command fails with nothing_to_update. If another folder in --path already has the new name, the command fails with folder_exists.
Arguments
name(required): The current name of the folder to change.
Flags
--description <string>: The folder’s new description. Pass--description=""to remove it.--env <string>(defaultdev): The environment that holds the folder. Defaults toINFISICAL_ENVIRONMENT, then the default environment in.infisical.yaml, thendev.--name <string>: The folder’s new name. Commands that pass the folder’s old path with--pathstop working.--output <string>(-o): Print the updated folder asjsonoryamlinstead of a table.--path <string>(default/): The folder that contains the folder to change. Defaults toINFISICAL_SECRET_PATH, then the default folder in.infisical.yaml, then/.--projectId <string>: The project that holds the folder. Defaults toINFISICAL_PROJECT_ID, then the project linked in.infisical.yaml. A service token always uses its own project.--token <string>: A machine identity access token or service token to authenticate with, instead of your login. Without it, the CLI readsINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN, thenINFISICAL_TOKEN.
Examples
Rename a foldersecrets-manager projects
--projectId flag take, or to manage projects without opening Infisical.
The commands don’t accept service tokens, except projects get with a project ID. If INFISICAL_TOKEN holds a service token, the commands use your login instead.
secrets-manager projects create
infisical init command that links the current directory to the project.
Flags
--description <string>: A description of the project, up to 1024 characters.--name <string>(required): The name of the project, up to 64 characters.--output <string>(-o): Print the created project asjsonoryamlinstead of a table.--slug <string>: The project’s slug, from 5 to 64 characters. Without it, Infisical generates a slug from the name.--token <string>: A machine identity access token to authenticate with, instead of your login. Without it, the CLI readsINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN, thenINFISICAL_TOKEN.
Examples
Create a project and link this directory to itsecrets-manager projects delete
--yes.
Arguments
slug(required): The slug of the project to delete. Find it with infisical secrets-manager projects get.
Flags
--output <string>(-o): Print the deleted project asjsonoryamlinstead of a table.--token <string>: A machine identity access token to authenticate with, instead of your login. Without it, the CLI readsINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN, thenINFISICAL_TOKEN.--yes(-y): Delete without asking for confirmation. Required when there’s no terminal to ask in, such as in CI.
Examples
Delete a projectsecrets-manager projects get
--env flag of other secrets-manager commands.
Without an argument, the command lists your projects, even in a directory linked to one. It doesn’t use INFISICAL_PROJECT_ID or .infisical.yaml.
Arguments
slug-or-id(optional): The slug or ID of the project to show. Without it, the command lists your projects.
Flags
--output <string>(-o): Print the projects asjsonoryamlinstead of a table.--projectId <string>(deprecated): Deprecated: pass the project’s ID as the argument instead. The ID of the project to show.--token <string>: A machine identity access token to authenticate with, instead of your login. Without it, the CLI readsINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN, thenINFISICAL_TOKEN.
Examples
List your projectssecrets-manager projects update
--name, --slug, and --description, or the command fails with nothing_to_update.
Arguments
slug-or-id(required): The slug or ID of the project to change.
Flags
--description <string>: The project’s new description, up to 1024 characters. Pass--description=""to remove it.--name <string>: The project’s new name, up to 64 characters.--output <string>(-o): Print the updated project asjsonoryamlinstead of a table.--slug <string>: The project’s new slug, up to 64 characters. Commands that name the project by its old slug stop working.--token <string>: A machine identity access token to authenticate with, instead of your login. Without it, the CLI readsINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN, thenINFISICAL_TOKEN.
Examples
Rename a projectsecrets-manager run
.infisical.yaml, or the one you pass with --projectId, and starts your command with them set.
Secrets override variables that are already set in your shell. Secrets named HOME, PATH, PS1, PS2, PWD, EDITOR, XAUTHORITY, USER, TERM, TERMINFO, SHELL, or MAIL, or starting with XDG_ or LC_, are never injected.
Arguments
command(optional): The command to run, after--. Everything after--is passed to it unchanged. Required unless you pass--command.
Flags
--command <string>(-c): A shell command to run instead of the arguments after--, such as"npm run build && npm start". Use it to chain several commands.--env <string>(-e, defaultdev): The environment to fetch secrets from, such asdev,staging, orprod. Defaults toINFISICAL_ENVIRONMENT, then the default environment in.infisical.yaml, thendev.--expand(defaulttrue): Resolve secret references and shell parameter expansions in secret values before injecting them. Pass--expand=falseto inject values exactly as stored.--include-imports(defaulttrue): Include secrets imported into the environment from other environments or folders.--path <stringArray>(default/): The folder to fetch secrets from. Repeat the flag to inject secrets from several folders. When a secret exists in more than one, the value from the last--pathwins. Defaults toINFISICAL_SECRET_PATH, then the default folder in.infisical.yaml, then/.--project-config-dir <string>: The directory that contains.infisical.yaml. Use it when the file isn’t in the directory you run the command from, such as in a monorepo.--projectId <string>: The project to fetch secrets from. Required when you authenticate with a machine identity. Can also be set withINFISICAL_PROJECT_ID.--recursive: Also inject the secrets in every subfolder of each--path.--secret-overriding(defaulttrue): Use your personal secrets in place of shared secrets with the same name. Pass--secret-overriding=falseto use only shared secrets.--tags <string>(-t): Only inject secrets with these tag slugs, separated by commas.--token <string>: A machine identity access token to fetch secrets with, instead of your login. Without it, the CLI readsINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN, thenINFISICAL_TOKEN.--watch: Restart the command whenever secrets change in Infisical. Intended for local development.--watch-interval <int>(default10): How often, in seconds,--watchchecks for changes. The minimum is5.
Examples
Start a dev server with secretssecrets-manager secrets
--output to print them as JSON, YAML, or dotenv instead.
Flags
--env <string>(defaultdev): The environment to list secrets from. Everyinfisical secrets-manager secretssubcommand accepts it. Defaults toINFISICAL_ENVIRONMENT, then the default environment in.infisical.yaml, thendev.--expand(defaulttrue): Resolve secret references and shell parameter expansions in secret values.--include-imports(defaulttrue): Include secrets imported into the environment from other environments or folders.--output <string>(-o): Print the secrets asjson,yaml, ordotenvinstead of a table.--path <string>(default/): The folder to list secrets from. Defaults toINFISICAL_SECRET_PATH, then the default folder in.infisical.yaml, then/.--plain(deprecated): Deprecated: use--outputinstead. Print each secret asKEY=value, one per line.--projectId <string>: The project to list secrets from. Required when you authenticate with a machine identity. Can also be set withINFISICAL_PROJECT_ID.--recursive: Also list the secrets in every subfolder of--path.--secret-overriding(defaulttrue): Show your personal secrets in place of shared secrets with the same name. Pass--secret-overriding=falseto show only shared secrets.--tags <string>(-t): Only list secrets with these tag slugs, separated by commas.infisical secrets-manager secrets getaccepts it too.--token <string>: A machine identity access token to fetch secrets with, instead of your login. Without it, the CLI readsINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN, thenINFISICAL_TOKEN.
Examples
List secrets in devsecrets-manager secrets create
secret_exists and writes none of them. To change a secret that exists, run infisical secrets-manager secrets update. The result table masks values unless you pass --show-values.
Your shell saves the values you pass on the command line in its history file. To keep them out, pass --file or NAME=@path, or set your shell to skip these commands.
Arguments
name=value(optional, repeatable): A secret to create. UseNAME=@path/to/fileto read the value from a file, andNAME=\@valuefor a value that starts with@. Required unless you pass--file.
Flags
--file <string>: A.envor YAML file to read secrets from, instead of arguments. Lines starting with#or//are comments.--output <string>(-o): Print the created secrets asjson,yaml, ordotenvinstead of a table.--path <string>(default/): The folder that holds the new secrets. Defaults toINFISICAL_SECRET_PATH, then the default folder in.infisical.yaml, then/.--projectId <string>: The project that holds the new secrets. Defaults toINFISICAL_PROJECT_ID, then the project linked in.infisical.yaml. A service token always writes to its own project, and fails withtoken_project_mismatchif you select another one.--show-values: Show secret values in the result table instead of masking them.--tag <stringArray>: A tag to attach, created if it doesn’t exist. Repeat the flag for several tags.--token <string>: A machine identity access token or service token to authenticate with, instead of your login. Without it, the CLI readsINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN, thenINFISICAL_TOKEN.--type <string>(defaultshared):sharedfor secrets everyone on the project sees, orpersonalfor secrets that override them only for you.
Inherited flags
--env <string>(defaultdev): The environment to create the secrets in.--tags <string>(-t): Has no effect on this command. Use--tagto attach tags.
Examples
Create two secretssecrets-manager secrets delete
--yes.
Without --type, the command deletes your personal secrets with those names. Pass --type=shared to delete the shared secrets that everyone on the project sees.
Arguments
name(required, repeatable): The names of the secrets to delete.
Flags
--output <string>(-o): Print the result asjson,yaml, ordotenvinstead of a table.--path <string>(default/): The folder to delete from. Defaults toINFISICAL_SECRET_PATH, then the default folder in.infisical.yaml, then/.--projectId <string>: The project to delete from. Required when you authenticate with a machine identity. Can also be set withINFISICAL_PROJECT_ID.--token <string>: A machine identity access token to authenticate with, instead of your login. Without it, the CLI readsINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN, thenINFISICAL_TOKEN.--type <string>(defaultpersonal): Which secrets to delete:personalorshared.--yes(-y): Delete without asking for confirmation. Required when there’s no terminal to ask in, such as in CI.
Inherited flags
--env <string>(defaultdev): The environment to delete from.
Examples
Delete two shared secretssecrets-manager secrets export
.env or JSON, for tools that read configuration from a file. Output goes to standard output unless you pass --output-file.
This command used to be infisical export, which still works.
dotenv writes each secret as KEY='value', and dotenv-export adds export in front. Neither escapes quotes inside values. dotenv-eval also writes export statements, but quotes each value so the output is safe to load with eval or source. No format escapes secret names, so load output into a shell only when every name is a valid shell variable name.
--template takes a Go template that fetches secrets with the functions the Infisical Agent provides, such as listSecrets and getSecretByName.
Flags
--env <string>(-e, defaultdev): The environment to export secrets from, such asdev,staging, orprod. Defaults toINFISICAL_ENVIRONMENT, then the default environment in.infisical.yaml, thendev.--expand(defaulttrue): Resolve secret references and shell parameter expansions in secret values. Pass--expand=falseto export values exactly as stored.--format <string>(-f, defaultdotenv): The output format:dotenv,dotenv-export,dotenv-eval,csv,json, oryaml.--include-imports(defaulttrue): Include secrets imported into the environment from other environments or folders.--output-file <string>(-o): A file or directory to write to, instead of standard output. In a directory, the CLI writes.env,secrets.json,secrets.csv, orsecrets.yaml, depending on the format. A file name without an extension gets the format’s extension, and missing parent directories are created.--path <string>(default/): The folder to export secrets from. Defaults toINFISICAL_SECRET_PATH, then the default folder in.infisical.yaml, then/.--projectId <string>: The project to export secrets from. Required when you authenticate with a machine identity. Can also be set withINFISICAL_PROJECT_ID.--secret-overriding(defaulttrue): Export your personal secrets in place of shared secrets with the same name. Pass--secret-overriding=falseto export only shared secrets.--tags <string>(-t): Only export secrets with these tag slugs, separated by commas.--template <string>: The path to a Go template to render and print instead of a file format. The template chooses its own project, environment, and folder, so every otherexportflag except--tokenis ignored.--token <string>: A machine identity access token to authenticate with, instead of your login. Without it, the CLI readsINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN, thenINFISICAL_TOKEN.
Examples
Write a .env filesecrets-manager secrets get
--path if you don’t name any. A name that doesn’t exist prints as *not found*.
In scripts, pass --plain --silent to print only the values, with no other output.
Arguments
name(optional, repeatable): The names of the secrets to print. Without names, the command prints every secret in--path.
Flags
--expand(defaulttrue): Resolve secret references and shell parameter expansions in secret values.--include-imports(defaulttrue): Also look for the names among secrets imported from other environments or folders.--output <string>(-o): Print the secrets asjson,yaml, ordotenvinstead of a table.--path <string>(default/): The folder to read from. Defaults toINFISICAL_SECRET_PATH, then the default folder in.infisical.yaml, then/.--plain: Print only the values, one per line.--projectId <string>: The project to read from. Required when you authenticate with a machine identity. Can also be set withINFISICAL_PROJECT_ID.--recursive: Also look for the names in every subfolder of--path.--secret-overriding(defaulttrue): Return your personal secret in place of a shared secret with the same name. Pass--secret-overriding=falseto return only shared secrets.--token <string>: A machine identity access token to authenticate with, instead of your login. Without it, the CLI readsINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN, thenINFISICAL_TOKEN.
Inherited flags
--env <string>(defaultdev): The environment to read from.--tags <string>(-t): Only return secrets with these tag slugs, separated by commas.
Examples
List the secrets in a foldersecrets-manager secrets update
secret_not_found and writes none of them. To add a secret, run infisical secrets-manager secrets create. The result table masks values unless you pass --show-values.
Your shell saves the values you pass on the command line in its history file. To keep them out, pass --file or NAME=@path, or set your shell to skip these commands.
Arguments
name=value(optional, repeatable): A secret to change, with its new value. UseNAME=@path/to/fileto read the value from a file, andNAME=\@valuefor a value that starts with@. Required unless you pass--file.
Flags
--file <string>: A.envor YAML file to read secrets from, instead of arguments. Lines starting with#or//are comments.--output <string>(-o): Print the updated secrets asjson,yaml, ordotenvinstead of a table.--path <string>(default/): The folder that holds the secrets. Defaults toINFISICAL_SECRET_PATH, then the default folder in.infisical.yaml, then/.--projectId <string>: The project that holds the secrets. Defaults toINFISICAL_PROJECT_ID, then the project linked in.infisical.yaml. A service token always writes to its own project, and fails withtoken_project_mismatchif you select another one.--show-values: Show secret values in the result table instead of masking them.--tag <stringArray>: A tag to attach, created if it doesn’t exist. Repeat the flag for several tags. The tags replace the secret’s existing tags.--token <string>: A machine identity access token or service token to authenticate with, instead of your login. Without it, the CLI readsINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN, thenINFISICAL_TOKEN.--type <string>(defaultshared):sharedfor secrets everyone on the project sees, orpersonalfor secrets that override them only for you.
Inherited flags
--env <string>(defaultdev): The environment that holds the secrets.--tags <string>(-t): Has no effect on this command. Use--tagto attach tags.
Examples
Change a secret’s valueservice-token
service-token create
--token-only, the command prints the token’s name, project, access, scopes, and the token itself to standard error, so capturing standard output gets nothing.
Flags
--access-level <stringSlice>(-a, required): What the token can do:read,write, or both. Repeat the flag or separate the values with commas.--expiry-seconds <int>(-e, default86400): How long the token lasts, in seconds from now. Pass0for a token that never expires.--name <string>(-n, defaultService token generated via CLI): The token’s name.--projectId <string>: The project to create the token for. Without it, the CLI uses the project in.infisical.yaml. Can also be set withINFISICAL_PROJECT_ID.--scope <stringSlice>(-s, required): An environment and folder the token can access, as<env-slug>:<folder-path>, such asdev:/backend. The folder path can be a glob pattern. Repeat the flag for several scopes.--token-only: Print only the token, to standard output, with no other details.
Examples
Create a read-only token for two foldersssh
ssh add-host
Flags
--alias <string>: A friendly name for the host, shown instead of the hostname wheninfisical ssh connectasks you to pick one.--configure-sshd: AddTrustedUserCAKeys,HostKey, andHostCertificateentries to/etc/ssh/sshd_config. Requires--write-user-ca-to-fileand--write-host-cert-to-file. The command doesn’t restartsshd.--force: Overwrite the user CA file, the host certificate, and existingsshd_configentries instead of stopping when they already exist.--hostname <string>(required): The host’s hostname.--projectId <string>(required): The project to register the host in. Can also be set withINFISICAL_PROJECT_ID.--token <string>: A machine identity access token to authenticate with, instead of your login. Without it, the CLI readsINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN, thenINFISICAL_TOKEN.--user-ca-out-file-path <string>(default/etc/ssh/infisical_user_ca.pub): The file to write the user CA public key to, with--write-user-ca-to-file.--write-host-cert-to-file: Have Infisical sign the host’s public key and write the host certificate next to it, as/etc/ssh/ssh_host_<type>_key-cert.pub. The CLI uses the first host key it finds in/etc/ssh, checkinged25519, thenecdsa, thenrsa.--write-user-ca-to-file: Write the public key of the CA that signs user certificates to--user-ca-out-file-path, sosshdcan trust certificates issued for this host.
ssh connect
Flags
--hostname <string>: The host to connect to, matched exactly against its hostname. Without it, the CLI asks you to pick one of the hosts you can access.--login-user <string>: The user to log in to the host as. It must be one of the host’s login users. Without it, the CLI asks you to pick one.--out-file-path <string>: Write the private key, public key, and certificate to files instead of connecting. Pass a directory to name themid_ed25519,id_ed25519.pub, andid_ed25519-cert.pub, or a path ending in-cert.pubto name the certificate, with the keys next to it.--token <string>: A machine identity access token to authenticate with, instead of your login. Without it, the CLI readsINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN, thenINFISICAL_TOKEN.--write-host-ca-to-file(defaulttrue): Add the host CA’s public key to~/.ssh/known_hostsas a@cert-authorityentry for the host, if it isn’t there yet. Pass--write-host-ca-to-file=falseto leaveknown_hostsunchanged.
ssh issue-credentials
Flags
--addToAgent: Add the issued key and certificate to your SSH agent. NeedsSSH_AUTH_SOCKto be set. Pass this,--outFilePath, or both.--certType <string>(defaultuser): The kind of certificate to issue:userorhost.--certificateTemplateId <string>(required): The ID of the SSH certificate template to issue against.--keyAlgorithm <string>(defaultRSA_2048): The algorithm of the key pair to generate:RSA_2048,RSA_4096,EC_prime256v1, orEC_secp384r1.--keyId <string>: The key ID to put in the certificate.--outFilePath <string>: The directory to write the private key, public key, and certificate to. It’s created if it doesn’t exist. The files are named after the key algorithm, such asid_rsa_2048,id_rsa_2048.pub, andid_rsa_2048-cert.pub. Pass this,--addToAgent, or both.--principals <string>(required): The principals to issue the certificate for, separated by commas.--token <string>: A machine identity access token to authenticate with, instead of your login. Without it, the CLI readsINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN, thenINFISICAL_TOKEN.--ttl <string>: How long the certificate is valid for. Without it, the certificate template’s default applies.
ssh sign-key
Flags
--certType <string>(defaultuser): The kind of certificate to issue:userorhost.--certificateTemplateId <string>(required): The ID of the SSH certificate template to sign against.--keyId <string>: The key ID to put in the certificate.--outFilePath <string>: The file to write the certificate to. It must end in-cert.pub. Required with--publicKey. With--publicKeyFilePath, it defaults to the public key’s path with.pubreplaced by-cert.pub.--principals <string>(required): The principals to sign the certificate for, separated by commas.--publicKey <string>: The public key to sign, as text. Pass this or--publicKeyFilePath, not both.--publicKeyFilePath <string>: The path to the public key file to sign. It must end in.pub. Pass this or--publicKey, not both.--token <string>: A machine identity access token to authenticate with, instead of your login. Without it, the CLI readsINFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN, thenINFISICAL_TOKEN.--ttl <string>: How long the certificate is valid for. Without it, the certificate template’s default applies.
token
token renew
infisical login --method=universal-auth, and print the renewed token. How long a token can be renewed for is set by the machine identity’s Access Token TTL and Access Token Max TTL. Service tokens, which start with st., can’t be renewed.
The command doesn’t use your login profile, so for any instance other than US Cloud, pass --domain or set INFISICAL_DOMAIN.
Arguments
token(required): The machine identity access token to renew.
Examples
Renew an access tokenuser
user get
user get token
--profile to read another profile’s token, or --org to get a token for a different organization. See infisical profile for how the profile in effect is chosen.
If the session has expired, or you have no profile yet, the CLI runs infisical login first.
Flags
--plain: Print only the access token, with no labels, session ID, or expiry.
Examples
Show the session token and its expiryuser switch
Examples
Pick the default profile from a listuser update
user update domain
infisical login --profile <name> --domain <url>.
Examples
Move a profile to another instancevault
auto, the default, uses your system keyring: the macOS Keychain, Windows Credential Manager, or the Secret Service on Linux. If the CLI can’t write to the system keyring the first time it stores credentials, it switches to file on its own. file stores credentials encrypted in ~/infisical-keyring, with a random passphrase kept in the CLI’s config file, ~/.infisical/infisical-config.json.
Examples
Show the vault in usevault set
Arguments
vault(required): The vault to store credentials in:autofor the system keyring, orfilefor an encrypted file.