Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
docs(cli): refresh section (#8344)
Adrian Kahalif1b468bfb8c1
diff --git a/docs/.vale/styles/config/vocabularies/Infisical/any-case/accept.txt b/docs/.vale/styles/config/vocabularies/Infisical/any-case/accept.txtindex ca6530be03..8f377be209 100644--- a/docs/.vale/styles/config/vocabularies/Infisical/any-case/accept.txt+++ b/docs/.vale/styles/config/vocabularies/Infisical/any-case/accept.txt@@ -399,3 +399,4 @@ I(?i)prefilled(?i)unscoped(?i)rsync+(?i)zshdiff --git a/docs/.vale/styles/config/vocabularies/Infisical/canonical/accept.txt b/docs/.vale/styles/config/vocabularies/Infisical/canonical/accept.txtindex 4dd3251bc8..3a25d5b398 100644--- a/docs/.vale/styles/config/vocabularies/Infisical/canonical/accept.txt+++ b/docs/.vale/styles/config/vocabularies/Infisical/canonical/accept.txt@@ -165,6 +165,7 @@ Jamf ProIvantiWinRMPowerShell+PSReadLineAuthenticodesigntoolDevOpsdiff --git a/docs/changelog/overview.mdx b/docs/changelog/overview.mdxindex 5dadf57210..496f436973 100644--- a/docs/changelog/overview.mdx+++ b/docs/changelog/overview.mdx@@ -20,7 +20,7 @@ The changelog below reflects new product developments and updates on a monthly b- Released Secret Rotation for [MySQL](https://infisical.com/docs/documentation/platform/secret-rotation/mysql-credentials) and [OracleDB](https://infisical.com/docs/documentation/platform/secret-rotation/oracledb-credentials) as well as Dynamic Secrets for [Vertica](https://infisical.com/docs/documentation/platform/dynamic-secrets/vertica) and [GitHub App Tokens](https://infisical.com/docs/documentation/platform/dynamic-secrets/github).- Added support for Azure Auth in ESO.- [Kubernetes auth](https://infisical.com/docs/documentation/platform/identities/kubernetes-auth) now supports gateway as a token reviewer.-- Revamped [Infisical CLI](https://infisical.com/docs/cli/commands/login) to auto-open login link.+- Revamped [Infisical CLI](https://infisical.com/docs/cli/reference#login) to auto-open login link.- Rolled out [Infisical Packer integration](https://infisical.com/docs/integrations/frameworks/packer).- Released [AliCloud Authentication method](https://infisical.com/docs/documentation/platform/identities/alicloud-auth).- Added support for [multi-step approval workflows](https://infisical.com/docs/documentation/platform/pr-workflows).@@ -144,7 +144,7 @@ The changelog below reflects new product developments and updates on a monthly b## August 2024- Added [Azure DevOps integration](https://infisical.com/docs/integrations/cloud/azure-devops).-- Released ability to hot-reload variables in CLI ([--watch flag](https://infisical.com/docs/cli/commands/run#infisical-run:watch)).+- Released ability to hot-reload variables in CLI ([--watch flag](https://infisical.com/docs/cli/reference#run--flag-watch)).- Added Dynamic Secrets for [Redis](https://infisical.com/docs/documentation/platform/dynamic-secrets/redis).- Added [Alerting](https://infisical.com/docs/documentation/platform/pki/alerting) for Certificate Management.- You can now specify roles and project memberships when adding new users.@@ -223,7 +223,7 @@ The changelog below reflects new product developments and updates on a monthly b- Released [(machine) identities](https://infisical.com/docs/documentation/platform/identities/overview) and [universal auth](https://infisical.com/docs/documentation/platform/identities/universal-auth) features.- Created new cross-language SDKs for [Python](https://infisical.com/docs/sdks/languages/python), [Node](https://infisical.com/docs/sdks/languages/node), and [Java](https://infisical.com/docs/sdks/languages/java).- Released first version of the [Infisical Agent](https://infisical.com/docs/infisical-agent/overview)-- Added ability to [manage folders via CLI](https://infisical.com/docs/cli/commands/secrets).+- Added ability to [manage folders via CLI](https://infisical.com/docs/cli/reference#secrets-folders).## Nov 2023diff --git a/docs/cli-reference-nav.js b/docs/cli-reference-nav.jsnew file mode 100644index 0000000000..71205ec73b--- /dev/null+++ b/docs/cli-reference-nav.js@@ -0,0 +1,121 @@+// Sidebar entries for CLI commands are `url:` stub pages pointing at headings on /cli/reference.+// Mintlify renders every `url:` page as an external link (new tab, arrow icon), so this keeps+// them in the same tab and, on the reference page, highlights whichever command is in view.+(function () {+ var TARGET = /\/cli\/reference#([^/?#]+)$/;++ function targetOf(link) {+ var match = (link.getAttribute("href") || "").match(TARGET);+ return match ? decodeURIComponent(match[1]) : null;+ }++ function onReferencePage() {+ return /\/cli\/reference\/?$/.test(window.location.pathname);+ }++ // Only a scroller inside the sidebar counts. On mobile the sidebar is a closed drawer, and+ // the nearest scrollable ancestor is the page itself: scrolling that to "keep the link in+ // view" moves the page, which fires this again and runs away to the bottom.+ function scrollParent(el) {+ var sidebar = el.closest("#sidebar-content");+ if (!sidebar) return null;+ for (var node = el.parentElement; node; node = node.parentElement) {+ if (!sidebar.contains(node) && node !== sidebar.parentElement) return null;+ var overflow = getComputedStyle(node).overflowY;+ if ((overflow === "auto" || overflow === "scroll") && node.scrollHeight > node.clientHeight) {+ return node;+ }+ }+ return null;+ }++ // scrollIntoView would also scroll the page and cut short a smooth scroll already under way,+ // so only the sidebar's own scroller moves.+ function keepVisible(link) {+ if (!link.getClientRects().length) return;+ var scroller = scrollParent(link);+ if (!scroller || scroller === document.scrollingElement || scroller === document.body) return;+ var box = scroller.getBoundingClientRect();+ var linkBox = link.getBoundingClientRect();+ if (linkBox.top < box.top + 48 || linkBox.bottom > box.bottom - 48) {+ scroller.scrollTo({+ top: scroller.scrollTop + linkBox.top - box.top - box.height / 3,+ behavior: "smooth"+ });+ }+ }++ var current = { id: null, path: null };++ // The sidebar lists only root commands, so a subcommand in view lights up its root's entry.+ function sidebarTarget(id, path) {+ var ids = {};+ document.querySelectorAll('#sidebar-content a[href*="/cli/reference#"]').forEach(function (link) {+ ids[targetOf(link)] = true;+ });+ if (ids[id]) return id;+ var root = path ? path.split(" ")[0] : null;+ return root && ids[root] ? root : id;+ }++ function highlight(id, path) {+ current = { id: id, path: path || null };+ var root = document.documentElement;+ var target = id === null ? null : sidebarTarget(id, current.path);+ var active = null;+ document.querySelectorAll('a[href*="/cli/reference#"]').forEach(function (link) {+ link.removeAttribute("target");+ var on = target !== null && targetOf(link) === target;+ link.classList.toggle("cli-nav-active", on);+ if (on && link.closest("#sidebar-content")) active = link;+ });+ if (active) {+ root.setAttribute("data-cli-nav", target);+ keepVisible(active);+ } else {+ root.removeAttribute("data-cli-nav");+ }+ }++ window.addEventListener("cli-reference:active", function (event) {+ var detail = event.detail || {};+ highlight(detail.id || null, detail.path);+ });++ // Sidebar links that render later, such as when Mintlify re-renders the sidebar, need the+ // highlight too.+ var pending = 0;+ new MutationObserver(function () {+ if (current.id === null) return;+ cancelAnimationFrame(pending);+ pending = requestAnimationFrame(function () {+ highlight(current.id, current.path);+ });+ }).observe(document.documentElement, { childList: true, subtree: true });++ document.addEventListener(+ "click",+ function (event) {+ if (event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) {+ return;+ }+ var link = event.target.closest && event.target.closest('a[href*="/cli/reference#"]');+ if (!link || link.closest(".cli-ref")) return;+ var id = targetOf(link);+ if (!id) return;+ // Capture phase, so Mintlify's own handler never opens the new tab.+ event.preventDefault();+ event.stopPropagation();+ var section = onReferencePage() ? document.getElementById(id) : null;+ if (!section) {+ window.location.assign(link.href);+ return;+ }+ // A sidebar click is navigation, so it lands at once like a page load would.+ section.scrollIntoView();+ window.history.replaceState(window.history.state, "", "#" + id);+ highlight(id, section.dataset.command);+ },+ true+ );+})();diff --git a/docs/cli/cloudsmith-migration.mdx b/docs/cli/cloudsmith-migration.mdxindex ceadb1b20e..e7803b9e70 100644--- a/docs/cli/cloudsmith-migration.mdx+++ b/docs/cli/cloudsmith-migration.mdx@@ -115,4 +115,4 @@ infisical --version## Full installation instructions-For a clean install from scratch, see the [CLI installation page](/cli/overview).+For a clean install from scratch, see the [CLI installation page](/cli/install).diff --git a/docs/cli/commands/agent-proxy.mdx b/docs/cli/commands/agent-proxy.mdxdeleted file mode 100644index 0e2be54293..0000000000--- a/docs/cli/commands/agent-proxy.mdx+++ /dev/null@@ -1,523 +0,0 @@-----title: "infisical secrets agent-proxy"-description: "Run the Infisical Agent Proxy and connect agents to it"------<Tabs>- <Tab title="Local proxy (run)">- ```bash- infisical secrets agent-proxy run [options] -- [agent start command]-- # Example- infisical secrets agent-proxy run --projectId=<project-id> --env=dev --path=/coding-agent -- claude- ```-- `run` on its own is the whole setup.-- </Tab>-- <Tab title="Standalone proxy (start + connect)">- ```bash- # On the proxy host- infisical secrets agent-proxy start [options]-- # On each agent host- infisical secrets agent-proxy connect [options] -- [agent start command]-- # Examples- infisical secrets agent-proxy start --port 17322- infisical secrets agent-proxy connect --proxy=<proxy-host>:17322 --projectId=<project-id> --env=prod --path=/ai-agents -- claude- ```-- `start` and `connect` work as a pair, on different hosts.-- </Tab>-</Tabs>--## Description--These subcommands run the [Infisical Agent Proxy](/documentation/platform/agent-proxy/overview), which brokers real credentials onto your agents' traffic on the wire. Which you use depends on where the agent runs:--- `run` is for an agent on your own computer. It does the proxy's work and the agent's launch in one process, authenticating as your logged-in user, and sandboxes the agent. It always starts its own proxy, so `--proxy` is rejected rather than ignored. See [Local Agent Proxy](/documentation/platform/agent-proxy/local-agent-proxy).-- `start` runs the proxy as a long-running service on a host of its own, serving agents across your network.-- `connect` launches an agent behind a proxy **already running elsewhere**, setting up proxy routing, CA trust, and placeholder credentials. It needs a proxy address, which is why it goes with `start`. Both authenticate with a [machine identity](/documentation/platform/identities/machine-identities) via [Universal Auth](/documentation/platform/identities/universal-auth), and the proxy's is always separate from your agents'; see [Standalone Agent Proxy](/documentation/platform/agent-proxy/standalone-agent-proxy).--Each arrangement stands on its own: `run` is complete by itself, and a deployed proxy pairs only with `connect`. All three read the same [proxied services](/documentation/platform/agent-proxy/proxied-services) and secrets from Infisical.--## Subcommands & flags--### Local proxy, on your own computer--<Accordion title="infisical secrets agent-proxy run" defaultOpen="true">- Launch an agent on your own computer, sandboxed, with credentials brokered on the wire. Everything after `--` is the agent's own start command. `run` starts a proxy alongside the agent, authenticating as your logged-in user, and stops it when the agent exits. See [Local Agent Proxy](/documentation/platform/agent-proxy/local-agent-proxy) for the full picture.-- Because the proxy and the agent share a machine, the sandbox is the boundary: the agent can't read your keyring, your credential files, or the proxy's CA key, and its only route to the network is the proxy. Real secret values are never placed in the agent's environment, and it gets no Infisical token, only proxy routing, CA trust, and the placeholders for [secret-substitution](/documentation/platform/agent-proxy/proxied-services#secret-substitution) services.-- Requires macOS, or Linux with `bubblewrap` installed; see [Requirements](/documentation/platform/agent-proxy/local-agent-proxy#requirements) for the per-distribution command. Where no OS sandbox is available, `run` refuses to start unless you pass `--no-sandbox`.-- <Note>- `--proxy` is rejected: `run` always starts its own proxy. To route through a proxy on another host, use `agent-proxy connect --proxy=<host>:<port>`.- </Note>--```bash-infisical secrets agent-proxy run --projectId=<project-id> --env=<env-slug> --path=<secret-path> -- [agent start command]--# Example-infisical secrets agent-proxy run --projectId=<project-id> --env=dev --path=/coding-agent -- claude--# Example (project, environment, and path from .infisical.json)-infisical secrets agent-proxy run -- claude-```--### Environment variables-- <Accordion title="INFISICAL_PROJECT_ID / INFISICAL_ENVIRONMENT / INFISICAL_SECRET_PATH">- The project, environment slug, and secret path to fetch proxied services from. Alternatives to `--projectId`, `--env`, and `--path`, and to the `workspaceId`, `defaultEnvironment`, and `defaultSecretPath` fields in `.infisical.json`.-- ```bash- # Example- export INFISICAL_PROJECT_ID=<project-id>- export INFISICAL_ENVIRONMENT=dev- export INFISICAL_SECRET_PATH=/coding-agent- ```- </Accordion>-- <Accordion title="INFISICAL_AGENT_PROXY_SANDBOX">- Set to `0`, `false`, or `off` to disable the OS sandbox, the same as `--no-sandbox`. Deliberately can't be set from `.infisical.json`, so a committed file can't silently disable the boundary.-- ```bash- # Example- export INFISICAL_AGENT_PROXY_SANDBOX=0- ```- </Accordion>-- <Accordion title="INFISICAL_DOMAIN">- Point the CLI to your Infisical instance. Alternative to the `--domain` flag.-- ```bash- # Example- export INFISICAL_DOMAIN=https://eu.infisical.com- ```- </Accordion>--### Flags-- <Accordion title="--env">- The environment slug to fetch proxied services from (for example `dev`, `staging`, `prod`). Falls back to `INFISICAL_ENVIRONMENT`, then to `defaultEnvironment` in `.infisical.json`; required otherwise.-- ```bash- # Example- infisical secrets agent-proxy run --env=dev -- claude- ```- </Accordion>-- <Accordion title="--path">- The secret path (folder) to scope to. Proxied services are fetched from this folder. Falls back to `INFISICAL_SECRET_PATH`, then to `defaultSecretPath` in `.infisical.json`.-- ```bash- # Example- infisical secrets agent-proxy run --env=dev --path=/coding-agent -- claude- ```-- Default value: `/`- </Accordion>-- <Accordion title="--projectId">- The project to fetch proxied services from. Falls back to `INFISICAL_PROJECT_ID`, then to `.infisical.json`.-- ```bash- # Example- infisical secrets agent-proxy run --env=dev --projectId=<project-id> -- claude- ```- </Accordion>-- <Accordion title="--token">- Broker using this token instead of your logged-in session. Also picked up from `INFISICAL_TOKEN` or `INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN` in your own environment (these are read by the CLI and scrubbed from the agent's environment). Activity records attribute requests to `token` rather than your email.-- ```bash- # Example- infisical secrets agent-proxy run --env=dev --token=<token> -- claude- ```- </Accordion>-- <Accordion title="--sandbox / --no-sandbox">- Toggle the OS sandbox around the agent. With `--no-sandbox` credentials are still brokered and the environment is still scrubbed, but the agent runs uncontained: it can read your keyring and credential files and reach the network directly, bypassing the proxy. `run` warns when it starts this way. Can also be set via `INFISICAL_AGENT_PROXY_SANDBOX`.-- ```bash- # Example- infisical secrets agent-proxy run --env=dev --no-sandbox -- claude- ```-- Default value: `--sandbox` (the sandbox is on)- </Accordion>-- <Accordion title="--allow-read">- Allow the agent to read a path the sandbox denies by default, read-only. The exception is exact: naming a file inside a denied directory leaves everything else in that directory denied. Repeatable. Prefer this to `--no-sandbox` when an agent needs one config file. `run` prints what was re-opened.-- ```bash- # Example- infisical secrets agent-proxy run --env=dev --allow-read ~/.aws/config -- claude- ```- </Accordion>-- <Accordion title="--allow-write">- Allow the agent to write a path, in addition to the working directory, `/tmp`, and the supported agents' own state directories. Repeatable.-- ```bash- # Example- infisical secrets agent-proxy run --env=dev --allow-write ~/scratch -- claude- ```- </Accordion>-- <Accordion title="--allow-host">- Let the agent reach a host that has no proxied service, without a credential, even under `--unmatched-host=block`. Repeatable. Has no effect under the default `allow` policy, where unmatched hosts already pass through.-- ```bash- # Example- infisical secrets agent-proxy run --env=dev --unmatched-host=block --allow-host=registry.npmjs.org -- claude- ```- </Accordion>-- <Accordion title="--pass-env">- Pass one of your own environment variables through to the agent. The child environment is scrubbed of credential-shaped names (anything containing `TOKEN`, `SECRET`, `PASSWORD`, `API_KEY`, and similar), Infisical's own variables, and agent-socket addresses such as `SSH_AUTH_SOCK`; this re-admits a specific one. Repeatable.-- ```bash- # Example- infisical secrets agent-proxy run --env=dev --pass-env ANTHROPIC_API_KEY -- claude- ```- </Accordion>-- <Accordion title="--set-env">- Set an environment variable in the agent as `KEY=VALUE`. Applied last, so it overrides anything else `run` sets. Repeatable.-- ```bash- # Example- infisical secrets agent-proxy run --env=dev --set-env GH_CONFIG_DIR=/tmp/gh-cfg -- claude- ```- </Accordion>-- <Accordion title="--unmatched-host">- Policy for requests to hosts with no matching proxied service: `allow` forwards them untouched with no credentials applied; `block` rejects them with `403`, restricting the agent to the services you have defined plus any `--allow-host` entries.-- ```bash- # Example- infisical secrets agent-proxy run --env=dev --unmatched-host=block -- claude- ```-- Default value: `allow`- </Accordion>-- <Accordion title="--poll-interval">- Seconds between permission and credential refreshes. Changes to proxied services, permissions, and secret values take effect within one interval; if your authorization lapses, cached credentials are dropped on the same cycle.-- ```bash- # Example- infisical secrets agent-proxy run --env=dev --poll-interval 30 -- claude- ```-- Default value: `60`- </Accordion>-- <Accordion title="--log-file">- Write the proxy's [per-request activity](/documentation/platform/agent-proxy/activity-logs) to this path. Without it nothing is logged, since the agent owns the terminal: warnings and errors still print there, but the per-request trail is dropped. The path is appended to on every run and never rotated for you, so use `logrotate` (`copytruncate`) if you keep one. `--log-level` filters which decisions are recorded, the same as on `start`.-- ```bash- # Example- infisical secrets agent-proxy run --env=dev --log-file=/tmp/broker.log -- claude- ```- </Accordion>-</Accordion>--### Standalone proxy, on a host of its own--These two are used together, on different hosts: `start` on the proxy host, `connect` on each agent host.--<Accordion title="infisical secrets agent-proxy start">- Start the agent proxy, an HTTP(S) forward proxy that brokers credentials for the agents that connect to it. Requires machine identity credentials with read access to the secrets your proxied services reference.-- Agents reach HTTPS services through standard `CONNECT` tunnels and plain-HTTP services through regular forward-proxy requests; credentials are brokered on both. Requests for `https://` URLs sent as plain forward-proxy requests (rather than `CONNECT`) are rejected so the proxy can never be used to downgrade TLS.--```bash-infisical secrets agent-proxy start--# Example-infisical secrets agent-proxy start --port 17322 --unmatched-host=block-```--### Environment variables-- <Accordion title="INFISICAL_UNIVERSAL_AUTH_CLIENT_ID / INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET">- The Universal Auth credentials of the agent proxy's machine identity. Alternative to passing `--client-id` and `--client-secret`.-- ```bash- # Example- export INFISICAL_UNIVERSAL_AUTH_CLIENT_ID=<agent-proxy-client-id>- export INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET=<agent-proxy-client-secret>- ```- </Accordion>-- <Accordion title="INFISICAL_DOMAIN">- Point the CLI to your Infisical instance (for example `https://eu.infisical.com` for EU Cloud, or your self-hosted URL). Alternative to the `--domain` flag.-- ```bash- # Example- export INFISICAL_DOMAIN=https://eu.infisical.com- ```- </Accordion>--### Flags-- <Accordion title="--port">- Port for the agent proxy to listen on.-- ```bash- # Example- infisical secrets agent-proxy start --port 18000- ```-- Default value: `17322`- </Accordion>-- <Accordion title="--unmatched-host">- Policy for requests to hosts with no matching proxied service: `allow` forwards them untouched with no credentials applied (the normal mode: documentation, package registries, and services the agent authenticates to itself pass straight through); `block` rejects them with `403`, restricting agents to the services you have defined.-- ```bash- # Example- infisical secrets agent-proxy start --unmatched-host=block- ```-- Default value: `allow`-- <Note>- `block` blocks every host without a matching proxied service, including your Infisical instance itself. Since agent traffic routes through the proxy, Infisical CLI commands run from inside the agent (using the `INFISICAL_TOKEN` from its environment) will also be rejected in this mode.- </Note>- </Accordion>-- <Accordion title="--poll-interval">- Seconds between permission and credential refreshes for active agents. Changes to proxied services, permissions, and secret values (for example, after a rotation) take effect within one interval.-- ```bash- # Example- infisical secrets agent-proxy start --poll-interval 30- ```-- Default value: `60`- </Accordion>-- <Accordion title="--client-id / --client-secret">- Universal Auth credentials for the agent proxy's machine identity. Alternative to the `INFISICAL_UNIVERSAL_AUTH_CLIENT_ID` / `INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET` environment variables.-- ```bash- # Example- infisical secrets agent-proxy start --client-id=<client-id> --client-secret=<client-secret>- ```- </Accordion>-- <Accordion title="--log-format">- Output format for the proxy's logs, including [per-request activity](/documentation/platform/agent-proxy/activity-logs): `console` (human-readable, colorized in a terminal and plain otherwise) or `json` (machine). Logs are written to stderr.-- ```bash- # Example- infisical secrets agent-proxy start --log-format=json- ```-- Default value: `console`- </Accordion>-- <Accordion title="--log-file">- Also write logs as `json` to this file, in addition to the console/json stream. Lets you watch the console and persist machine-readable logs at the same time. Rotate it with `logrotate` (`copytruncate`) or restart the proxy.-- ```bash- # Example- infisical secrets agent-proxy start --log-file=/var/log/infisical/agent-proxy.log- ```- </Accordion>-- <Accordion title="--log-level">- Controls how much is logged. Each [activity decision](/documentation/platform/agent-proxy/activity-logs) maps to a level (`passthrough`=debug, `canceled`=debug, `brokered`=info, `blocked`=warn, `error`=error), so this doubles as the activity filter: `debug` shows everything, the default `info` hides passthrough and canceled requests, `warn` shows only blocked and errors.-- ```bash- # Example- infisical secrets agent-proxy start --log-level=warn- ```-- Default value: `info`- </Accordion>-</Accordion>--<Accordion title="infisical secrets agent-proxy connect">- Set up the environment and launch an agent behind the agent proxy. Everything after `--` is the agent's own start command. The wrapper authenticates the agent's machine identity, then starts the agent process with:-- - `HTTPS_PROXY` / `HTTP_PROXY` pointing at the agent proxy, plus `NO_PROXY` (always includes `localhost,127.0.0.1`, merged with any `NO_PROXY` already in your environment and the `--no-proxy` flag).- - The organization's root CA written to `~/.infisical/agent-proxy/mitm-ca.pem` and trusted via `SSL_CERT_FILE`, `NODE_EXTRA_CA_CERTS`, `REQUESTS_CA_BUNDLE`, `CURL_CA_BUNDLE`, `GIT_SSL_CAINFO`, and `DENO_CERT`.- - Dummy placeholder environment variables for credential-substitution services the agent has **Proxy** access to.- - Real values for regular secrets the agent has **Read Value** on in the scoped folder, including secrets imported into it (similar to `infisical run`). This is opt-in; an agent identity scoped to just the proxy permission has no read access, and brokered credentials never appear in the agent's environment. If the agent can read a secret that a proxied service brokers to it, `connect` refuses to start, since the agent would receive the real value directly and bypass the proxy; fix the permissions or pass `--allow-readable-brokered-secrets` to override.- - `INFISICAL_TOKEN` set to the agent's access token, so the agent can run Infisical CLI commands itself.-- The client ID and client secret used to authenticate are stripped from the child environment. The wrapper forwards signals to the agent process and exits with its exit code.-- <Note>- Every input below resolves from the same sources, in order: **the flag → an environment variable → `.infisical.json` → the built-in default.** An explicitly-passed flag always wins. This is why, where the environment variables are already set on the host, the command collapses to `infisical secrets agent-proxy connect -- claude`.- </Note>--```bash-infisical secrets agent-proxy connect --proxy=<host>:<port> --projectId=<project-id> --env=<env-slug> -- [agent start command]--# With flags-infisical secrets agent-proxy connect --proxy=<proxy-host>:17322 --projectId=<project-id> --env=prod --path=/ai-agents -- claude--# With configuration from environment variables (see below) or .infisical.json-infisical secrets agent-proxy connect -- claude-```--### Environment variables-- <Accordion title="INFISICAL_UNIVERSAL_AUTH_CLIENT_ID / INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET">- The Universal Auth credentials of the agent's machine identity. Alternative to passing `--client-id` and `--client-secret`.-- ```bash- # Example- export INFISICAL_UNIVERSAL_AUTH_CLIENT_ID=<agent-client-id>- export INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET=<agent-client-secret>- ```- </Accordion>-- <Accordion title="INFISICAL_PROJECT_ID">- The project to fetch proxied services and secrets from. Alternative to the `--projectId` flag or the `workspaceId` field in `.infisical.json` (created by `infisical init`).-- ```bash- # Example- export INFISICAL_PROJECT_ID=<project-id>- ```- </Accordion>-- <Accordion title="INFISICAL_ENVIRONMENT">- The environment slug to fetch proxied services and secrets from. Alternative to the `--env` flag or the `defaultEnvironment` field in `.infisical.json`.-- ```bash- # Example- export INFISICAL_ENVIRONMENT=prod- ```- </Accordion>-- <Accordion title="INFISICAL_SECRET_PATH">- The secret path (folder) to scope to. Alternative to the `--path` flag or the `defaultSecretPath` field in `.infisical.json`.-- ```bash- # Example- export INFISICAL_SECRET_PATH=/ai-agents- ```- </Accordion>-- <Accordion title="INFISICAL_AGENT_PROXY_ADDRESS">- Address of the agent proxy as `host:port`. Alternative to the `--proxy` flag.-- ```bash- # Example- export INFISICAL_AGENT_PROXY_ADDRESS=<proxy-host>:17322- ```- </Accordion>-- <Accordion title="INFISICAL_DOMAIN">- Point the CLI to your Infisical instance. Alternative to the `--domain` flag.-- ```bash- # Example- export INFISICAL_DOMAIN=https://eu.infisical.com- ```- </Accordion>--### Flags-- <Accordion title="--proxy">- Address of the agent proxy as `host:port`. Required, unless provided via `INFISICAL_AGENT_PROXY_ADDRESS`.-- ```bash- # Example- infisical secrets agent-proxy connect --proxy=<proxy-host>:17322 --env=prod -- claude- ```- </Accordion>-- <Accordion title="--env">- The environment slug to fetch proxied services and secrets from (for example `dev`, `staging`, `prod`). Falls back to `INFISICAL_ENVIRONMENT`, then to the `defaultEnvironment` (and git-branch mapping) in `.infisical.json`; required otherwise.-- ```bash- # Example- infisical secrets agent-proxy connect --proxy=<proxy-host>:17322 --env=staging -- codex- ```- </Accordion>-- <Accordion title="--path">- The secret path (folder) to scope to. Proxied services and secrets are fetched from this folder. Falls back to `INFISICAL_SECRET_PATH`, then to the `defaultSecretPath` field in `.infisical.json`.-- ```bash- # Example- infisical secrets agent-proxy connect --proxy=<proxy-host>:17322 --env=prod --path=/ai-agents -- claude- ```-- Default value: `/`- </Accordion>-- <Accordion title="--no-proxy">- Additional comma-separated hosts that should bypass the proxy. Always merged with `localhost,127.0.0.1` and any `NO_PROXY` already set in your environment.-- ```bash- # Example- infisical secrets agent-proxy connect --proxy=<proxy-host>:17322 --env=prod --no-proxy=internal.corp.com -- claude- ```- </Accordion>-- <Accordion title="--projectId">- The project to fetch proxied services and secrets from. Falls back to the `INFISICAL_PROJECT_ID` environment variable, then to `.infisical.json`.-- ```bash- # Example- infisical secrets agent-proxy connect --proxy=<proxy-host>:17322 --env=prod --projectId=<project-id> -- claude- ```- </Accordion>-- <Accordion title="--client-id / --client-secret">- Universal Auth credentials for the agent's machine identity. Alternative to the `INFISICAL_UNIVERSAL_AUTH_CLIENT_ID` / `INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET` environment variables.-- ```bash- # Example- infisical secrets agent-proxy connect --proxy=<proxy-host>:17322 --env=prod --client-id=<client-id> --client-secret=<client-secret> -- claude- ```- </Accordion>-- <Accordion title="--token">- Authenticate with a pre-fetched machine identity access token instead of client credentials.-- ```bash- # Example- infisical secrets agent-proxy connect --proxy=<proxy-host>:17322 --env=prod --token=<access-token> -- claude- ```- </Accordion>-- <Accordion title="--allow-readable-brokered-secrets">- Start even if the agent can **Read Value** on a secret that a proxied service brokers to it. By default `connect` refuses to start in that case, since the agent would receive the real value directly and bypass the proxy, defeating the point of brokering it. This is a misconfiguration guardrail, not a security boundary: the real fix is to not grant the agent read access to brokered secrets. Use this flag only for the rare intentional case. Can also be set via `INFISICAL_AGENT_PROXY_ALLOW_READABLE_BROKERED_SECRETS`.-- ```bash- # Example- infisical secrets agent-proxy connect --proxy=<proxy-host>:17322 --env=prod --allow-readable-brokered-secrets -- claude- ```-- Default value: `false`- </Accordion>-</Accordion>--### Shared--<Accordion title="Flags accepted by every subcommand">-- <Accordion title="--domain">- Point the CLI to your Infisical instance (for example `https://eu.infisical.com` for EU Cloud, or your self-hosted URL). Can also be set via the `INFISICAL_DOMAIN` environment variable or the `domain` field in `.infisical.json`. Required for non-US Cloud users.-- ```bash- # Example- infisical secrets agent-proxy start --domain=https://your-instance.com- ```-- Default value: `https://app.infisical.com`- </Accordion>-</Accordion>diff --git a/docs/cli/commands/agent-vault.mdx b/docs/cli/commands/agent-vault.mdxdeleted file mode 100644index 4cb9bfbffb..0000000000--- a/docs/cli/commands/agent-vault.mdx+++ /dev/null@@ -1,280 +0,0 @@-----title: "infisical agent-vault"-description: "Run an Agent Vault proxy, and launch agents through it"------```bash-# Where agent traffic leaves your network-infisical agent-vault proxy --enrollment-token <enrollment-token>--# Where the agent runs-infisical agent-vault run --session-token <session-token> --proxy <proxy-host>:17323 -- claude-infisical agent-vault run --access-bundle <bundle-name> --proxy <proxy-host>:17323 -- claude-```--## Description--These subcommands are the CLI half of [Agent Vault](/documentation/platform/agent-vault/overview). `proxy` runs the process that attaches credentials to agent traffic. `run` launches an agent with its HTTP traffic routed through a proxy and a session token to identify it.--The two usually run on different machines. You change a proxy's settings on the **Proxies** page, not with flags. If the proxy is running, it applies the change within one [poll interval](/documentation/platform/agent-vault/proxies#poll-interval).--`av` is an alias for `agent-vault`, so `infisical av run` works wherever `infisical agent-vault run` does.--## infisical agent-vault proxy--Run an Agent Vault proxy. Enroll once with the token shown when the proxy was created. Later runs need no token. The proxy keeps its certificate authority, its token, and its last settings in a data directory, and passing the same enrollment token again on a restart is harmless. See [Proxies](/documentation/platform/agent-vault/proxies).--```bash-infisical agent-vault proxy --enrollment-token <enrollment-token>--# Once enrolled-infisical agent-vault proxy--# Example-infisical agent-vault proxy --port 18000 --log-format json --log-file /var/log/infisical/agent-vault.log-```--### Flags--#### `--enrollment-token`--The one-time token shown when the proxy was created, valid for an hour. Needed on the first run and on a re-enrollment; a proxy that has already enrolled serves without it.--```bash-# Example-infisical agent-vault proxy --enrollment-token <enrollment-token>-```--#### `--data-dir`--Where to keep the certificate authority and proxy token. Must persist across restarts.--```bash-# Example-infisical agent-vault proxy --data-dir /var/lib/infisical/agent-vault-```--Default value: `~/.infisical/agent-vault`, or `/etc/infisical/agent-vault` when run as root--#### `--port`--Port to listen on.--```bash-# Example-infisical agent-vault proxy --port 18000-```--Default value: `17323`--#### `--log-format`--`console` for a human-readable stream, `json` for machines. Logs go to stderr.--```bash-# Example-infisical agent-vault proxy --log-format json-```--Default value: `console`--#### `--log-file`--Also write logs to this file.--```bash-# Example-infisical agent-vault proxy --log-file /var/log/infisical/agent-vault.log-```--### Environment variables--#### `INFISICAL_AGENT_VAULT_ENROLLMENT_TOKEN`--The one-time enrollment token from the Proxies page. Alternative to `--enrollment-token`, and the way to keep the token off the command line.--```bash-# Example-export INFISICAL_AGENT_VAULT_ENROLLMENT_TOKEN=<enrollment-token>-```--#### `INFISICAL_AGENT_VAULT_DATA_DIR`--Where the proxy keeps its certificate authority and token. Alternative to `--data-dir`.--```bash-# Example-export INFISICAL_AGENT_VAULT_DATA_DIR=/var/lib/infisical/agent-vault-```--#### `INFISICAL_DOMAIN`--Point the CLI to your Infisical instance. Alternative to the [`--domain`](#flags-accepted-by-every-subcommand) flag, which every subcommand accepts.--```bash-# Example-export INFISICAL_DOMAIN=https://eu.infisical.com-```--## infisical agent-vault run--Launch an agent through an Agent Vault proxy. Everything after `--` is the agent's own command. On each run, the CLI:--- Fetches the proxy's certificate authority from the proxy, checks it against `--ca-fingerprint` if you passed one, and writes it to `--ca-file`.-- Gets a session: the one you pass with `--session-token`, or one created now with the access bundle named by `--access-bundle`. Exactly one of the two is required.-- Starts the agent with `HTTPS_PROXY` and `HTTP_PROXY` pointing at the proxy, `NO_PROXY` set to `localhost,127.0.0.1` merged with your own `NO_PROXY` and `--no-proxy`, and the certificate trusted through `SSL_CERT_FILE`, `NODE_EXTRA_CA_CERTS`, `REQUESTS_CA_BUNDLE`, `CURL_CA_BUNDLE`, `GIT_SSL_CAINFO`, and `DENO_CERT`.--The CLI prints the proxy's name and fingerprint and, for a session it created, when it expires, then hands the terminal to the agent. When the agent exits, a session created with `--access-bundle` is revoked unless `--keep-session` was set. A session passed with `--session-token` is left alone.--```bash-infisical agent-vault run --session-token <session-token> --proxy <proxy-host>:17323 -- [agent start command]--# Pin the certificate authority the proxy serves-infisical agent-vault run --session-token <session-token> --proxy 10.0.1.5:17323 --ca-fingerprint SHA256:9F:2C:... -- claude--# Create the session here instead, as your login or a machine identity-infisical agent-vault run --access-bundle on-call-infrastructure --proxy 10.0.1.5:17323 -- claude-```--### Flags--#### `--session-token`--Run with a session token created in the dashboard. No login is needed, and the CLI never revokes the session. Can't be combined with `--access-bundle`.--```bash-# Example-infisical agent-vault run --session-token <session-token> --proxy 10.0.1.5:17323 -- claude-```--#### `--access-bundle`--Create a session with this access bundle, by name. Pass it once. Creates it as the machine identity from `--client-id` and `--client-secret`, or as your login. The machine identity has to be an Agent Vault member with a grant on the access bundle. Can't be combined with `--session-token`.--```bash-# Example-infisical agent-vault run --access-bundle code-review --proxy 10.0.1.5:17323 -- claude-```--#### `--proxy`--Address of the Agent Vault proxy as `host:port`. Required, unless set through `INFISICAL_AGENT_VAULT_PROXY_ADDRESS`.--```bash-# Example-infisical agent-vault run --access-bundle code-review --proxy 10.0.1.5:17323 -- claude-```--#### `--ttl`--How long the new session lives: one number and one unit, such as `30m`, `8h`, or `7d` (not `2h30m`), or `never`. One minute is the shortest. Only applies with `--access-bundle`.--```bash-# Example-infisical agent-vault run --access-bundle code-review --ttl 8h --proxy 10.0.1.5:17323 -- claude-```--Default value: `7d`--#### `--keep-session`--Leave the session active when the agent exits instead of revoking it. Only applies with `--access-bundle`.--```bash-# Example-infisical agent-vault run --access-bundle code-review --keep-session --proxy 10.0.1.5:17323 -- claude-```--Default value: `false`--#### `--ca-fingerprint`--Abort unless the certificate authority the proxy serves matches this SHA256 fingerprint, copied from the Proxies page. Accepted with or without the `SHA256:` prefix and colons.--```bash-# Example-infisical agent-vault run --session-token <session-token> --proxy 10.0.1.5:17323 --ca-fingerprint SHA256:9F:2C:... -- claude-```--#### `--ca-file`--Where to write the certificate authority fetched from the proxy.--```bash-# Example-infisical agent-vault run --access-bundle code-review --proxy 10.0.1.5:17323 --ca-file /tmp/agent-vault-ca.pem -- claude-```--Default value: `~/.infisical/agent-vault/ca-<proxy-id>.pem`, one file per proxy--#### `--no-ca-trust`--Skip writing the certificate authority and setting the trust variables, for a machine that already trusts this proxy's certificate. A `--ca-fingerprint` mismatch is still caught.--```bash-# Example-infisical agent-vault run --session-token <session-token> --proxy 10.0.1.5:17323 --no-ca-trust -- claude-```--Default value: `false`--#### `--no-proxy`--Additional comma-separated hosts the agent reaches directly, without the proxy. Always merged with `localhost,127.0.0.1` and any `NO_PROXY` already in your environment.--```bash-# Example-infisical agent-vault run --access-bundle code-review --proxy 10.0.1.5:17323 --no-proxy internal.corp.com -- claude-```--#### `--client-id / --client-secret`--Universal Auth credentials of the machine identity that creates the session. Alternative to the `INFISICAL_UNIVERSAL_AUTH_CLIENT_ID` and `INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET` environment variables.--```bash-# Example-infisical agent-vault run --access-bundle code-review --client-id <client-id> --client-secret <client-secret> --proxy 10.0.1.5:17323 -- claude-```--### Environment variables--#### `INFISICAL_AGENT_VAULT_PROXY_ADDRESS`--Address of the proxy as `host:port`. Alternative to `--proxy`.--```bash-# Example-export INFISICAL_AGENT_VAULT_PROXY_ADDRESS=10.0.1.5:17323-```--#### `INFISICAL_UNIVERSAL_AUTH_CLIENT_ID / INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET`--Universal Auth credentials of the machine identity that creates the session when you use `--access-bundle`. Alternative to `--client-id` and `--client-secret`. Without them the CLI creates it as your logged-in user.--```bash-# Example-export INFISICAL_UNIVERSAL_AUTH_CLIENT_ID=<client-id>-export INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET=<client-secret>-```--#### `INFISICAL_DOMAIN`--Point the CLI to your Infisical instance. Alternative to the [`--domain`](#flags-accepted-by-every-subcommand) flag, which every subcommand accepts.--```bash-# Example-export INFISICAL_DOMAIN=https://eu.infisical.com-```--## Flags accepted by every subcommand--#### `--domain`--Point the CLI to your Infisical instance, such as `https://eu.infisical.com` for EU Cloud or your self-hosted URL. Can also be set through the `INFISICAL_DOMAIN` environment variable.--```bash-# Example-infisical agent-vault proxy --domain https://your-instance.com --enrollment-token <enrollment-token>-```--Default value: `https://app.infisical.com`diff --git a/docs/cli/commands/bootstrap.mdx b/docs/cli/commands/bootstrap.mdxdeleted file mode 100644index 63486f3029..0000000000--- a/docs/cli/commands/bootstrap.mdx+++ /dev/null@@ -1,257 +0,0 @@-----title: "infisical bootstrap"-description: "Automate the initial setup of a new Infisical instance for headless deployment and infrastructure-as-code workflows"------```bash-infisical bootstrap --domain=<domain> --email=<email> --password=<password> --organization=<organization>-```--## Description--The `infisical bootstrap` command is used when deploying Infisical in automated environments where manual UI setup isn't feasible. It's ideal for:--- Containerized deployments in Kubernetes or Docker environments-- Infrastructure-as-code pipelines with Terraform or similar tools-- Continuous deployment workflows-- DevOps automation scenarios--The command initializes a fresh Infisical instance by creating an admin user, organization, and instance admin machine identity, enabling subsequent programmatic configuration without human intervention.--<Warning>- This command creates an instance admin machine identity with the highest level- of privileges. The returned token should be treated with the utmost security,- similar to a root credential. Unauthorized access to this token could- compromise your entire Infisical instance.-</Warning>--## Flags--<Accordion title="--domain" defaultOpen="true">- The URL of your Infisical instance. This can be set using the `INFISICAL_API_URL` environment variable.--```bash-# Example-infisical bootstrap --domain=https://your-infisical-instance.com-```--This flag is required.--</Accordion>--<Accordion title="--email">- Email address for the admin user account that will be created. This can be set using the `INFISICAL_ADMIN_EMAIL` environment variable.--```bash-# Example-infisical bootstrap [email protected]-```--This flag is required.--</Accordion>--<Accordion title="--password">- Password for the admin user account. This can be set using the `INFISICAL_ADMIN_PASSWORD` environment variable.--```bash-# Example-infisical bootstrap --password=your-secure-password-```--This flag is required.--</Accordion>--<Accordion title="--organization">- Name of the organization that will be created within the instance. This can be set using the `INFISICAL_ADMIN_ORGANIZATION` environment variable.--```bash-# Example-infisical bootstrap --organization=your-org-name-```--This flag is required.--</Accordion>--<Accordion title="--ignore-if-bootstrapped">- Whether to continue without error if the instance has already been bootstrapped. Useful for idempotent automation scripts.--```bash-# Example-infisical bootstrap --ignore-if-bootstrapped-```--This flag is optional and defaults to `false`.--</Accordion>--<Accordion title="--output">- The type of output format for the bootstrap command. Supports `k8-secret` for Kubernetes secret integration. This flag is optional and defaults to "".--```bash-# Kubernetes secret output-infisical bootstrap --output=k8-secret --k8-secret-template='{"data":{"token":"{{.Identity.Credentials.Token}}"}}' --k8-secret-name=infisical-bootstrap --k8-secret-namespace=default-```--When using `k8-secret`, the command will create or update a Kubernetes secret directly in your cluster. Note that this option requires the command to be executed from within a Kubernetes pod with appropriate service account permissions.--</Accordion>--<Accordion title="--k8-secret-template">- The template to use for rendering the Kubernetes secret data/stringData section. Required when using `--output=k8-secret`. The template uses Go template syntax and has access to the bootstrap response data.--```bash-# Example template that stores the token-infisical bootstrap --k8-secret-template='{"data":{"token":"{{.Identity.Credentials.Token}}"}}'--# Example template with multiple fields-infisical bootstrap --k8-secret-template='{"stringData":{"token":"{{.Identity.Credentials.Token}}","org-id":"{{.Organization.ID}}","user-email":"{{.User.Email}}"}}'-```--Available template functions:--- `encodeBase64`: Base64 encode a string--Available data fields:--- `.Identity.Credentials.Token`: The machine identity token-- `.Identity.ID`: The identity ID-- `.Identity.Name`: The identity name-- `.Organization.ID`: The organization ID-- `.Organization.Name`: The organization name-- `.Organization.Slug`: The organization slug-- `.User.Email`: The admin user email-- `.User.ID`: The admin user ID-- `.User.FirstName`: The admin user first name-- `.User.LastName`: The admin user last name--This flag is required when using `k8-secret` output.--</Accordion>--<Accordion title="--k8-secret-name">- The name of the Kubernetes secret to create or update. Required when using `--output=k8-secret`.--```bash-# Example-infisical bootstrap --k8-secret-name=infisical-bootstrap-credentials-```--This flag is required when using `k8-secret` output.--</Accordion>--<Accordion title="--k8-secret-namespace">- The namespace where the Kubernetes secret should be created or updated. Required when using `--output=k8-secret`.--```bash-# Example-infisical bootstrap --k8-secret-namespace=infisical-system-```--This flag is required when using `k8-secret` output.--</Accordion>--## Response--### JSON output (default)--The command returns a JSON response with details about the created user, organization, and machine identity:--```json-{- "identity": {- "credentials": {- "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZGVudGl0eUlkIjoiZGIyMjQ3OTItZWQxOC00Mjc3LTlkYWUtNTdlNzUyMzE1ODU0IiwiaWRlbnRpdHlBY2Nlc3NUb2tlbklkIjoiZmVkZmZmMGEtYmU3Yy00NjViLWEwZWEtZjM5OTNjMTg4OGRlIiwiYXV0aFRva2VuVHlwZSI6ImlkZW50aXR5QWNjZXNzVG9rZW4iLCJpYXQiOjE3NDIzMjI0ODl9.mqcZZqIFqER1e9ubrQXp8FbzGYi8nqqZwfMvz09g-8Y"- },- "id": "db224792-ed18-4277-9dae-57e752315854",- "name": "Instance Admin Identity"- },- "message": "Successfully bootstrapped instance",- "organization": {- "id": "b56bece0-42f5-4262-b25e-be7bf5f84957",- "name": "dog",- "slug": "dog-v-e5l"- },- "user": {- "email": "[email protected]",- "firstName": "Admin",- "id": "a418f355-c8da-453c-bbc8-6c07208eeb3c",- "lastName": "User",- "superAdmin": true,- "username": "[email protected]"- }-}-```--### Kubernetes secret output--When using `--output=k8-secret`, the command creates or updates a Kubernetes secret in your cluster and logs the operation result. This is particularly useful for automated bootstrapping scenarios such as Kubernetes Jobs, GitOps workflows, or when you need to immediately store the admin credentials for use by other applications in your cluster.--## Kubernetes integration--### Prerequisites for k8-secret output--When running with `--output=k8-secret`, the command must be executed from within a Kubernetes pod with proper service account permissions. The command automatically:--1. Reads the service account token from `/var/run/secrets/kubernetes.io/serviceaccount/token`-2. Reads the CA certificate from `/var/run/secrets/kubernetes.io/serviceaccount/ca.crt`-3. Gets the Kubernetes API server URL from environment variables (`KUBERNETES_SERVICE_HOST` and `KUBERNETES_SERVICE_PORT_HTTPS`)--### Required RBAC permissions--Your service account needs the following permissions:--```yaml-apiVersion: rbac.authorization.k8s.io/v1-kind: Role-metadata:- name: infisical-bootstrap-rules:- - apiGroups: [""]- resources: ["secrets"]- verbs: ["get", "create", "update"]-----apiVersion: rbac.authorization.k8s.io/v1-kind: RoleBinding-metadata:- name: infisical-bootstrap-subjects:- - kind: ServiceAccount- name: your-service-account-roleRef:- kind: Role- name: infisical-bootstrap- apiGroup: rbac.authorization.k8s.io-```--## Usage with automation--For automation purposes, you can extract just the machine identity token from the response:--```bash-infisical bootstrap --domain=https://your-infisical-instance.com [email protected] --password=your-secure-password --organization=your-org-name | jq ".identity.credentials.token"-```--This extracts only the token, which can be captured in a variable or piped to other commands.--## Example: Capture token in a variable--```bash-TOKEN=$(infisical bootstrap --domain=https://your-infisical-instance.com [email protected] --password=your-secure-password --organization=your-org-name | jq -r ".identity.credentials.token")--# Now use the token for further automation-echo "Token has been captured and can be used for authentication"-```--## Notes--- The bootstrap process can only be performed once on a fresh Infisical instance-- All core flags (domain, email, password, organization) are required for the bootstrap process to complete successfully-- Security controls prevent privilege escalation: instance admin identities can't be managed by non-instance admin users and identities-- The generated admin user account can be used to log in via the UI if needed-- When using `k8-secret` output, the command must run within a Kubernetes pod with proper service account permissions-- The `--ignore-if-bootstrapped` flag is useful for making bootstrap scripts idempotentdiff --git a/docs/cli/commands/commands.mdx b/docs/cli/commands/commands.mdxdeleted file mode 100644index 278f061b72..0000000000--- a/docs/cli/commands/commands.mdx+++ /dev/null@@ -1,22 +0,0 @@-----title: "Commands"-description: "Infisical CLI command overview"------## Commands--| Command | Description |-| ------- | -------------------------------------------------------------------- |-| `login` | Used to authenticate and set the logged in user. |-| `init` | Used to link a local project to the platform. |-| `run` | Used to inject envars from the platform into an application process. |-| `vault` | Used to manage where your login credentials are stored at rest |--## Global options--| Option | Description |-| ----------------- | ----------------------------------------------- |-| `--help`, `-h` | List help for any command |-| `--debug`, `-d` | Enable verbose logging |-| `--domain` | Use to direct Infisical to a self-hosted domain |-| `--version`, `-v` | Print version information and quit |diff --git a/docs/cli/commands/dynamic-secrets.mdx b/docs/cli/commands/dynamic-secrets.mdxdeleted file mode 100644index 0b4d8ec52d..0000000000--- a/docs/cli/commands/dynamic-secrets.mdx+++ /dev/null@@ -1,373 +0,0 @@-----title: "infisical dynamic-secrets"-description: "Perform dynamic secret operations directly with the CLI"------```-infisical dynamic-secrets-```--## Description--Dynamic secrets are unique secrets generated on demand based on the provided configuration settings. For more details, refer to [dynamics secrets section](/documentation/platform/dynamic-secrets/overview).--This command enables you to perform list, lease, renew lease, and revoke lease operations on dynamic secrets within your Infisical project.--### Sub-commands--<Accordion title="infisical dynamic-secrets">- Use this command to print out all of the dynamic secrets in your project.--```bash-infisical dynamic-secrets-```--### Environment variables--<Accordion title="INFISICAL_TOKEN">- Used to fetch dynamic secrets via a [machine identity](/documentation/platform/identities/machine-identities) instead of logged-in credentials. Simply, export this variable in the terminal before running this command.--```bash-# Example-export INFISICAL_TOKEN=$(infisical login --method=universal-auth --client-id=<identity-client-id> --client-secret=<identity-client-secret> --silent --plain) # --plain flag will output only the token, so it can be fed to an environment variable. --silent will disable any update messages.-```--</Accordion>--<Accordion title="INFISICAL_DISABLE_UPDATE_CHECK">- Used to disable the check for new CLI versions. This can improve the time it takes to run this command. Recommended for production environments.--To use, simply export this variable in the terminal before running this command.--```bash-# Example-export INFISICAL_DISABLE_UPDATE_CHECK=true-```--</Accordion>--### Flags--<Accordion title="--projectId">- The project ID to fetch dynamic secrets from.--```bash-# Example-infisical dynamic-secrets --projectId=<project-id>-```--</Accordion>--<Accordion title="--project-slug">- The project slug to fetch dynamic secrets from.--```bash-# Example-infisical dynamic-secrets --project-slug=<project-slug>-```--</Accordion>--<Accordion title="--token">- The authenticated token to fetch dynamic secrets from. This is required when using a machine identity to authenticate.--```bash-# Example-infisical dynamic-secrets --token=<token>-```--</Accordion>--<Accordion title="--env">- Used to select the environment name on which actions should be taken. Default- value: `dev`-</Accordion>--<Accordion title="--path">- Use to select the project folder on which dynamic secrets will be accessed.--```bash-# Example-infisical dynamic-secrets --path="/" --env=dev-```--</Accordion>-</Accordion>-<Accordion title="infisical dynamic-secrets lease create">- This command is used to create a new lease for a dynamic secret.--```bash-infisical dynamic-secrets lease create <dynamic-secret-name>-```--### Flags--<Accordion title="--env">- Used to select the environment name on which actions should be taken. Default- value: `dev`-</Accordion>--<Accordion title="--plain">- The `--plain` flag will output dynamic secret lease credentials values without formatting, one per line.- Default value: `false`--```bash-# Example-infisical dynamic-secrets lease create dynamic-secret-postgres --plain-```--</Accordion>--<Accordion title="--path">- The `--path` flag indicates which project folder dynamic secrets will be injected from.--```bash-# Example-infisical dynamic-secrets lease create <dynamic-secret-name> --path="/" --env=dev-```--</Accordion>--<Accordion title="--projectId">- The project ID of the dynamic secrets to lease from.--```bash-# Example-infisical dynamic-secrets lease create <dynamic-secret-name> --projectId=<project-id>-```--</Accordion>--<Accordion title="--project-slug">- The project slug of the dynamic secrets to lease from.--```bash-# Example-infisical dynamic-secrets lease create <dynamic-secret-name> --project-slug=<project-slug>-```--</Accordion>--<Accordion title="--token">- The authenticated token to create dynamic secret leases. This is required when using a machine identity to authenticate.--```bash-# Example-infisical dynamic-secrets lease create <dynamic-secret-name> --token=<token>-```--</Accordion>--<Accordion title="--ttl">- The lease lifetime. If not provided, the default TTL of the dynamic secret root credential will be used.--```bash-# Example-infisical dynamic-secrets lease create <dynamic-secret-name> --ttl=<ttl>-```--</Accordion>--### Provider-specific flags--The following flags are specific to certain providers or integrations:--<Accordion title="Kubernetes">- <Accordion title="--kubernetes-namespace">- The namespace to create the lease in. Only used for Kubernetes dynamic secrets.-- ```bash- # Example- infisical dynamic-secrets lease create <dynamic-secret-name> --kubernetes-namespace=<namespace>- ```-- </Accordion>-</Accordion>--<Accordion title="SSH">- <Accordion title="--principals">- Comma-separated list of principals for the SSH certificate. Only used for SSH dynamic secrets. The requested principals must be in the allowed list configured on the dynamic secret.-- ```bash- # Example- infisical dynamic-secrets lease create <dynamic-secret-name> --principals=root,deploy- ```-- </Accordion>-</Accordion>--</Accordion>-<Accordion title="infisical dynamic-secrets lease list">- This command is used to list leases for a dynamic secret.--```bash-infisical dynamic-secrets lease list <dynamic-secret-name>-```--### Flags--<Accordion title="--env">- Used to select the environment name on which actions should be taken. Default- value: `dev`-</Accordion>--<Accordion title="--path">- The `--path` flag indicates which project folder dynamic secrets will be injected from.--```bash-# Example-infisical dynamic-secrets lease list <dynamic-secret-name> --path="/" --env=dev-```--</Accordion>--<Accordion title="--projectId">- The project ID of the dynamic secrets to list leases from.--```bash-# Example-infisical dynamic-secrets lease list <dynamic-secret-name> --projectId=<project-id>-```--</Accordion>--<Accordion title="--project-slug">- The project slug of the dynamic secrets to list leases from.--```bash-# Example-infisical dynamic-secrets lease list <dynamic-secret-name> --project-slug=<project-slug>-```--</Accordion>--<Accordion title="--token">- The authenticated token to list dynamic secret leases. This is required when using a machine identity to authenticate.--```bash-# Example-infisical dynamic-secrets lease list <dynamic-secret-name> --token=<token>-```--</Accordion>-</Accordion>--<Accordion title="infisical dynamic-secrets lease renew">- This command is used to renew a lease before it expires.--```bash-infisical dynamic-secrets lease renew <lease-id>-```--### Flags--<Accordion title="--env">- Used to select the environment name on which actions should be taken. Default- value: `dev`-</Accordion>--<Accordion title="--path">- The `--path` flag indicates which project folder dynamic secrets will be renewed from.--```bash-# Example-infisical dynamic-secrets lease renew <lease-id> --path="/" --env=dev-```--</Accordion>--<Accordion title="--projectId">- The project ID of the dynamic secret to lease from.--```bash-# Example-infisical dynamic-secrets lease renew <lease-id> --projectId=<project-id>-```--</Accordion>--<Accordion title="--project-slug">- The project slug of the dynamic secret to lease from.--```bash-# Example-infisical dynamic-secrets lease renew <lease-id> --project-slug=<project-slug>-```--</Accordion>--<Accordion title="--token">- The authenticated token to create dynamic secret leases. This is required when using a machine identity to authenticate.--```bash-# Example-infisical dynamic-secrets lease renew <lease-id> --token=<token>-```--</Accordion>--<Accordion title="--ttl">- The lease lifetime. If not provided, the default TTL of the dynamic secret root credential will be used.--```bash-# Example-infisical dynamic-secrets lease renew <lease-id> --ttl=<ttl>-```--</Accordion>-</Accordion>--<Accordion title="infisical dynamic-secrets lease delete">- This command is used to delete a lease.--```bash-infisical dynamic-secrets lease delete <lease-id>-```--### Flags--<Accordion title="--env">- Used to select the environment name on which actions should be taken. Default- value: `dev`-</Accordion>--<Accordion title="--path">- The `--path` flag indicates which project folder dynamic secrets will be deleted from.--```bash-# Example-infisical dynamic-secrets lease delete <lease-id> --path="/" --env=dev-```--</Accordion>--<Accordion title="--projectId">- The project ID of the dynamic secret to delete lease from.--```bash-# Example-infisical dynamic-secrets lease delete <lease-id> --projectId=<project-id>-```--</Accordion>--<Accordion title="--project-slug">- The project slug of the dynamic secret to delete lease from.--```bash-# Example-infisical dynamic-secrets lease delete <lease-id> --project-slug=<project-slug>-```--</Accordion>--<Accordion title="--token">- The authenticated token to delete dynamic secret leases. This is required when using a machine identity to authenticate.--```bash-# Example-infisical dynamic-secrets lease delete <lease-id> --token=<token>-```--</Accordion>-</Accordion>diff --git a/docs/cli/commands/export.mdx b/docs/cli/commands/export.mdxdeleted file mode 100644index fd07420231..0000000000--- a/docs/cli/commands/export.mdx+++ /dev/null@@ -1,230 +0,0 @@-----title: "infisical export"-description: "Export Infisical secrets from CLI into different file formats"------```bash-infisical export [options]-```--## Description--Export environment variables from the platform into a file format. By default, output is sent to stdout (standard output), but you can use the `--output-file` flag to save directly to a file.--## Subcommands & flags--<Accordion title="infisical export" defaultOpen="true">- Use this command to export environment variables from the platform into a raw file formats--```bash-infisical export--# Export variables to a .env file-infisical export > .env-infisical export --output-file=./.env--# Export variables to a .env file (with export keyword)-infisical export --format=dotenv-export > .env-infisical export --format=dotenv-export --output-file=./.env--# Export variables for shell eval/source (POSIX shell-quoted, safe for eval)-eval "$(infisical export --format=dotenv-eval)"-infisical export --format=dotenv-eval --output-file=./.env--# Export variables to a JSON file-infisical export --format=json > secrets.json-infisical export --format=json --output-file=./secrets.json--# Export variables to a YAML file-infisical export --format=yaml > secrets.yaml-infisical export --format=yaml --output-file=./secrets.yaml--# Render secrets using a custom template file-infisical export --template=<path to template>-```--### Environment variables-- <Accordion title="INFISICAL_TOKEN">- Used to fetch secrets via a [machine identities](/documentation/platform/identities/machine-identities) apposed to logged in credentials. Simply, export this variable in the terminal before running this command.-- ```bash- # Example- export INFISICAL_TOKEN=$(infisical login --method=universal-auth --client-id=<identity-client-id> --client-secret=<identity-client-secret> --silent --plain) # --plain flag will output only the token, so it can be fed to an environment variable. --silent will disable any update messages.- ```-- <Info>- Alternatively, you may use service tokens.-- ```bash- # Example- export INFISICAL_TOKEN=<service-token>- ```-- </Info>- </Accordion>-- <Accordion title="INFISICAL_DISABLE_UPDATE_CHECK">- Used to disable the check for new CLI versions. This can improve the time it takes to run this command. Recommended for production environments.-- To use, simply export this variable in the terminal before running this command.-- ```bash- # Example- export INFISICAL_DISABLE_UPDATE_CHECK=true- ```-- </Accordion>--### flags-- <Accordion title="--output-file">- The path to write the output file to. Can be a full file path, directory, or filename.-- ```bash- # Export to specific file- infisical export --format=json --output-file=./secrets.json-- # Export to directory (uses default filename based on format)- infisical export --format=yaml --output-file=./- ```-- **When `--output-file` is specified:**- - Secrets are saved directly to the specified file- - A success message is displayed showing the file path- - For directories: adds default filename `secrets.{format}` (e.g., `secrets.json`, `secrets.yaml`)- - For dotenv formats in directories: uses `.env` as the filename-- **When `--output-file` is NOT specified (default behavior):**- - Output is sent to stdout (standard output)- - You can use shell redirection like `infisical export > secrets.json`- - Maintains backwards compatibility with existing scripts-- <Warning>- If you're using shell redirection and your token expires, re-authentication will fail because the prompt can't display properly due to the redirection.- </Warning>-- </Accordion>-- <Accordion title="--template">- The `--template` flag specifies the path to the Go template file used for rendering secrets. When using templates, you can omit the other format flags.-- ```text my-template-file- {{$secrets := secret "<infisical-project-id>" "<environment-slug>" "<folder-path>"}}- {{$length := len $secrets}}- {{- "{"}}- {{- with $secrets }}- {{- range $index, $secret := . }}- "{{ $secret.Key }}": "{{ $secret.Value }}"{{if lt $index (minus $length 1)}},{{end}}- {{- end }}- {{- end }}- {{ "}" -}}- ```-- ```bash- # Example- infisical export --template="/path/to/template/file"- ```-- <Tip>- The Infisical CLI templating engine also supports Sprig library templating functions to help you transform your secrets further.- You can read more about the available functions [here](/integrations/platforms/kubernetes/overview#available-helper-functions).- </Tip>-- </Accordion>-- <Accordion title="--env">- Used to set the environment that secrets are pulled from.-- ```bash- # Example- infisical export --env=prod- ```-- Note: this flag only accepts environment slug names not the fully qualified name. To view the slug name of an environment, visit the project settings page.-- default value: `dev`-- </Accordion>-- <Accordion title="--projectId">- By default the project id is retrieved from the `.infisical.json` located at the root of your local project.- This flag allows you to override this behavior by explicitly defining the project to fetch your secrets from.-- ```bash- # Example-- infisical export --projectId=XXXXXXXXXXXXXX- ```-- </Accordion>-- <Accordion title="--expand">- Parse shell parameter expansions in your secrets (e.g., `${DOMAIN}`)-- Default value: `true`-- </Accordion>-- <Accordion title="--include-imports">- By default imported secrets are available, you can disable it by setting this option to false.-- Default value: `true`- </Accordion>-- <Accordion title="--format">- Format of the output file. Accepted values: `dotenv`, `dotenv-export`, `dotenv-eval`, `csv`, `json` and `yaml`-- Default value: `dotenv`-- The `dotenv-eval` format emits each secret as an `export KEY='value'` statement with values POSIX shell-quoted (wrapped in single quotes, with embedded single quotes escaped). This makes the output safe to load directly into your current shell via `eval`/`source`, regardless of the value's contents (newlines, single quotes, `$`, `"`, `\`, and other shell metacharacters are preserved verbatim).-- ```bash- # Load secrets into the current shell session- eval "$(infisical export --format=dotenv-eval)"- ```-- ```bash- # Example output- export DATABASE_URL='postgres://user:pass@localhost:5432/db'- export API_KEY='it'\''s a secret'- ```-- <Warning>- The POSIX single-quoting only escapes secret **values**. Secret **names** (keys) are emitted as-is and are not escaped, so `eval`/`source` is only safe when every secret name is a valid shell identifier (letters, digits, and underscores, not starting with a digit). Avoid running `eval`/`source` on this format if your secret names may contain shell metacharacters.- </Warning>-- </Accordion>-- <Accordion title="--secret-overriding">- Prioritizes personal secrets with the same name over shared secrets-- Default value: `true`-- </Accordion>-- <Accordion title="--path">- The `--path` flag indicates which project folder secrets will be injected from.-- ```bash- # Example- infisical export --path="/path/to/folder" --env=dev- ```-- </Accordion>-- <Accordion title="--tags">- When working with tags, you can use this flag to filter and retrieve only secrets that are associated with a specific tag(s).-- ```bash- # Example- infisical export --tags=tag1,tag2,tag3 --env=dev- ```-- Note: you must reference the tag by its slug name not its fully qualified name. Go to project settings to view all tag slugs.-- By default, all secrets are fetched-- </Accordion>--</Accordion>\ No newline at end of filediff --git a/docs/cli/commands/gateway.mdx b/docs/cli/commands/gateway.mdxdeleted file mode 100644index cfd7e102a9..0000000000--- a/docs/cli/commands/gateway.mdx+++ /dev/null@@ -1,403 +0,0 @@-----title: "infisical gateway"-description: "Run the Infisical gateway or manage its systemd service"------<Tabs>- <Tab title="CLI">- ```bash- infisical gateway start <gateway-name> --enroll-method=token --token=<enrollment-token> --domain=<domain>- ```- </Tab>- <Tab title="systemd">- ```bash- sudo infisical gateway systemd install <gateway-name> --enroll-method=token --token=<enrollment-token> --domain=<domain>- ```- </Tab>-</Tabs>--## Description--The Infisical gateway runs inside your network and lets Infisical reach systems that aren't exposed to the internet, such as a database in a private subnet or an on-premises appliance.--There are two ways the gateway and Infisical reach each other:--- **Direct listen.** The gateway listens on the address you set with `--listen-address`, and Infisical connects to it. No relay is needed. Self-hosted Infisical only.-- **Relay.** The gateway opens an SSH reverse tunnel to a relay server, and Infisical reaches it back through that tunnel. No inbound ports have to be open on the gateway host.--Passing `--listen-address` and `--target-relay-name` together runs both, and Infisical uses the listen address first, keeping the relay as a fallback.--See [Gateway deployment](/documentation/platform/gateways/gateway-deployment) for choosing a mode and the full deployment walkthrough, and [Network architecture](/documentation/platform/gateways/network-architecture) for the ports and traffic flow of each.--## Subcommands & flags--<AccordionGroup>-<Accordion title="infisical gateway start" defaultOpen="true">- Run the gateway inside the network where your target resources live. It connects to Infisical over a relay or by listening for direct connections, depending on the flags below.--```bash-infisical gateway start <gateway-name> --enroll-method=token --token=<enrollment-token> --domain=<domain>-```--The gateway name is provided as a positional argument.--<Info>- With no `--listen-address` and no `--target-relay-name`, the gateway connects to the relay with the lowest latency. To target a specific relay, use `--target-relay-name=<relay-name>`. To skip relays entirely, use `--listen-address=<host:port>`.-</Info>--Once started, the gateway component will:--- Authenticate using certificates issued by Infisical-- Automatically renew its certificates--In relay mode it also:--- Connects to a healthy relay with the lowest latency, unless `--target-relay-name` names one-- Establishes an outbound SSH reverse tunnel to the relay, so no inbound firewall rules are needed-- Reconnects if the connection is lost, and fails over to a different healthy relay if the current one becomes unreachable--In direct listen mode it also:--- Binds the port from `--listen-address` on every interface, unless `--bind` says otherwise-- Accepts mutually authenticated TLS connections from Infisical on that port--### Flags-- <AccordionGroup>- <Accordion title="--enroll-method">- How the gateway authenticates with Infisical. Must match the auth method configured on the gateway in the Infisical UI. One of `token`, `aws`, `gcp`, or `kubernetes`.-- <Tabs>- <Tab title="token">- A one-time enrollment token from the Infisical UI bootstraps the gateway.-- <ParamField query="Flags">- <Expandable title="properties">- <ParamField query="token" type="string" required>- The one-time enrollment token from the Infisical UI.- </ParamField>- <ParamField query="domain" type="string" required>- The URL of your Infisical instance.- </ParamField>- </Expandable>- </ParamField>-- ```bash- infisical gateway start my-gateway --enroll-method=token --token=<enrollment-token> --domain=https://app.infisical.com- ```-- After enrollment, the gateway saves its credentials locally. You can safely re-run the same command to restart the gateway. It will detect the token has already been used and skip enrollment automatically.- </Tab>- <Tab title="aws">- The gateway signs an `sts:GetCallerIdentity` request with whatever AWS credentials it can resolve on the host (instance role, environment variables, shared profile), and re-authenticates on every start. No token is stored on disk.-- <ParamField query="Flags">- <Expandable title="properties">- <ParamField query="gateway-id" type="string" required>- The gateway ID from the Infisical UI.- </ParamField>- <ParamField query="domain" type="string" required>- The URL of your Infisical instance.- </ParamField>- </Expandable>- </ParamField>-- ```bash- infisical gateway start my-gateway --enroll-method=aws --gateway-id=<gateway-id> --domain=https://app.infisical.com- ```- </Tab>- <Tab title="gcp">- The gateway proves which GCP service account it runs as, and re-authenticates on every start. No token is stored on disk. The token carries the gateway ID as its audience.-- <ParamField query="Flags">- <Expandable title="properties">- <ParamField query="gateway-id" type="string" required>- The gateway ID from the Infisical UI.- </ParamField>- <ParamField query="domain" type="string" required>- The URL of your Infisical instance.- </ParamField>- <ParamField query="gcp-auth-type" type="string">- How the identity is proven. `gce` reads a token from the instance metadata server, which covers Compute Engine VMs and GKE pods using workload identity. `iam` signs one through the IAM Credentials API. Defaults to `gce`.- </ParamField>- <ParamField query="service-account-key-file-path" type="string">- Only for `--gcp-auth-type=iam`, and only when the host has no credentials of its own. Path to a service account key file to sign with.- </ParamField>- </Expandable>- </ParamField>-- ```bash- infisical gateway start my-gateway --enroll-method=gcp --gateway-id=<gateway-id> --domain=https://app.infisical.com- ```-- The `iam` type needs the IAM Service Account Credentials API enabled and `roles/iam.serviceAccountTokenCreator` on the service account being signed as. On a Compute Engine instance it also needs the `cloud-platform` scope, because the default scopes omit `iamcredentials`. Instance scopes can only be changed while the instance is stopped.-- See [Gateway Deployment](/documentation/platform/gateways/gateway-deployment) for the allowlist configuration this method needs.- </Tab>- <Tab title="kubernetes">- The gateway authenticates with the projected service account token of the pod it runs in, so no credential has to be distributed to the cluster. Infisical verifies the token against your cluster's TokenReview API and re-authenticates on every start. No token is stored on disk.-- This method requires the gateway to run inside a Kubernetes pod. Deploying with the [Helm chart](/self-hosting/helm-charts/gateway) is the recommended path.-- <ParamField query="Flags">- <Expandable title="properties">- <ParamField query="gateway-id" type="string" required>- The gateway ID from the Infisical UI.- </ParamField>- <ParamField query="domain" type="string" required>- The URL of your Infisical instance.- </ParamField>- <ParamField query="service-account-token-path" type="string">- Path to the projected service account token. Defaults to `/var/run/secrets/kubernetes.io/serviceaccount/token`.- </ParamField>- </Expandable>- </ParamField>-- ```bash- infisical gateway start my-gateway --enroll-method=kubernetes --gateway-id=<gateway-id> --domain=https://app.infisical.com- ```-- See [Gateway Deployment](/documentation/platform/gateways/gateway-deployment) for the cluster host and allowlist configuration this method needs.- </Tab>- </Tabs>-- </Accordion>-- <Accordion title="--target-relay-name">- The name of the relay that this gateway should connect to. The relay must be running and registered before starting the gateway.-- If this flag is omitted and no `--listen-address` is set, the gateway connects to a healthy relay with the lowest latency.-- ```bash- # Example- infisical gateway start my-gateway --target-relay-name=my-relay --enroll-method=token --token=<token> --domain=<domain>- ```-- Can also be set with the `INFISICAL_RELAY_NAME` environment variable.-- For Infisical Cloud users on instance relays, the relay infrastructure is already running and managed by Infisical. If using organization relays or self-hosted instance relays, start a relay server first. See the [Relay Deployment Guide](/documentation/platform/gateways/relay-deployment).-- </Accordion>-- <Accordion title="--listen-address">- The `host:port` address that Infisical dials to reach this gateway. Setting it runs the gateway in direct listen mode, where Infisical opens the connection and no relay is involved.-- The address has to be reachable from wherever Infisical runs, and it's written into the gateway's server certificate, so it has to be stable. An internal DNS name or a load balancer in front of the gateway both work. Changing it means re-running the command so a certificate is issued for the new address.-- ```bash- # Example- infisical gateway start my-gateway --listen-address=gateway.internal:8443 --enroll-method=token --token=<token> --domain=<domain>- ```-- Pass it alongside `--target-relay-name` to run both modes, so Infisical uses the listen address first and falls back to the relay. [Running both modes](/documentation/platform/gateways/gateway-deployment#running-both-modes) covers when to keep both, and how to use it to switch modes without an outage:-- ```bash- infisical gateway start my-gateway --listen-address=gateway.internal:8443 --target-relay-name=my-relay --enroll-method=token --token=<token> --domain=<domain>- ```-- Can also be set with the `INFISICAL_GATEWAY_LISTEN_ADDRESS` environment variable.-- <Note>- Direct listen is only available on self-hosted Infisical.- </Note>-- </Accordion>-- <Accordion title="--bind">- The local `host:port` the gateway binds for direct connections. Defaults to every interface on the port from `--listen-address`. Reach for this flag only when the address Infisical dials differs from the socket the gateway should open.-- Use it to bind a single interface, or to listen on a different local port than the one advertised, such as behind a load balancer that terminates on 8443 and forwards to 9000.-- ```bash- # Advertise 8443, listen locally on 9000- infisical gateway start my-gateway --listen-address=gateway.internal:8443 --bind=0.0.0.0:9000 --enroll-method=token --token=<token> --domain=<domain>- ```-- Can also be set with the `INFISICAL_GATEWAY_BIND_ADDRESS` environment variable. Has no effect without `--listen-address`.-- </Accordion>-- <Accordion title="--domain">- Domain of your self-hosted Infisical instance.-- ```bash- # Example- infisical gateway start <gateway-name> --domain=https://app.your-domain.com --enroll-method=token --token=<token>- ```-- </Accordion>-- <Accordion title="--pkcs11-module">- Absolute path to the PKCS#11 driver shipped by your HSM vendor. When set, the gateway loads the driver on startup and is reachable by HSM Connectors for signing operations.-- ```bash- # Example- infisical gateway start <gateway-name> --enroll-method=token --token=<token> --domain=<domain> --pkcs11-module=/opt/fortanix/pkcs11/fortanix_pkcs11.so- ```-- See [HSM Connectors](/documentation/platform/pki/settings/hsm-connectors) for the full setup.- </Accordion>- </AccordionGroup>-</Accordion>--<Accordion title="infisical gateway systemd install">- Install and enable the gateway as a systemd service. This command must be run with sudo on Linux.--```bash-sudo infisical gateway systemd install my-gateway --enroll-method=token --token=<enrollment-token> --domain=<domain>-```--### Requirements--- Must be run on Linux-- Must be run with root/sudo privileges-- Requires systemd--### Flags-- <AccordionGroup>- <Accordion title="--enroll-method">- How the gateway authenticates with Infisical. One of `token`, `aws`, or `gcp`.-- ```bash- # Enrollment token- sudo infisical gateway systemd install my-gateway --enroll-method=token --token=<enrollment-token> --domain=<domain>-- # AWS auth, re-authenticated on every service start- sudo infisical gateway systemd install my-gateway --enroll-method=aws --gateway-id=<gateway-id> --domain=<domain>-- # GCP auth, re-authenticated on every service start- sudo infisical gateway systemd install my-gateway --enroll-method=gcp --gateway-id=<gateway-id> --domain=<domain>- ```-- `kubernetes` is not available here. In-cluster gateways are not managed by systemd, so run `infisical gateway start --enroll-method=kubernetes` as the container command instead.-- </Accordion>-- <Accordion title="--token">- The one-time enrollment token from the Infisical UI.-- ```bash- # Example- sudo infisical gateway systemd install my-gateway --enroll-method=token --token=<token> --domain=<domain>- ```-- </Accordion>-- <Accordion title="--domain">- Domain of your self-hosted Infisical instance.-- ```bash- # Example- sudo infisical gateway systemd install my-gateway --enroll-method=token --token=<token> --domain=https://app.your-domain.com- ```-- </Accordion>-- <Accordion title="--target-relay-name">- The name of the relay that this gateway should connect to. The relay must be running and registered before starting the gateway.-- If this flag is omitted and no `--listen-address` is set, the gateway connects to a healthy relay with the lowest latency.-- ```bash- # Example- sudo infisical gateway systemd install my-gateway --target-relay-name=my-relay --enroll-method=token --token=<token> --domain=<domain>- ```-- For Infisical Cloud users on instance relays, the relay infrastructure is already running and managed by Infisical. If using organization relays or self-hosted instance relays, start a relay server first. See the [Relay Deployment Guide](/documentation/platform/gateways/relay-deployment).-- </Accordion>-- <Accordion title="--listen-address">- The `host:port` address that Infisical dials to reach this gateway, which runs it in direct listen mode.-- ```bash- # Example- sudo infisical gateway systemd install my-gateway --listen-address=gateway.internal:8443 --enroll-method=token --token=<token> --domain=<domain>- ```-- Pass it alongside `--target-relay-name` to run both modes. See the `infisical gateway start` reference above for what the address has to satisfy.-- </Accordion>-- <Accordion title="--bind">- The local `host:port` the gateway binds for direct connections. Defaults to every interface on the port from `--listen-address`.-- ```bash- # Example- sudo infisical gateway systemd install my-gateway --listen-address=gateway.internal:8443 --bind=0.0.0.0:9000 --enroll-method=token --token=<token> --domain=<domain>- ```-- </Accordion>-- <Accordion title="--pkcs11-module">- Absolute path to the PKCS#11 driver shipped by your HSM vendor. When set, the systemd unit captures the flag so every restart loads the same driver and the gateway is reachable by HSM Connectors.-- ```bash- # Example- sudo infisical gateway systemd install my-gateway --enroll-method=token --token=<token> --domain=<domain> --pkcs11-module=/opt/fortanix/pkcs11/fortanix_pkcs11.so- ```-- See [HSM Connectors](/documentation/platform/pki/settings/hsm-connectors) for the full setup.- </Accordion>- </AccordionGroup>--### Service details--The systemd service is installed with secure defaults:--- Service file: `/etc/systemd/system/<gateway-name>.service`-- Config file: `/etc/infisical/gateways/<gateway-name>.conf`-- Runs with restricted privileges:- - InaccessibleDirectories=/home- - PrivateTmp=yes- - Resource limits configured for stability-- Automatically restarts on failure-- Enabled to start on boot-- Maintains persistent SSH reverse tunnel connections to the specified relay-- Handles certificate rotation and connection recovery automatically--After installation, manage the service with standard systemd commands (replace `my-gateway` with your gateway name):--```bash-sudo systemctl start my-gateway # Start the service-sudo systemctl stop my-gateway # Stop the service-sudo systemctl status my-gateway # Check service status-sudo systemctl disable my-gateway # Disable auto-start on boot-```--</Accordion>--<Accordion title="infisical gateway systemd uninstall">- Uninstall and remove the gateway systemd service. This command must be run with sudo on Linux.--```bash-sudo infisical gateway systemd uninstall my-gateway-```--The gateway name is provided as a positional argument.--</Accordion>-</AccordionGroup>--## Frequently asked questions--<AccordionGroup>- <Accordion title="Can I re-run the same enrollment command after a restart?">- Yes. The CLI stores the enrollment token locally after the first successful enrollment. If you run the same command again with the same `--token` value, it detects the token has already been used and skips enrollment, proceeding directly to start the gateway. This means you can safely use the same command (e.g., via up-arrow in your shell) without getting "token already used" or "token expired" errors.- </Accordion>- <Accordion title="How are relays auto-selected?">- If `--target-relay-name` and `--listen-address` are both omitted, the gateway automatically selects the optimal relay. It first checks for healthy organization relays and connects to the one with the lowest latency. If no organization relays are available, it then performs the same latency-based selection among the available managed relays.-- If the selected relay becomes unreachable while the gateway is running, the gateway will automatically switch to a different healthy one. Gateways started with an explicit `--target-relay-name` do not switch and will keep retrying the specified relay.- </Accordion>- <Accordion title="Which mode do I get if I pass no connection flags?">- Relay mode, with a relay chosen automatically. Direct listen is opt-in: the gateway only listens for connections when you pass `--listen-address`.- </Accordion>- <Accordion title="When restarting the gateway without a relay flag, does it select a new relay every time?">- No. The first time the gateway starts, it selects the optimal relay (based on latency) and caches that selection. On subsequent restarts, it will prioritize connecting to the cached relay. If it's unable to connect, it will then re-evaluate and connect to the next most optimal relay available.- </Accordion>- <Accordion title="Will additional authentication methods be supported?">- Yes. Additional gateway authentication methods are planned for future releases.- </Accordion>-</AccordionGroup>diff --git a/docs/cli/commands/init.mdx b/docs/cli/commands/init.mdxdeleted file mode 100644index bd2161f389..0000000000--- a/docs/cli/commands/init.mdx+++ /dev/null@@ -1,18 +0,0 @@-----title: "infisical init"-description: "Switch between Infisical projects within CLI"------```bash-infisical init-```--## Description--Link a local project to your Infisical project. Once connected, you can then access the secrets locally from the connected Infisical project.--<Info>- This command creates a `.infisical.json` file containing your Project ID.-</Info>--The command lists the projects of the organization that your profile uses. To link a project in another organization, change the profile default with `infisical profile set-org`. You can also create a profile for that organization with `infisical profile create`. See [profile](./profile).diff --git a/docs/cli/commands/kmip.mdx b/docs/cli/commands/kmip.mdxdeleted file mode 100644index f695931e73..0000000000--- a/docs/cli/commands/kmip.mdx+++ /dev/null@@ -1,238 +0,0 @@-----title: "infisical kmip"-description: "Run the Infisical KMIP server or manage its systemd service"------<Tabs>- <Tab title="Start KMIP server">- ```bash- infisical kmip start <server-name> \- --enroll-method=token \- --token=<enrollment-token> \- --domain=<your-infisical-domain>- ```- </Tab>- <Tab title="Start as background daemon (Linux only)">- ```bash- sudo infisical kmip systemd install <server-name> \- --enroll-method=token \- --token=<enrollment-token> \- --domain=<your-infisical-domain>- sudo systemctl start infisical-kmip- ```- </Tab>-</Tabs>--## Description--The Infisical KMIP server provides Key Management Interoperability Protocol (KMIP) support for integration with KMIP-compatible clients. It acts as a proxy between your KMIP clients and Infisical KMS, enabling standardized key management operations.--The server is created in Infisical and then enrolled from the host where you run it, using either a one-time enrollment **token** or **AWS** authentication. The deploy command (including the enrollment token) can be copied from the server's detail page via **Show deploy command**.--The server's certificate configuration (hostnames/IPs and key algorithm) is defined on the server entity in the UI. The CLI fetches it on start, so you don't pass it on the command line. The running server renews its certificate automatically before it expires, with no restart required. To change the certificate configuration, edit it in the UI; the change applies at the next automatic renewal, or restart the server to apply it immediately.--For detailed information about KMIP integration, PKI setup, and client configuration, see the [KMIP Integration Guide](/documentation/platform/kms/kmip).--## Subcommands & flags--<AccordionGroup>-<Accordion title="infisical kmip start" defaultOpen="true">- Run the Infisical KMIP server in the foreground. The server enrolls with Infisical, listens for KMIP client connections, and proxies KMIP operations to Infisical KMS.--```bash-infisical kmip start <server-name> \- --enroll-method=token \- --token=<enrollment-token> \- --domain=<your-infisical-domain>-```--Once started, the KMIP server will:--- Authenticate to Infisical using the enrollment method you provide-- Listen for incoming KMIP client connections-- Forward KMIP operations (Create, Get, Activate, Revoke, etc.) to Infisical KMS-- Handle mTLS authentication for KMIP clients--### Arguments--`<server-name>` (required): the name of the KMIP server, passed as the first positional argument. The name scopes where enrollment state is stored locally, so use the same value across restarts. You can alternatively supply it with the `--server-name` flag or the `INFISICAL_KMIP_SERVER_NAME` environment variable instead of positionally.--### Flags-- <AccordionGroup>- <Accordion title="--enroll-method">- The enrollment method used to authenticate the KMIP server: `token` or `aws`.-- ```bash- # Example- infisical kmip start <server-name> --enroll-method=token --token=<enrollment-token>- ```-- You may also set this via the environment variable `INFISICAL_KMIP_ENROLL_METHOD`.-- </Accordion>-- <Accordion title="--token">- The one-time enrollment token (when `--enroll-method=token`). Generate it from the KMIP server's detail page via **Show deploy command**. Tokens are single-use and expire after 1 hour.-- On restart, the CLI reuses the long-lived access token it stored at enrollment, so the token is only needed for the initial deployment.-- ```bash- # Example- infisical kmip start <server-name> --enroll-method=token --token=<enrollment-token>- ```-- </Accordion>-- <Accordion title="--kmip-server-id">- The KMIP server ID (when `--enroll-method=aws`). The server signs an `sts:GetCallerIdentity` request on every start and authenticates against the allowlist configured on the server entity.-- ```bash- # Example- infisical kmip start <server-name> --enroll-method=aws --kmip-server-id=<kmip-server-id>- ```-- You may also set this via the environment variable `INFISICAL_KMIP_SERVER_ID`.-- </Accordion>-- <Accordion title="--server-name">- Alternative to passing the server name as the positional argument (`infisical kmip start <server-name>`), which is the recommended form. The name is required, so supply it either positionally, via this flag, or via the environment variable. It scopes where enrollment state is stored locally, so use the same value across restarts.-- ```bash- # Example (equivalent to: infisical kmip start production-kmip --enroll-method=token --token=<enrollment-token>)- infisical kmip start --server-name="production-kmip" --enroll-method=token --token=<enrollment-token>- ```-- You may also set this via the environment variable `INFISICAL_KMIP_SERVER_NAME`.-- </Accordion>-- <Accordion title="--domain">- Domain of your self-hosted Infisical instance. If not specified, defaults to Infisical Cloud.-- ```bash- # Example- infisical kmip start <server-name> --domain=https://app.your-domain.com --enroll-method=token --token=<enrollment-token>- ```-- You may also set this via the environment variable `INFISICAL_API_URL`.-- </Accordion>-- <Accordion title="--listen-address">- The address for the KMIP server to listen on. Default: `localhost:5696`. To accept connections from other hosts, bind to all interfaces (`0.0.0.0:5696`) or a specific interface.-- ```bash- # Example - listen on all interfaces- infisical kmip start <server-name> --listen-address="0.0.0.0:5696" --enroll-method=token --token=<enrollment-token>- ```-- You may also set this via the environment variable `INFISICAL_KMIP_LISTEN_ADDRESS`.-- </Accordion>-- <Accordion title="--certificate-ttl (legacy machine-identity servers only)">- The TTL duration for the server certificate. Default: `1y`.-- This flag applies only to legacy machine-identity KMIP servers. For servers enrolled via token or AWS, the certificate TTL is configured on the server entity in the UI and read on start, so this flag is ignored.-- ```bash- # Example- infisical kmip start <server-name> --certificate-ttl="6m" --enroll-method=token --token=<enrollment-token>- ```-- You may also set this via the environment variable `INFISICAL_KMIP_CERTIFICATE_TTL`.-- </Accordion>-- <Accordion title="--hostnames-or-ips (legacy machine-identity servers only)">- Comma-separated list of hostnames or IP addresses that KMIP clients will use to reach the server. These become the Subject Alternative Names (SANs) of the server's TLS certificate, so they must match how clients connect.-- This flag applies only to legacy machine-identity KMIP servers. For servers enrolled via token or AWS, the hostnames/IPs are configured on the server entity in the UI and read on start, so this flag is ignored.-- ```bash- # Example- infisical kmip start <server-name> --hostnames-or-ips="kmip.example.com,10.0.1.50" --enroll-method=token --token=<enrollment-token>- ```-- You may also set this via the environment variable `INFISICAL_KMIP_HOSTNAMES_OR_IPS`.-- </Accordion>- </AccordionGroup>--</Accordion>--<Accordion title="infisical kmip systemd install">- Install and enable the KMIP server as a systemd service. This command must be run with sudo on Linux.--```bash-sudo infisical kmip systemd install <server-name> \- --enroll-method=token \- --token=<enrollment-token> \- --domain=<your-infisical-domain>-sudo systemctl start infisical-kmip-```--For token enrollment, the single-use token is exchanged for a long-lived access token at install time and persisted to the service config; the service reuses it on every restart. For AWS enrollment, no token is stored and the server re-authenticates via STS on each start.--### Requirements--- Must be run on Linux-- Must be run with root/sudo privileges-- Requires systemd--### What it does--1. Creates a config file at `/etc/infisical/kmip.conf` with the provided enrollment settings-2. Creates a systemd service file at `/etc/systemd/system/infisical-kmip.service`-3. Reloads the systemd daemon-4. Enables the service to start on boot--### Arguments & flags--Like `infisical kmip start`, this command takes the `<server-name>` as a required positional argument (or via `--server-name` / `INFISICAL_KMIP_SERVER_NAME`). It accepts the same flags as `infisical kmip start` (documented above): `--enroll-method`, `--token`, `--kmip-server-id`, `--server-name`, `--domain`, `--listen-address`, and (for legacy machine-identity servers only) `--hostnames-or-ips` and `--certificate-ttl`.--### Service details--The systemd service is installed with secure defaults:--- Service file: `/etc/systemd/system/infisical-kmip.service`-- Config file: `/etc/infisical/kmip.conf`-- Automatically restarts on failure-- Enabled to start on boot--After installation, manage the service with standard systemd commands:--```bash-sudo systemctl start infisical-kmip # Start the service-sudo systemctl stop infisical-kmip # Stop the service-sudo systemctl status infisical-kmip # Check service status-sudo systemctl disable infisical-kmip # Disable auto-start on boot-sudo journalctl -u infisical-kmip # View logs-```--</Accordion>--<Accordion title="infisical kmip systemd uninstall">- Uninstall and remove the KMIP server systemd service. This command must be run with sudo on Linux.--```bash-sudo infisical kmip systemd uninstall-```--### Requirements--- Must be run on Linux-- Must be run with root/sudo privileges--### What it does--1. Stops the service if running-2. Disables the service-3. Removes the service file from `/etc/systemd/system/infisical-kmip.service`-4. Removes the config file from `/etc/infisical/kmip.conf`-5. Reloads the systemd daemon--</Accordion>-</AccordionGroup>diff --git a/docs/cli/commands/login.mdx b/docs/cli/commands/login.mdxdeleted file mode 100644index 13dd390cf9..0000000000--- a/docs/cli/commands/login.mdx+++ /dev/null@@ -1,801 +0,0 @@-----title: "infisical login"-description: "Login into Infisical from the CLI"------```bash-infisical login-```--### Description--The CLI uses authentication to verify your identity. You can authenticate using:--- **Browser Login** (default): Opens a browser for authentication-- **Direct Login**: Provide email and password via flags or environment variables for non-interactive workflows-- **Interactive CLI Login**: Use the `--interactive` flag to enter credentials via CLI prompts--When authenticated, a token is generated and saved in your system Keyring to allow you to make future interactions with the CLI.--To change where the login credentials are stored, visit the [vaults command](./vault).--A user login is stored as a profile: an account on the specified Infisical instance, and the organization you chose for it.--Unless you pass `--save-as` or `--profile`, the CLI names the profile after your account and organization, and makes it the default profile that commands use when you don't specify one. Pass `--save-as <name>` to choose the name yourself. See [profile](./profile) for more.--Machine identity logins don't create a profile. They print an access token, which you supply through `INFISICAL_TOKEN` or `--token`.-- <Info>- **JWT Token Output:**- - For **user authentication** with the `--plain --silent` flags: outputs only the JWT access token (useful for scripting)- - For **machine identity authentication**: an access token is always printed to the console-- Use the `--plain` flag to print only the token in plain text and the `--silent` flag to disable update alerts.-- Both flags are ideal for capturing the token in environment variables or CI/CD pipelines.- </Info>--### Authentication methods--The Infisical CLI supports two main categories of authentication: User Authentication and Machine Identity Authentication.--#### User authentication--User authentication is designed for individual developers and supports multiple login flows.--<AccordionGroup>-<Accordion title="User">- The User authentication method allows you to log in with your email and password. This method supports three different login flows:--- **Browser Login** (default): Opens a browser for authentication-- **Direct Login**: Provide credentials via flags or environment variables for CI/CD-- **Interactive CLI Login**: Enter credentials via CLI prompts using `--interactive`--<ParamField query="Flags">- <Expandable title="properties">- <ParamField query="email" type="string" optional>- Your email address. Required for direct login along with `--password` and- `--organization-id`.- </ParamField>- <ParamField query="password" type="string" optional>- Your password. Required for direct login along with `--email` and- `--organization-id`.- </ParamField>- <ParamField query="organization-id" type="string" optional>- Your organization id. Required for direct login along with `--password`- and `--email`.- </ParamField>- <ParamField query="interactive" type="boolean" optional>- Force interactive CLI login instead of browser-based authentication.- </ParamField>- <ParamField query="plain" type="boolean" optional>- Output only the JWT token (useful for scripting and CI/CD).- </ParamField>- <ParamField query="save-as" type="string" optional>- Store this login as a profile under the specified name. The CLI creates- that profile, or replaces the stored session of an existing profile if the- name is already taken.- </ParamField>- <ParamField query="profile" type="string" optional>- Sign back in to a profile that already exists, restoring its account,- instance, and organization.- </ParamField>- </Expandable>-</ParamField>-- <AccordionGroup>- <Accordion title="Browser Login (Default)">- ```bash- infisical login- ```- </Accordion>- <Accordion title="Direct Login (CI/CD)">- ```bash- infisical login [email protected] --password=your-password --organization-id=your-organization-id-- # Or using environment variables- export INFISICAL_EMAIL="[email protected]"- export INFISICAL_PASSWORD="your-password"- export INFISICAL_ORGANIZATION_ID="your-organization-id"- infisical login- ```- </Accordion>- <Accordion title="Interactive CLI Login">- ```bash- infisical login --interactive- ```- </Accordion>- <Accordion title="Plain Token Output (Useful for scripting and CI/CD)">- ```bash- export INFISICAL_TOKEN=$(infisical login [email protected] --password=your-password --organization-id=your-organization-id --plain --silent)- ```- </Accordion>- </AccordionGroup>-</Accordion>-</AccordionGroup>--#### Machine identity authentication--Machine identity authentication methods are designed for automated systems, services, and CI/CD pipelines.--<AccordionGroup>-<Accordion title="Universal Auth">- The Universal Auth method is a simple and secure way to authenticate with Infisical. It requires a client ID and a client secret to authenticate with Infisical.-- <ParamField query="Flags">- <Expandable title="properties">- <ParamField query="client-id" type="string" required>- Your machine identity client ID.- </ParamField>- <ParamField query="client-secret" type="string" required>- Your machine identity client secret.- </ParamField>- </Expandable>-- </ParamField>-- <Steps>- <Step title="Create a universal auth machine identity">- To create a universal auth machine identity, follow the step by step guide outlined [here](/documentation/platform/identities/universal-auth).- </Step>- <Step title="Obtain an access token">- Run the `login` command with the following flags to obtain an access token:-- ```bash- infisical login --method=universal-auth --client-id=<client-id> --client-secret=<client-secret>- ```- </Step>-- </Steps>-</Accordion>-<Accordion title="Native Kubernetes">- The Native Kubernetes method is used to authenticate with Infisical when running in a Kubernetes environment. It requires a service account token to authenticate with Infisical.-- <ParamField query="Flags">- <Expandable title="properties">- <ParamField query="machine-identity-id" type="string" required>- Your machine identity ID.- </ParamField>- <ParamField query="service-account-token-path" type="string" optional>- Path to the Kubernetes service account token to use. Default: `/var/run/secrets/kubernetes.io/serviceaccount/token`.- </ParamField>- </Expandable>-- </ParamField>-- <Steps>- <Step title="Create a Kubernetes machine identity">- To create a Kubernetes machine identity, follow the step by step guide outlined [here](/documentation/platform/identities/kubernetes-auth).- </Step>- <Step title="Obtain access an token">- Run the `login` command with the following flags to obtain an access token:-- ```bash- # --service-account-token-path is optional, and will default to '/var/run/secrets/kubernetes.io/serviceaccount/token' if not provided.- infisical login --method=kubernetes --machine-identity-id=<machine-identity-id> --service-account-token-path=<service-account-token-path>- ```- </Step>-- </Steps>--</Accordion>- <Accordion title="Native Azure">- The Native Azure method is used to authenticate with Infisical when running in an Azure environment.-- <ParamField query="Flags">- <Expandable title="properties">- <ParamField query="machine-identity-id" type="string" required>- Your machine identity ID.- </ParamField>- </Expandable>- </ParamField>-- <Steps>- <Step title="Create an Azure machine identity">- To create an Azure machine identity, follow the step by step guide outlined [here](/documentation/platform/identities/azure-auth).- </Step>- <Step title="Obtain an access token">- Run the `login` command with the following flags to obtain an access token:-- ```bash- infisical login --method=azure --machine-identity-id=<machine-identity-id>- ```- </Step>- </Steps>-- </Accordion>- <Accordion title="Native GCP ID Token">- The Native GCP ID Token method is used to authenticate with Infisical when running in a GCP environment.-- <ParamField query="Flags">- <Expandable title="properties">- <ParamField query="machine-identity-id" type="string" required>- Your machine identity ID.- </ParamField>- </Expandable>- </ParamField>-- <Steps>- <Step title="Create a GCP machine identity">- To create a GCP machine identity, follow the step by step guide outlined [here](/documentation/platform/identities/gcp-auth).- </Step>- <Step title="Obtain an access token">- Run the `login` command with the following flags to obtain an access token:-- ```bash- infisical login --method=gcp-id-token --machine-identity-id=<machine-identity-id>- ```- </Step>- </Steps>-- </Accordion>- <Accordion title="GCP IAM">- The GCP IAM method is used to authenticate with Infisical with a GCP service account key.-- <ParamField query="Flags">- <Expandable title="properties">- <ParamField query="machine-identity-id" type="string" required>- Your machine identity ID.- </ParamField>- <ParamField query="service-account-key-file-path" type="string" required>- Path to your GCP service account key file _(Must be in JSON format!)_- </ParamField>- </Expandable>- </ParamField>-- <Steps>- <Step title="Create a GCP machine identity">- To create a GCP machine identity, follow the step by step guide outlined [here](/documentation/platform/identities/gcp-auth).- </Step>- <Step title="Obtain an access token">- Run the `login` command with the following flags to obtain an access token:-- ```bash- infisical login --method=gcp-iam --machine-identity-id=<machine-identity-id> --service-account-key-file-path=<service-account-key-file-path>- ```- </Step>- </Steps>-- </Accordion>- <Accordion title="Native AWS IAM">- The AWS IAM method is used to authenticate with Infisical with an AWS IAM role while running in an AWS environment like EC2, Lambda, etc.-- <ParamField query="Flags">- <Expandable title="properties">- <ParamField query="machine-identity-id" type="string" required>- Your machine identity ID.- </ParamField>- </Expandable>- </ParamField>-- <Steps>- <Step title="Create an AWS machine identity">- To create an AWS machine identity, follow the step by step guide outlined [here](/documentation/platform/identities/aws-auth).- </Step>- <Step title="Obtain an access token">- Run the `login` command with the following flags to obtain an access token:-- ```bash- infisical login --method=aws-iam --machine-identity-id=<machine-identity-id>- ```- </Step>- </Steps>-- </Accordion>- <Accordion title="OIDC Auth">- The OIDC Auth method is used to authenticate with Infisical via identity tokens with OIDC.-- <ParamField query="Flags">- <Expandable title="properties">- <ParamField query="machine-identity-id" type="string" required>- Your machine identity ID.- </ParamField>- <ParamField query="jwt" type="string" required>- The OIDC JWT from the identity provider.- </ParamField>- </Expandable>- </ParamField>-- <Steps>- <Step title="Create an OIDC machine identity">- To create an OIDC machine identity, follow the step by step guide outlined [here](/documentation/platform/identities/oidc-auth/general).- </Step>- <Step title="Obtain an access token">- Run the `login` command with the following flags to obtain an access token:-- ```bash- infisical login --method=oidc-auth --machine-identity-id=<machine-identity-id> --jwt=<oidc-jwt>- ```- </Step>- </Steps>-- </Accordion>-- <Accordion title="JWT Auth">- The JWT Auth method is used to authenticate with Infisical via a JWT token.-- <ParamField query="Flags">- <Expandable title="properties">- <ParamField query="jwt" type="string" required>- The JWT token to use for authentication.- </ParamField>- <ParamField query="machine-identity-id" type="string" required>- Your machine identity ID.- </ParamField>- </Expandable>- </ParamField>-- <Steps>- <Step title="Obtain an access token">- Run the `login` command with the following flags to obtain an access token:-- ```bash- infisical login --method=jwt-auth --jwt=<jwt-token> --machine-identity-id=<machine-identity-id>- ```- </Step>- </Steps>-- </Accordion>-</AccordionGroup>--### Flags--The login command supports a number of flags that you can use for different authentication methods. Below is a list of all the flags that can be used with the login command.--<AccordionGroup>- <Accordion title="--method">- ```bash- infisical login --method=<auth-method> # Optional, will default to 'user'.- ```-- #### Valid values for the `method` flag are:- - `user`: Login using email and password. (default)- - `universal-auth`: Login using a universal auth client ID and client secret.- - `kubernetes`: Login using a Kubernetes native auth.- - `azure`: Login using an Azure native auth.- - `gcp-id-token`: Login using a GCP ID token native auth.- - `gcp-iam`: Login using a GCP IAM.- - `aws-iam`: Login using an AWS IAM native auth.- - `oidc-auth`: Login using OIDC auth.- - `jwt-auth`: Login using a plain JWT token.-- </Accordion>- <Accordion title="--organization-slug">- ```bash- infisical login --method=<auth-method> --organization-slug="team2"- ```- #### Description- This authenticates the machine identity against the specified sub-organization.-- <Tip>- The `organization-slug` flag can be substituted with the `INFISICAL_AUTH_ORGANIZATION_SLUG` environment variable.- </Tip>-- <Info>- If no organization slug is provided, the authentication session defaults to the organization where the machine identity was originally created.- </Info>-- </Accordion>- <Accordion title="--client-id">- ```bash- infisical login --client-id=<client-id> # Optional, required if --method=universal-auth.- ```-- #### Description- The client ID of the universal auth machine identity. This is required if the `--method` flag is set to `universal-auth`.-- <Tip>- The `client-id` flag can be substituted with the `INFISICAL_UNIVERSAL_AUTH_CLIENT_ID` environment variable.- </Tip>-- </Accordion>- <Accordion title="--client-secret">- ```bash- infisical login --client-secret=<client-secret> # Optional, required if --method=universal-auth.- ```- #### Description- The client secret of the universal auth machine identity. This is required if the `--method` flag is set to `universal-auth`.-- <Tip>- The `client-secret` flag can be substituted with the `INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET` environment variable.- </Tip>-- </Accordion>- <Accordion title="--machine-identity-id">- ```bash- infisical login --machine-identity-id=<your-machine-identity-id> # Optional, required if --method=kubernetes, azure, gcp-id-token, gcp-iam, or aws-iam.- ```-- #### Description- The ID of the machine identity. This is required if the `--method` flag is set to `kubernetes`, `azure`, `gcp-id-token`, `gcp-iam`, or `aws-iam`.-- <Tip>- The `machine-identity-id` flag can be substituted with the `INFISICAL_MACHINE_IDENTITY_ID` environment variable.- </Tip>-- </Accordion>- <Accordion title="--service-account-token-path">- ```bash- infisical login --service-account-token-path=<service-account-token-path> # Optional Will default to '/var/run/secrets/kubernetes.io/serviceaccount/token'.- ```-- #### Description- The path to the Kubernetes service account token to use for authentication.- This is optional and will default to `/var/run/secrets/kubernetes.io/serviceaccount/token`.-- <Tip>- The `service-account-token-path` flag can be substituted with the `INFISICAL_KUBERNETES_SERVICE_ACCOUNT_TOKEN_PATH` environment variable.- </Tip>-- </Accordion>- <Accordion title="--service-account-key-file-path">- ```bash- infisical login --service-account-key-file-path=<gcp-service-account-key-file-path> # Optional, but required if --method=gcp-iam.- ```-- #### Description- The path to your GCP service account key file. This is required if the `--method` flag is set to `gcp-iam`.-- <Tip>- The `service-account-key-path` flag can be substituted with the `INFISICAL_GCP_IAM_SERVICE_ACCOUNT_KEY_FILE_PATH` environment variable.- </Tip>-- </Accordion>- <Accordion title="--email">- ```bash- infisical login --email=<email> --password=<password> --organization-id=<organization-id>- ```-- #### Description- User email address. Required if you want to do a non-interactive login when the **--method** flag is set to **user**. Must be used together with the `--password` and `--organization-id` flag.-- <Tip>- You can omit the **--method=user** if you want as it's the default method.- </Tip>-- <Tip>- The `email` flag can be substituted with the `INFISICAL_EMAIL` environment variable.- </Tip>-- </Accordion>- <Accordion title="--password">- ```bash- infisical login --email=<email> --password=<password> --organization-id=<organization-id>- ```-- #### Description- User password. Required if you want to do a non-interactive login when the **--method** flag is set to **user**. Must be used together with the `--email` and `--organization-id` flag.-- <Warning>- For security in CI/CD environments, prefer using the `INFISICAL_PASSWORD` environment variable instead of passing the password as a command-line flag.- </Warning>-- <Tip>- You can omit the **--method=user** if you want as it's the default method.- </Tip>-- <Tip>- The `password` flag can be substituted with the `INFISICAL_PASSWORD` environment variable.- </Tip>-- </Accordion>- <Accordion title="--organization-id">- ```bash- infisical login --email=<email> --password=<password> --organization-id=<organization-id>- ```-- #### Description- User organization id. Required if you want to do a non-interactive login when the **--method** flag is set to **user**. Must be used together with the `--email` and `--password` flag.-- <Tip>- You can omit the **--method=user** if you want as it's the default method.- </Tip>-- <Tip>- The `organization-id` flag can be substituted with the `INFISICAL_ORGANIZATION_ID` environment variable.- </Tip>-- </Accordion>- <Accordion title="--interactive">- ```bash- infisical login --interactive- ```-- #### Description- Forces interactive CLI login where you'll be prompted to enter your email, password, and select your organization in the terminal, instead of opening a browser.-- </Accordion>- <Accordion title="--save-as">- ```bash- infisical login --save-as <name>- ```-- #### Description- Stores this login under the specified name. The CLI creates that profile, or replaces the profile's stored session if the name is already taken.-- If you're already logged in, a login with `--save-as` doesn't change which profile is selected, so other terminals keep the profile that they're already using. Select the new one with `--profile <name>`, or make it the default with `infisical profile use <name>`.-- ```bash- # Sign in to a second account and keep the first.- infisical login --save-as contractor- infisical secrets --profile contractor- ```-- </Accordion>- <Accordion title="--profile">- ```bash- infisical login --profile <name>- ```-- #### Description- Signs back in to a profile that already exists. The profile keeps its account, its instance, and its organization, so you do not have to pass `--organization-id`.-- ```bash- infisical login --profile globex- ```-- </Accordion>- <Accordion title="--plain">- ```bash- infisical login --email=<email> --password=<password> --organization-id=<organization-id> --plain- ```-- #### Description- When used with direct user login or machine identity authentication, outputs only the JWT access token without any additional formatting. This is useful for scripting and CI/CD pipelines where you need to capture the token.-- ```bash- # Example: Capture token in a variable- export INFISICAL_TOKEN=$(infisical login --email=<email> --password=<password> --organization-id=<organization-id> --plain --silent)- ```-- <Tip>- Use it alongside the `silent` flag to disable all messages in the console except from the access token.- </Tip>-- </Accordion>- <Accordion title="--jwt">- ```bash- infisical login --jwt=<jwt-token> --machine-identity-id=<machine-identity-id>- ```-- #### Description- The JWT provided by an identity provider for OIDC or plain JWT authentication. This is required if the `--method` flag is set to `oidc-auth` or `jwt-auth`.-- <Tip>- The `jwt` flag can be substituted with the `INFISICAL_JWT` environment variable.- </Tip>-- </Accordion>- <Accordion title="--domain">- ```bash- infisical login --domain=<domain-url>- ```-- #### Description- Specifies the Infisical API URL for non-US Cloud instances. This flag is required when connecting to any instance other than US Cloud (e.g. EU Cloud or self-hosted).-- ```bash- # Example for EU Cloud- infisical login --domain="https://eu.infisical.com"-- # Example for localhost- infisical login --domain="http://localhost:8080"-- # Example for self-hosted- infisical login --domain="https://your-self-hosted-infisical.com"- ```-- <Warning>- **Critical:** If you use `--domain` during login, you must also include it on **all subsequent CLI commands** (e.g., `infisical secrets`, `infisical export`, etc.). Alternatively, set the `INFISICAL_API_URL` environment variable to avoid having to use `--domain` on every command. Refer to the [Domain Configuration](/cli/usage#domain-configuration) section for more details.- </Warning>-- </Accordion>- </AccordionGroup>--### User authentication examples--The following examples demonstrate different ways to authenticate as a user with the Infisical CLI.--<AccordionGroup>- <Accordion title="Browser Login (Default)">- By default, running `infisical login` without any flags opens your browser for authentication.-- ```bash- # Opens browser for authentication- infisical login- ```-- The browser will open to the Infisical login page, and upon successful authentication, the CLI will be automatically authenticated.-- </Accordion>-- <Accordion title="Direct Login (Non-Interactive)">- Direct login is ideal for CI/CD pipelines and automation scripts where browser-based authentication isn't possible.-- #### Using command-line flags-- ```bash- # Basic direct login (defaults to US Cloud)- infisical login --email [email protected] --password "your-password" --organization-id "your-organization-id"-- # Basic direct login (EU Cloud)- infisical login --domain https://eu.infisical.com --email [email protected] --password "your-password" --organization-id "your-organization-id"-- # Basic direct login (Self-hosted Instance)- infisical login --domain https://your-self-hosted-infisical.com --email [email protected] --password "your-password" --organization-id "your-organization-id"-- # Output only JWT token for scripting- export INFISICAL_TOKEN=$(infisical login --email [email protected] --password "your-password" --organization-id "your-organization-id" --plain --silent)- ```-- #### Using environment variables (recommended for CI/CD)-- ```bash- # Set credentials as environment variables- export INFISICAL_EMAIL="[email protected]"- export INFISICAL_PASSWORD="your-password"- export INFISICAL_ORGANIZATION_ID="your-organization-id"-- # Login without additional flags- infisical login-- # Or with plain output for token capture- export INFISICAL_TOKEN=$(infisical login --plain --silent)- ```-- <Warning>- **For non-US Cloud instances:** If you're using EU Cloud or a self-hosted instance, you must set `INFISICAL_API_URL` before login or use `--domain` on all commands. Refer to the [Domain Configuration](/cli/usage#domain-configuration) section for more details.- </Warning>-- </Accordion>-- <Accordion title="Interactive CLI Login">- Interactive login prompts you to enter credentials in the terminal instead of opening a browser.-- ```bash- # Force interactive CLI login- infisical login --interactive- ```-- You'll be prompted to enter:- - Email address- - Password-- After the prompt, you will be shown a list of organizations to choose from.-- </Accordion>--</AccordionGroup>--<Tip>- If you have SSO enabled, we recommend using the default browser login.-</Tip>--### Sub-commands--<Accordion title="infisical login status" defaultOpen="true">- Reports whether the CLI is currently authenticated to Infisical and, when available, the organization the active session is scoped to. The command checks the user session stored in your vault, machine identity tokens exported as environment variables, and a token passed via the `--token` flag.--```bash-infisical login status-```--In addition to local checks (token presence, local expiration), `status` calls the Infisical backend to verify that each credential is still valid — so revoked or rejected tokens are surfaced even when they look fine locally.--#### Sources checked--- **User session**: the active login stored in your system keyring (or the configured [vault](./vault)). The report names the profile that the session belongs to, and how the CLI selected it.-- **Machine identity environment variable**: `INFISICAL_TOKEN`.-- **`--token` flag**: a specific machine identity access token passed explicitly.--#### Exit codes--- `0`: at least one session was reported and none are expired or rejected.-- `1`: no active session was found, or a reported session is expired or rejected by the backend.--#### Flags-- <Accordion title="--json">- Output the login status as JSON instead of the default human-readable format. Useful for scripting and CI/CD pipelines.-- ```bash- infisical login status --json- ```-- </Accordion>-- <Accordion title="--token">- Inspect the given machine identity access token instead of the active session or environment variables. When this flag is set, `--domain` (or the `INFISICAL_API_URL` environment variable) must also be provided so the status reflects the correct Infisical instance.-- ```bash- infisical login status --token=<machine-identity-access-token> --domain=<domain-url>- ```-- </Accordion>--#### Examples-- <AccordionGroup>- <Accordion title="Check the active user session">- ```bash- infisical login status- ```-- Example output:-- ```bash- ✓ Authenticated as [email protected]- - Domain: https://app.infisical.com- - Profile: [email protected] (via default profile)- - Auth method: email- - Token source: infisical login (keyring)- - Token expiration: 6h 12m- - User ID: 4377366c-e6b4-437f-865c-bbf90ace32f9- - Organization: Acme (9c0f4df6-57fb-4b5f-927b-799dc0121520)- ```-- </Accordion>-- <Accordion title="Check a machine identity token from the environment">- ```bash- export INFISICAL_TOKEN=$(infisical login --method=universal-auth --client-id=<client-id> --client-secret=<client-secret> --plain --silent)- infisical login status- ```-- </Accordion>-- <Accordion title="Inspect a specific token without changing the active session">- ```bash- infisical login status --token=<machine-identity-access-token> --domain=https://app.infisical.com- ```-- </Accordion>-- <Accordion title="JSON output for scripts">- ```bash- infisical login status --json- ```-- </Accordion>-- </AccordionGroup>--</Accordion>--### Machine identity authentication quick start--In this example we'll be using the `universal-auth` method to login to obtain an Infisical access token, which we will then use to fetch secrets with.--<Steps>- <Step title="Obtain an access token">- ```bash- export INFISICAL_TOKEN=$(infisical login --method=universal-auth --client-id=<client-id> --client-secret=<client-secret> --silent --plain) # silent and plain is important to ensure only the token itself is printed, so we can easily set it as an environment variable.- ```-- <Warning>- **For non-US Cloud instances:** If you're using EU Cloud or a self-hosted instance, you must set `INFISICAL_API_URL` before login or use `--domain` on all commands. Refer to the [Domain Configuration](/cli/usage#domain-configuration) section for more details.- </Warning>-- Now that we've set the `INFISICAL_TOKEN` environment variable, we can use the CLI to interact with Infisical. The CLI will automatically check for the presence of the `INFISICAL_TOKEN` environment variable and use it for authentication.--- Alternatively, if you would rather use the `--token` flag to pass the token directly, you can do so by running the following command:-- ```bash- infisical [command] --token=<your-access-token> # The token output from the login command.- ```- </Step>-- <Step title="Fetch all secrets from an environment">- ```bash- infisical secrets --projectId=<your-project-id> --env=dev --recursive- ```-- This command will fetch all secrets from the `dev` environment in your project, including all secrets in subfolders.-- <Info>- The `--recursive`, and `--env` flag is optional and will fetch all secrets in subfolders. The default environment is `dev` if no `--env` flag is provided.- </Info>- </Step>--</Steps>diff --git a/docs/cli/commands/logout.mdx b/docs/cli/commands/logout.mdxdeleted file mode 100644index 9b1f0471bd..0000000000--- a/docs/cli/commands/logout.mdx+++ /dev/null@@ -1,54 +0,0 @@-----title: "infisical logout"-description: "End a login session"------```bash-infisical logout-```--## Description--This command ends a login session. The CLI removes the stored credentials of the profile from this machine, and revokes its session on the server when no other profile still uses that session.--The profile is kept, so `infisical login --profile <name>` signs back in without setting it up again. To remove the profile as well, run `infisical profile delete`.--By default the command logs out of the profile that the current directory and terminal are set to. See [profile](./profile) for how the CLI selects profiles.--<Info>- While each profile stores its own credentials, multiple profiles for one- account on a single machine share a server session. Logout always removes the- current profile's credentials, and revokes the shared session only when no- profile that you keep still uses it.-</Info>--### Flags--<AccordionGroup>- <Accordion title="--all">- Log out of every profile on this machine.-- ```bash- infisical logout --all- ```-- </Accordion>-- <Accordion title="--local-only">- Remove the stored credentials without revoking the session on the server. The session stays valid until it expires.-- ```bash- infisical logout --local-only- ```-- </Accordion>-- <Accordion title="--profile">- Log out of a specific profile.-- ```bash- infisical logout --profile globex- ```-- </Accordion>-</AccordionGroup>diff --git a/docs/cli/commands/org.mdx b/docs/cli/commands/org.mdxdeleted file mode 100644index 91116ab72c..0000000000--- a/docs/cli/commands/org.mdx+++ /dev/null@@ -1,65 +0,0 @@-----title: "infisical org"-description: "List organizations and set the one a profile uses"------```bash-infisical org-```--## Description--This command shows the organizations that your account can use, and sets the organization that the current profile uses by default.--A profile is a single login: an account on the specified Infisical instance, and the organization you chose for it. See [profile](./profile) for how the CLI selects a profile.--### Sub-commands--<Accordion title="infisical org list" defaultOpen="true">- List the organizations that the account of this profile can use. The organization that the current profile uses is marked with an asterisk.--```bash-infisical org list-```--Sub-organizations appear indented under the organization that it belongs to.--```bash-CURRENT NAME SLUG ID- Acme acme 9c0f4df6-57fb-4b5f-927b-799dc0121520-* └─ Research acme-research ff714dbe-8a8a-4a88-83b8-2bf776f91ed3- Globex globex-inc d68da2e6-8441-4341-a6cd-fd6d7643e3bc-```--</Accordion>--<Accordion title="infisical org switch">- Set the organization that the current profile uses by default. This command is an alias for `infisical profile set-org`.--```bash-infisical org switch globex-inc-```--If you omit the organization, the CLI will ask you to pick one.--<Tip>- To use another organization for a single command, pass `--org`. To keep a- second organization available at the same time, run `infisical profile create`.-</Tip>--</Accordion>--### Choosing an organization for one command--Pass `--org` to point a single command at another organization. Name the organization by name, slug, or id.--```bash-infisical secrets --org globex-inc-```--The default organization of the profile doesn't change. The CLI caches the session for each organization that you use this way.--<Tip>- The `org` flag can be substituted with the `INFISICAL_ORG` environment- variable.-</Tip>diff --git a/docs/cli/commands/pam-agentic.mdx b/docs/cli/commands/pam-agentic.mdxdeleted file mode 100644index 416dbe1be9..0000000000--- a/docs/cli/commands/pam-agentic.mdx+++ /dev/null@@ -1,161 +0,0 @@-----title: "pam agentic access"-description: "Run an AI agent against your PAM accounts through local, brokered connections"------```bash-infisical pam agentic access [flags] -- <agent command>-```--## Description--Open every PAM account the caller can launch as a local connection point, then start your agent. The agent connects to the accounts its task needs; the CLI never connects to an account itself, and no credential reaches the agent.--Claude Code, Codex, and Gemini receive their instructions in their own format. Any other agent, including one you developed, reads them from the file named by `INFISICAL_PAM_CONTEXT_FILE`, which every run exports.--Everything after `--` is the command that starts your agent. The separator is required whenever that command has flags of its own.--```bash-# a coding agent, with every account you can launch-infisical pam agentic access -- claude--# another coding agent, its own flags, two accounts-infisical pam agentic access --account prod/orders-db,prod/bastion -- codex --model gpt-5--# your own agent, unattended, as a machine identity-export INFISICAL_AUTH_METHOD=universal-auth-export INFISICAL_UNIVERSAL_AUTH_CLIENT_ID=<client-id>-export INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET=<client-secret>--infisical pam agentic access --reason "nightly triage agent" -- python triage_agent.py-```--<Note>- For the full picture, including what the agent is told, what the sandbox does and doesn't protect, and how gated accounts behave mid-run, see [AI Agents](/documentation/platform/pam/ai-agents/overview). To open a single account for yourself instead, use [`infisical pam access`](/cli/commands/pam).-</Note>--## Flags--<AccordionGroup>- <Accordion title="--account">- Account to expose, as `folder/account`. Repeatable, and also accepts a comma-separated list. Defaults to every account you can launch.-- If you name an account that cannot be used, the command stops and says why.-- ```bash- # Example- infisical pam agentic access --account prod/orders-db --account prod/bastion -- claude- ```- </Accordion>-- <Accordion title="--duration">- How long each PAM session may last, capped by the account's template. Supports Go duration format (e.g., `1h`, `30m`, `2h30m`).-- Default value: `1h`-- ```bash- # Example- infisical pam agentic access --duration 30m -- claude- ```- </Accordion>-- <Accordion title="--reason">- Reason for access, recorded for audit. There is nobody to prompt here, so an account whose template requires a reason needs this flag.-- ```bash- # Example- infisical pam agentic access --reason "investigating INC-4021" -- claude- ```- </Accordion>-- <Accordion title="--agent">- Override agent detection. Accepts `claude`, `codex`, `gemini`, or `generic`. Detection normally comes from the command name, so this is for a wrapper script or an unusual binary name. An agent of your own needs nothing here: it reads `INFISICAL_PAM_CONTEXT_FILE` regardless.-- ```bash- # Example- infisical pam agentic access --agent claude -- ./my-claude-wrapper.sh- ```- </Accordion>-- <Accordion title="--token">- Run as a machine identity using an access token you already have. Service tokens are rejected.-- Set `INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN` (or `INFISICAL_TOKEN`) instead of passing the flag, so the token stays out of your shell history and out of process listings.-- ```bash- # Example- export INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN=<access-token>- infisical pam agentic access -- claude- ```- </Accordion>-- <Accordion title="--auth-method">- Authenticate as a machine identity with its own credentials instead of a ready-made `--token`. Accepts `universal-auth`, `kubernetes`, `azure`, `gcp-id-token`, `gcp-iam`, `aws-iam`, `oidc-auth`, `jwt-auth`, and `ldap-auth`.-- Prefer this over `--token` for a long run: the credentials are kept valid for its whole duration.-- Every input has an environment variable, and **secrets should go through the environment rather than a flag**:-- | Input | Flag | Environment variable |- |---|---|---|- | Auth method | `--auth-method` | `INFISICAL_AUTH_METHOD` |- | Client ID | `--client-id` | `INFISICAL_UNIVERSAL_AUTH_CLIENT_ID` |- | Client secret | `--client-secret` | `INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET` |- | Machine identity ID | `--machine-identity-id` | `INFISICAL_MACHINE_IDENTITY_ID` |- | Kubernetes token path | `--service-account-token-path` | `INFISICAL_KUBERNETES_SERVICE_ACCOUNT_TOKEN_PATH` |- | GCP IAM key file path | `--service-account-key-file-path` | `INFISICAL_GCP_IAM_SERVICE_ACCOUNT_KEY_FILE_PATH` |- | JWT (`oidc-auth`, `jwt-auth`) | `--jwt` | `INFISICAL_JWT` |- | LDAP credentials | `--ldap-username`, `--ldap-password` | `INFISICAL_LDAP_USERNAME`, `INFISICAL_LDAP_PASSWORD` |-- ```bash- # Example- export INFISICAL_AUTH_METHOD=kubernetes- export INFISICAL_MACHINE_IDENTITY_ID=<identity-id>- infisical pam agentic access -- claude- ```- </Accordion>-- <Accordion title="--organization-slug">- Scope the session to a sub-organization the machine identity can reach. Defaults to the organization the identity was created in.- </Accordion>-- <Accordion title="--no-approval-request">- Don't file [access requests](/documentation/platform/pam/access-requests/overview) for accounts that require approval. Those accounts stay unusable for the run.-- By default, a request is filed the first time the agent reaches for a gated account, and the account works once a reviewer approves it.- </Accordion>-- <Accordion title="--no-sandbox">- Run the agent without the sandbox, so nothing local restricts what it can read on this host. Keep the sandbox on wherever your operating system provides one; this flag is required on Windows, where none is available.-- See [The sandbox](/documentation/platform/pam/ai-agents/overview#the-sandbox) for what it covers.- </Accordion>-- <Accordion title="--log-file">- Where to write proxy logs while the agent runs.-- Default value: `~/.infisical/pam-agentic/access.log`-- ```bash- # Example- infisical pam agentic access --log-file /tmp/pam.log -- claude- ```- </Accordion>-- <Accordion title="--domain">- Domain of your self-hosted Infisical instance. If not specified, defaults to Infisical Cloud.- </Accordion>-</AccordionGroup>--## Account types--Database, SSH, Kubernetes, and Windows RDP accounts are supported. See [Supported account types](/documentation/platform/pam/ai-agents/overview#supported-account-types).--## Error messages--| Error | Cause | Solution |-|-------|-------|----------|-| `Invalid duration format` | Malformed `--duration` value | Use formats like `1h`, `30m`, `2h30m` |-| `cannot start the following accounts` | A named `--account` is unusable | Read the reason listed for each, or drop the flag to take every account you can launch |-| `requires a reason for access` | The account's template requires one | Pass `--reason` |-| `failed to check sandbox support on this host` | No sandbox available on this host | Install bubblewrap on Linux, or pass `--no-sandbox` deliberately |diff --git a/docs/cli/commands/pam.mdx b/docs/cli/commands/pam.mdxdeleted file mode 100644index ff1eb75830..0000000000--- a/docs/cli/commands/pam.mdx+++ /dev/null@@ -1,320 +0,0 @@-----title: "pam access"-description: "Access a PAM-managed database, server, or cloud account from your terminal"------```bash-infisical pam access <path> [flags] [-- <command>]-```--## Description--Open one PAM-managed account for your own use, brokered through Infisical's [Gateway](/documentation/platform/gateways/overview) so you never handle its credentials. Requires `infisical login`.--The CLI connects to the gateway from your own machine, which means you need a network path to it. A gateway in [relay mode](/documentation/platform/gateways/network-architecture) works from anywhere, because the relay is reachable from outside your network. A gateway in direct listen mode only works from a machine that can reach its registered address. From outside that network you'll need a VPN into it, or a relay on the gateway.--This single command handles every account type: the CLI adapts its behavior to whichever type the account's template defines (see [Account Types and Behavior](#account-types-and-behavior) below).--SSH accounts connect you directly to a shell on the target. Every other account type starts a local proxy or credential helper that you point your own client at.--<Note>- To open several accounts at once for an AI agent, use [`infisical pam agentic access`](/cli/commands/pam-agentic) instead, which can also authenticate as a [machine identity](/documentation/platform/identities/machine-identities) so an agent can run unattended.-</Note>--## Arguments--| Argument | Description |-|----------|-------------|-| `<path>` | **Required.** Path to the PAM account in format `folder/account-name` |-| `<command>` | Optional, after `--`. A command to run on the target instead of opening a shell. SSH accounts only. |--## Flags--<Accordion title="--proxy">- Start a local proxy to point your own client at, instead of connecting you to the target.-- Only SSH accounts connect directly today, so this only changes behavior for them. Use it for SCP, SFTP, rsync, port forwarding, GUI clients, or anything that needs your `~/.ssh/config`.-- ```bash- # Example- infisical pam access servers/prod-bastion --proxy- ```-</Accordion>--<Accordion title="--duration">- Session duration. Supports Go duration format (e.g., `1h`, `30m`, `2h30m`).-- Default value: `1h`-- ```bash- # Example- infisical pam access production/postgres-main --duration 4h- ```-</Accordion>--<Accordion title="--reason">- Audit reason for access. Required by some policies; prompts interactively if TTY available.-- ```bash- # Example- infisical pam access production/database --reason "Investigating incident INC-1234"- ```-</Accordion>--<Accordion title="--port">- Local proxy port. Use `0` for auto-assign.-- For SSH accounts this requires `--proxy`, since a port is only meaningful when a proxy is running.-- Default value: `0`-- ```bash- # Example- infisical pam access staging/mysql-replica --port 3306- ```-</Accordion>--<Accordion title="--target">- Target host for multi-host accounts (e.g., Windows AD environments).-- ```bash- # Example- infisical pam access windows/domain-admin --target dc01.corp.local- ```-</Accordion>--<Accordion title="--domain">- Domain of your self-hosted Infisical instance. If not specified, defaults to Infisical Cloud.-- ```bash- # Example- infisical pam access production/database --domain https://your-infisical-instance.com- ```-</Accordion>--## Account types and behavior--Based on the account's template, the CLI connects you directly or starts the appropriate local proxy or credential helper. SSH accounts connect directly by default; every other type starts a proxy or credential helper.--<AccordionGroup>- <Accordion title="Databases (PostgreSQL, MySQL, SQL Server, MongoDB)">- Starts a local database proxy on `127.0.0.1`. Connect using standard database clients — no password required as authentication is handled by the proxy.-- ```bash- # Example- infisical pam access production/postgres-main --duration 2h- ```-- The output includes connection details and CLI examples:-- | Database Type | Connection String Format |- |--------------|-------------------------|- | PostgreSQL | `postgres://<username>@127.0.0.1:<port>/<database>` |- | MySQL | `mysql://<username>@127.0.0.1:<port>/<database>` |- | SQL Server | `sqlserver://<username>@127.0.0.1:<port>?database=<database>` |- | MongoDB | `mongodb://127.0.0.1:<port>/<database>` |- </Accordion>-- <Accordion title="Redis">- Starts a local Redis proxy on `127.0.0.1`. Connect using any Redis client with no password, as authentication is handled by the proxy.-- ```bash- # Example- infisical pam access production/cache-primary --duration 2h- ```-- Then connect with `redis-cli` or any Redis client:-- ```bash- redis-cli -h 127.0.0.1 -p <port>- ```-- Connection string format: `redis://127.0.0.1:<port>`- </Accordion>-- <Accordion title="Oracle">- Starts a local Oracle proxy on `127.0.0.1`.-- ```bash- # Example- infisical pam access production/billing-db --duration 2h- ```-- Oracle's login protocol requires the client to send a password, so type `password` literally. The Gateway swaps in the real credential during login.-- ```bash- sqlplus <username>/[email protected]:<port>/<service-name>- ```- </Accordion>-- <Accordion title="SSH">- Connects you straight to a shell on the target.-- ```bash- infisical pam access servers/prod-bastion- ```-- Type `exit` or press `Ctrl+D` to end the session. The remote shell's exit code becomes the command's exit code.-- **Run a single command**-- Put it after `--`. Output streams through, so this composes with pipes and scripts:-- ```bash- infisical pam access servers/prod-bastion -- systemctl status nginx- infisical pam access servers/prod-bastion -- df -h | grep /var- ```-- **Use your own client**-- `--proxy` starts a local SSH proxy instead, for file transfer, port forwarding, `~/.ssh/config`, or a GUI client:-- ```bash- infisical pam access servers/prod-bastion --proxy- ```-- Then connect to the port it prints:-- ```bash- # SSH- ssh -p <port> -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null [email protected]-- # SCP file transfer- scp -P <port> -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null file.txt [email protected]:/path/-- # rsync- rsync -e "ssh -p <port> -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" local-dir/ [email protected]:/remote/path/- ```- </Accordion>-- <Accordion title="Kubernetes">- Starts a local Kubernetes proxy and automatically configures kubectl context.-- ```bash- # Example- infisical pam access clusters/prod-cluster --duration 4h- ```-- kubectl is automatically configured with a context named `infisical-k8s-pam/folder/account-name`. Use kubectl normally:-- ```bash- kubectl get pods- kubectl get namespaces- ```-- The original kubeconfig context is restored when the session ends.- </Accordion>-- <Accordion title="AWS IAM">- Writes temporary STS credentials to your AWS credentials file (`~/.aws/credentials` or wherever `AWS_SHARED_CREDENTIALS_FILE` points).-- ```bash- # Example- infisical pam access aws/production-role- ```-- The credentials are written as a named profile: `infisical-pam/folder/account-name`-- Use with the AWS CLI:-- ```bash- # Use --profile flag- aws s3 ls --profile "infisical-pam/aws/production-role"-- # Or export the profile- export AWS_PROFILE="infisical-pam/aws/production-role"- aws s3 ls- ```-- The session blocks until `Ctrl+C` or credential expiry. When the session ends, the profile is removed from the credentials file.- </Accordion>-- <Accordion title="GCP Service Account">- Starts a local proxy on `127.0.0.1` and automatically configures `gcloud` to route through it (via the `proxy/*`, `auth/access_token_file`, and `core/custom_ca_certs_file` config properties). Requires the [`gcloud` CLI](https://cloud.google.com/sdk/docs/install) to be installed. All traffic is proxied through the Infisical Gateway, which injects the brokered credentials before forwarding to `googleapis.com`.-- ```bash- # Example- infisical pam access gcp/prod-deployer- ```-- Run `gcloud` and other Google Cloud tooling as normal — no per-command configuration needed:-- ```bash- gcloud compute instances list- gcloud storage ls- ```-- The session blocks until `Ctrl+C` or expiry. On shutdown, your `gcloud` configuration is restored.- </Accordion>-- <Accordion title="Azure CLI">- Starts an isolated, authenticated `az` shell for the session (using a temporary `AZURE_CONFIG_DIR`, so your own `az` login is untouched). Requires the [Azure CLI (`az`)](https://learn.microsoft.com/cli/azure/install-azure-cli) to be installed. All traffic is proxied through the Infisical Gateway, which injects the brokered token before forwarding to `management.azure.com`.-- ```bash- # Example- infisical pam access azure/prod-reader- ```-- Run `az` as normal inside the session shell:-- ```bash- az account show- az group list- ```-- Type `exit` to end the session (or press `Ctrl+C`, or wait for expiry). The isolated session state is wiped on shutdown.- </Accordion>-- <Accordion title="Windows / RDP">- Starts a local RDP proxy. Connect your RDP client to `127.0.0.1` on the assigned port.-- ```bash- # Single-server Windows account- infisical pam access windows/admin-server-- # Windows AD with multiple targets- infisical pam access windows/domain-admin --target dc01.corp.local- ```-- Connect using your preferred RDP client (e.g., Microsoft Remote Desktop, xfreerdp, Remmina).- </Accordion>-</AccordionGroup>--## MFA support--If your organization requires MFA for PAM access:--1. CLI detects `SESSION_MFA_REQUIRED` response-2. Browser opens to MFA verification page-3. CLI polls for up to 5 minutes for completion-4. Access continues automatically after MFA verification--<Note>- This is the only command that can satisfy an MFA requirement. [`pam agentic access`](/cli/commands/pam-agentic) doesn't support MFA-gated accounts yet, so reach those here.-</Note>--## Reason prompting--Some PAM policies require an audit reason. Behavior:--| Scenario | Behavior |-|----------|----------|-| With `--reason` flag | Uses provided reason |-| Interactive terminal (TTY) | Prompts for reason if required |-| Non-interactive (CI/CD) | Fails with error if reason required but not provided |--```bash-# Provide reason via flag-infisical pam access production/database --reason "Investigating incident INC-1234"-```--## Error messages--| Error | Cause | Solution |-|-------|-------|----------|-| `Invalid duration format` | Malformed `--duration` value | Use formats like `1h`, `30m`, `2h30m` |-| `a reason is required to access this account` | Policy requires reason, no TTY | Pass `--reason` flag |-| `Gateway does not support '{type}' PAM accounts` | Gateway version too old | Upgrade Infisical Gateway |-| `direct gateway connection failed and no relay fallback is available` | The gateway only listens directly, and your machine can't reach its address | Connect from the gateway's network or over a VPN, or ask an admin to add a relay to the gateway |-| `This gateway only supports direct connections. Upgrade the Infisical CLI to connect to it.` | CLI too old to use a direct listen gateway | Upgrade the Infisical CLI |-| `PAM response metadata is missing` | API response incomplete | Contact support |diff --git a/docs/cli/commands/profile.mdx b/docs/cli/commands/profile.mdxdeleted file mode 100644index 76fa5981e5..0000000000--- a/docs/cli/commands/profile.mdx+++ /dev/null@@ -1,286 +0,0 @@-----title: "infisical profile"-description: "Keep a login per organization and choose between them"------```bash-infisical profile-```--## Description--A profile is a single login: an account on the specified Infisical instance, and the organization you chose for it. Each profile keeps its own session, so you can work in several organizations at the same time.--The organization is a setting on a profile, not part of its identity. To use another organization for a single command, pass `--org`. To change the default organization for a profile, run `infisical profile set-org`.--### How a profile is selected--Every command selects a profile in this order:--1. The `--profile` flag.-2. The `INFISICAL_PROFILE` environment variable.-3. A directory that you bound to a profile, with `infisical profile bind` or during `infisical init`.-4. The default profile for the machine, set with `infisical profile use`.--The first one that applies wins. If an override hides a bound directory, the CLI reports which profile it used and why.--<Info>- Your first login creates a profile for you. The name comes from your account- and organization, for example `[email protected]`.-</Info>--### Sub-commands--<Accordion title="infisical profile list" defaultOpen="true">- List every profile on this machine, with its account, organization, instance, and session state.--```bash-infisical profile list-```--The current profile is marked with an asterisk.--```bash-CURRENT NAME EMAIL ORGANIZATION SESSION DOMAIN DIRECTORY SCOPES-* [email protected] [email protected] Acme active https://app.infisical.com ~/code/acme- globex [email protected] Globex active https://app.infisical.com -- research [email protected] Acme / Research active https://app.infisical.com --```--</Accordion>--<Accordion title="infisical profile current">- Show which profile a command run in the current terminal or directory will use, and why it was selected.--```bash-infisical profile current-```--```bash-Profile: globex-Selected via: INFISICAL_PROFILE environment variable-Email: [email protected]-Organization: Globex (9c0f4df6-57fb-4b5f-927b-799dc0121520)-Organization via: profile default-Domain: https://app.infisical.com-```--#### Flags-- <Accordion title="--plain">- Print only the profile name. Use this in a shell prompt.-- ```bash- infisical profile current --plain- ```-- </Accordion>--</Accordion>--<Accordion title="infisical profile create">- Create a profile for another organization without logging in again. The new profile reuses the account and instance that you're signed in to.--```bash-infisical profile create [name]-```--If you omit `--org`, the CLI will ask you to pick an organization.--```bash-infisical profile create globex --org globex-inc-```--#### Flags-- <Accordion title="--use">- Also make the new profile the default for this machine.-- ```bash- infisical profile create globex --org globex-inc --use- ```-- </Accordion>-- <Accordion title="--pin">- Also pin this terminal to the new profile. Run the command through `eval`,- because a command can't change the environment of the shell that started it.-- ```bash- eval "$(infisical profile create globex --org globex-inc --pin)"- ```-- </Accordion>--</Accordion>--<Accordion title="infisical profile use">- Make a profile the default for this machine. The default applies when no flag, no environment variable, and no bound directory selects a profile.--```bash-infisical profile use globex-```--<Tip>- To choose a profile for one terminal, use `infisical profile pin`. To choose- one for a directory, use `infisical profile bind`.-</Tip>--</Accordion>--<Accordion title="infisical profile pin">- Pin the current terminal to a profile. Other terminals keep the profile that they already use.--The command prints an export statement. Run it through `eval` to apply it to the shell that you're in.--```bash-eval "$(infisical profile pin globex)"-```--<Info>- In PowerShell, run `infisical profile pin globex | Invoke-Expression`. In- `cmd.exe`, or in a script, set `INFISICAL_PROFILE=globex` yourself.-</Info>--</Accordion>--<Accordion title="infisical profile unpin">- Remove the pin from the current terminal. The terminal falls back to a bound directory, or to the default profile.--```bash-eval "$(infisical profile unpin)"-```--</Accordion>--<Accordion title="infisical profile bind">- Bind a directory, and every directory under it, to a profile. Commands that run inside it select that profile with no flag and no environment variable.--```bash-infisical profile bind globex ~/code/globex-```--If you omit the path, the CLI binds the current directory. If bindings overlap, the nearest one wins.--`infisical init` also offers to bind a directory, if you have more than one profile.--<Info>- The binding is stored in your own configuration, never in the repository, so- it doesn't affect anyone else who clones the project.-</Info>--</Accordion>--<Accordion title="infisical profile unbind">- Remove the profile binding from a directory.--```bash-infisical profile unbind [path]-```--If you omit the path, the CLI removes the binding that covers the current directory.--</Accordion>--<Accordion title="infisical profile set-org">- Set the organization that a profile uses by default. The change persists for future commands.--```bash-infisical profile set-org globex-inc-```--<Tip>- To use another organization for a single command, pass `--org`. To keep a- second organization available as its own profile, run `infisical profile create`.-</Tip>--</Accordion>--<Accordion title="infisical profile rename">- Rename a profile. The stored session, the default-profile setting, and any directory bindings follow the new name.--```bash-infisical profile rename old-name new-name-```--<Warning>- Update any terminal that you pinned to the old name. The pin holds the old- name, so those terminals no longer find the profile.-</Warning>--</Accordion>--<Accordion title="infisical profile delete">- Delete a profile and remove its stored session. The CLI revokes the session on the server as well.--```bash-infisical profile delete globex-```--#### Flags-- <Accordion title="--local-only">- Remove the profile without revoking its session on the server.-- ```bash- infisical profile delete globex --local-only- ```-- </Accordion>--</Accordion>--### Global flags--These flags work on every command, not only on `infisical profile`.--<AccordionGroup>- <Accordion title="--profile">- Use a specific profile for this command.-- ```bash- infisical secrets --profile globex- ```-- <Tip>- The `profile` flag can be substituted with the `INFISICAL_PROFILE`- environment variable.- </Tip>-- </Accordion>-</AccordionGroup>--### Examples--<AccordionGroup>- <Accordion title="Work in two organizations at once">- ```bash- # You are already logged in to Acme.- infisical profile create globex --org globex-inc-- # Use Globex in this terminal only.- eval "$(infisical profile pin globex)"- infisical secrets- ```-- </Accordion>-- <Accordion title="Give each repository its own organization">- ```bash- infisical profile bind acme ~/code/acme- infisical profile bind globex ~/code/globex-- cd ~/code/globex- infisical profile current # globex- ```-- </Accordion>-- <Accordion title="Log in to a second account">- ```bash- infisical login --save-as contractor- infisical secrets --profile contractor- ```-- </Accordion>-</AccordionGroup>diff --git a/docs/cli/commands/relay.mdx b/docs/cli/commands/relay.mdxdeleted file mode 100644index 5c137a7bf7..0000000000--- a/docs/cli/commands/relay.mdx+++ /dev/null@@ -1,157 +0,0 @@-----title: "infisical relay"-description: "Relay-related commands for Infisical"------## Description--Relay-related commands for Infisical. Relays are organization-deployed servers that route encrypted traffic between Infisical and your gateways.--Relays are created via the Infisical dashboard (Networking → Relays → Create Relay) and then deployed using the CLI commands below.--## Subcommands & flags--<AccordionGroup>-<Accordion title="infisical relay start" defaultOpen="true">- Run the Infisical relay component. The relay handles network traffic routing between Infisical and your gateways.--### Authentication--Relays support two enrollment methods. The enrollment method is set when creating the relay in the dashboard.--<AccordionGroup>- <Accordion title="Token Auth">- Token auth uses a one-time enrollment token (1 hour expiry) generated from the relay detail page. The token is exchanged for a long-lived access token on first start and stored on disk for subsequent restarts.-- The `--host` flag is not required — the host is stored server-side when the relay is created.-- <Tabs>- <Tab title="Foreground">- ```bash- infisical relay start \- --name=<name> \- --enroll-method=token \- --token=<enrollment-token> \- --domain=<your-infisical-domain>- ```- </Tab>- <Tab title="Linux (systemd)">- ```bash- sudo infisical relay systemd install <name> \- --enroll-method=token \- --token=<enrollment-token> \- --domain=<your-infisical-domain>- sudo systemctl start <name>- ```- </Tab>- </Tabs>-- On subsequent starts with the same enrollment token, the relay skips enrollment and uses the stored access token.-- Token-method enrollment tokens are single-use and expire after 1 hour. If the token expires before deployment, click **Show deploy command** on the relay detail page to generate a new one.- </Accordion>-- <Accordion title="AWS Auth">- AWS auth uses the host's AWS credentials (instance role, env vars, or shared profile) to authenticate via STS GetCallerIdentity. A fresh token is minted on every start — no on-disk persistence needed.-- <Tabs>- <Tab title="Foreground">- ```bash- infisical relay start \- --name=<name> \- --enroll-method=aws \- --relay-id=<relay-id> \- --domain=<your-infisical-domain>- ```- </Tab>- <Tab title="Linux (systemd)">- ```bash- sudo infisical relay systemd install <name> \- --enroll-method=aws \- --relay-id=<relay-id> \- --domain=<your-infisical-domain>- sudo systemctl start <name>- ```- </Tab>- </Tabs>-- The `--relay-id` is the relay's UUID, visible on the relay detail page. The relay ID is persisted after first use so subsequent starts don't need `--relay-id` again.- </Accordion>-</AccordionGroup>--### Flags--<AccordionGroup>- <Accordion title="--name">- The name of the relay. Must match the name used when creating the relay in the dashboard.- </Accordion>-- <Accordion title="--enroll-method">- The enrollment method to use. Supported values: `token`, `aws`.- </Accordion>-- <Accordion title="--token">- The one-time enrollment token (required when `--enroll-method=token`). Generated from the relay detail page via **Show deploy command**.- </Accordion>-- <Accordion title="--relay-id">- The relay UUID (required when `--enroll-method=aws`). Visible on the relay detail page.- </Accordion>-- <Accordion title="--domain">- Domain of your Infisical instance. Required for self-hosted deployments.- </Accordion>-</AccordionGroup>--</Accordion>--<Accordion title="infisical relay systemd" defaultOpen="false">- Manage systemd service for the Infisical relay on Linux systems.-- ### Requirements- - **Operating System**: Linux only- - **Privileges**: Root/sudo privileges required- - **Systemd**: The system must be running systemd--### Subcommands--<AccordionGroup>-<Accordion title="install">- Install and enable a systemd service for the relay. The relay name is provided as a positional argument, and the installed service is named after it, so you can run multiple relays on the same machine. See the authentication section above for the full install commands.-- ```bash- sudo infisical relay systemd install <name> --enroll-method=token --token=<enrollment-token> --domain=<your-infisical-domain>- ```-- After installation, start and enable the service (replace `<name>` with your relay name):-- ```bash- sudo systemctl start <name>- ```-- To check status and logs:-- ```bash- sudo systemctl status <name>- sudo journalctl -u <name> -f- ```-- ### Service details-- - Service file: `/etc/systemd/system/<name>.service`- - Config directory: `/etc/infisical/relays/`- - Runs with restricted privileges and automatically restarts on failure- - Enabled to start on boot-</Accordion>--<Accordion title="uninstall">- Uninstall and remove a relay's systemd service. The relay name is provided as a positional argument.-- ```bash- sudo infisical relay systemd uninstall <name>- ```-</Accordion>-</AccordionGroup>--</Accordion>-</AccordionGroup>diff --git a/docs/cli/commands/reset.mdx b/docs/cli/commands/reset.mdxdeleted file mode 100644index 36ad9fd23b..0000000000--- a/docs/cli/commands/reset.mdx+++ /dev/null@@ -1,19 +0,0 @@-----title: "infisical reset"-description: "Reset Infisical"------```bash-infisical reset-```--## Description--This command removes all configuration data that Infisical created, and returns the CLI to its default settings. Use it when a problem persists and you want a clean state.--The command removes every profile and its stored credentials. It also revokes those sessions on the server.--<Warning>- Run this only when you want to start again. You must log in after it, and any- terminal that you pinned to a profile will no longer resolve.-</Warning>diff --git a/docs/cli/commands/run.mdx b/docs/cli/commands/run.mdxdeleted file mode 100644index 46a8848600..0000000000--- a/docs/cli/commands/run.mdx+++ /dev/null@@ -1,220 +0,0 @@-----title: "infisical run"-description: "The command that injects your secrets into local environment"------<Tabs>- <Tab title="Single command">- ```bash- infisical run [options] -- [your application start command]-- # Example- infisical run [options] -- npm run dev- ```-- </Tab>-- <Tab title="Chained commands">- ```bash- infisical run [options] --command [string command]-- # Example- infisical run [options] --command "npm run bootstrap && npm run dev start; other-bash-command"- ```-- </Tab>-</Tabs>--## Description--Inject secrets from Infisical into your application process.--## Subcommands & flags--<Accordion title="infisical run" defaultOpen="true">- Use this command to inject secrets into your applications process--```bash-infisical run -- <your application command>--# Example-infisical run -- npm run dev-```--### Environment variables-- <Accordion title="INFISICAL_TOKEN">- Used to fetch secrets via a [machine identity](/documentation/platform/identities/machine-identities) apposed to logged in credentials. Simply, export this variable in the terminal before running this command.-- ```bash- # Example- export INFISICAL_TOKEN=$(infisical login --method=universal-auth --client-id=<identity-client-id> --client-secret=<identity-client-secret> --silent --plain) # --plain flag will output only the token, so it can be fed to an environment variable. --silent will disable any update messages.- ```-- <Info>- Alternatively, you may use service tokens.-- ```bash- # Example- export INFISICAL_TOKEN=<service-token>- ```- </Info>- </Accordion>-- <Accordion title="INFISICAL_DISABLE_UPDATE_CHECK">- Used to disable the check for new CLI versions. This can improve the time it takes to run this command. Recommended for production environments.-- To use, simply export this variable in the terminal before running this command.-- ```bash- # Example- export INFISICAL_DISABLE_UPDATE_CHECK=true- ```- </Accordion>--### Flags-- <Accordion title="--watch">- By passing the `watch` flag, you're telling the CLI to watch for changes that happen in your Infisical project.- If secret changes happen, the command you provided will automatically be restarted with the new environment variables attached.-- ```bash- # Example- infisical run --watch -- printenv- ```- </Accordion>-- <Accordion title="--project-config-dir">- Explicitly set the directory where the .infisical.json resides. This is useful for some monorepo setups.-- ```bash- # Example- infisical run --project-config-dir=/some-dir -- printenv- ```- </Accordion>-- <Accordion title="--command">- Pass secrets into multiple commands at once-- ```bash- # Example- infisical run --command="npm run build && npm run dev; more-commands..."- ```-- </Accordion>-- <Accordion title="--projectId">- The project ID to fetch secrets from. This is required when using a machine identity to authenticate.-- ```bash- # Example- infisical run --projectId=<project-id> -- npm run dev- ```-- </Accordion>-- <Accordion title="--token">- If you're using a [machine identity](/documentation/platform/identities/machine-identities) to authenticate, you can pass the token as a flag-- ```bash- # Example- infisical run --token="<universal-auth-access-token>" --projectId=<project-id> -- npm run start- ```-- You may also expose the token to the CLI by setting the environment variable `INFISICAL_TOKEN` before executing the run command. This will have the same effect as setting the token with `--token` flag-- </Accordion>-- <Accordion title="--expand">- Turn on or off the shell parameter expansion in your secrets. If you have used shell parameters in your secret(s), activating this feature will populate them before injecting them into your application process.-- Default value: `true`-- </Accordion>-- <Accordion title="--include-imports">- By default imported secrets are available, you can disable it by setting this option to false.-- Default value: `true`- </Accordion>--{" "}--<Accordion title="--env">- This is used to specify the environment from which secrets should be- retrieved. The accepted values are the environment slugs defined for your- project, such as `dev`, `staging`, `test`, and `prod`. Default value: `dev`-</Accordion>-- <Accordion title="--secret-overriding">- Prioritizes personal secrets with the same name over shared secrets-- Default value: `true`-- </Accordion>-- <Accordion title="--tags">- When working with tags, you can use this flag to filter and retrieve only secrets that are associated with a specific tag(s).-- ```bash- # Example- infisical run --tags=tag1,tag2,tag3 -- npm run dev- ```-- Note: you must reference the tag by its slug name not its fully qualified name. Go to project settings to view all tag slugs.-- By default, all secrets are fetched-- </Accordion>-- <Accordion title="--path">- The `--path` flag indicates which project folder secrets will be injected from. You can specify multiple `--path` flags to inject secrets from multiple folders at once.-- ```bash- # Example - single path- infisical run --path="/nextjs" -- npm run dev-- # Example - multiple paths- infisical run --path="/common" --path="/nextjs" -- npm run dev- ```-- When using multiple `--path` flags, secrets from all specified folders will be injected into your application process. If the same secret exists in multiple paths, the first path takes precedence.-- </Accordion>-- <Accordion title="--recursive">- By default, `infisical run` only injects the secrets that sit directly in `--path` (the root of the environment, `/`, unless you set it). Secrets inside folders are left out. Add `--recursive` to also inject the secrets in every subfolder of `--path`.-- If your secrets sit in one folder, `--path` alone is enough. Use `--recursive` when that folder has subfolders you also need.-- ```bash- # Example - every secret under /backend and its subfolders- infisical run --path="/backend" --recursive -- npm run dev-- # Example - every secret in the environment, from every folder- infisical run --recursive -- npm run dev- ```-- Since `--recursive` widens what gets injected, scope it with `--path` so your application only receives the secrets it needs.-- Default value: `false`-- </Accordion>--</Accordion>---## Automatically reload command when secrets change--To automatically reload your command when secrets change, use the `--watch` flag.--```bash-infisical run --watch -- npm run dev-```--This will watch for changes in your secrets and automatically restart your command with the new secrets.-When your command restarts, it will have the new environment variables injected into it.--<Note>- Please note that this feature is intended for development purposes. It isn't recommended to use this in production environments. Generally it's not recommended to automatically reload your application in production when remote changes are made.-</Note>\ No newline at end of filediff --git a/docs/cli/commands/scan-git-changes.mdx b/docs/cli/commands/scan-git-changes.mdxdeleted file mode 100644index d2a6c452c7..0000000000--- a/docs/cli/commands/scan-git-changes.mdx+++ /dev/null@@ -1,104 +0,0 @@-----title: "scan git-changes"-description: "Scan for secrets in your uncommitted code"------```bash-infisical scan git-changes--# Display the full secret findings-infisical scan git-changes --verbose-```--## Description-Scanning for secrets before you commit your changes is great way to prevent leaks. Infisical makes this easy with the sub command `git-changes`.--The `git-changes` scans for uncommitted changes in a Git repository, and is especially designed for use on developer machines, aligning with the ['shift left'](https://cloud.google.com/architecture/devops/devops-tech-shifting-left-on-security) security approach.-When `git-changes` is run on a Git repository, Infisical parses the output from a `git diff` command.--To scan changes in commits that have been staged via `git add`, you can add the `--staged` flag to the sub command. This flag is particularly useful when using Infisical CLI as a pre-commit tool.--### Flags-<Accordion title="--staged">- **Description**-- detect secrets in a --staged state-- Default value: `false`-</Accordion>--<Accordion title="--log-opts">- **Description**-- git log options-</Accordion>--<Accordion title="--baseline-path">- Short hand: `-b`-- **Description**-- path to baseline with issues that can be ignored-</Accordion>--<Accordion title="--config">- Short hand: `-c`-- **Description**-- config file path-- order of precedence:- 1. --config flag- 2. env var INFISICAL_SCAN_CONFIG- 3. (--source/-s)/.infisical-scan.toml- If none of the three options are used, then Infisical will use the default config-</Accordion>--<Accordion title="--exit-code">- **Description**-- exit code when leaks have been encountered (default 1)-</Accordion>--<Accordion title="--max-target-megabytes">- **Description**-- files larger than this will be skipped-</Accordion>--<Accordion title="--no-color">- **Description**-- turn off color for verbose output-</Accordion>--<Accordion title="--redact">- **Description**-- redact secrets from logs and stdout-</Accordion>--<Accordion title="--report-format">- **Description**-- output format (json, csv, sarif) (default "json")-</Accordion>--<Accordion title="--report-path">- **Description**-- report file-</Accordion>--<Accordion title="--source">- **Description**-- path to source (default ".")-</Accordion>--<Accordion title="--verbose">- **Description**-- show verbose output from scan-</Accordion>diff --git a/docs/cli/commands/scan-install.mdx b/docs/cli/commands/scan-install.mdxdeleted file mode 100644index 54f3a61c2e..0000000000--- a/docs/cli/commands/scan-install.mdx+++ /dev/null@@ -1,23 +0,0 @@-----title: "scan install"-description: "Add various scanning tools seamlessly into your development lifecycle"------```bash-infisical scan install --pre-commit-hook-```--## Description-The command `infisical scan install` is designed to incorporate various scanning tools seamlessly into your development lifecycle.-Initially, we're offering users the ability to install a pre-commit hook. This hook conducts an automatic scan for any exposed secrets in your commits before they're pushed.--### Flags-<Accordion title="--pre-commit-hook">- ```bash- infisical scan install --pre-commit-hook- ```-- **Description**- Installs a git pre-commit hook that triggers Infisical to scan your staged changes for any exposed secrets prior to pushing.--</Accordion>\ No newline at end of filediff --git a/docs/cli/commands/scan.mdx b/docs/cli/commands/scan.mdxdeleted file mode 100644index 3de69dd58a..0000000000--- a/docs/cli/commands/scan.mdx+++ /dev/null@@ -1,126 +0,0 @@-----title: "scan"-description: "Scan git history, directories, and files for secrets"------```bash-infisical scan--# Display the full secret findings-infisical scan --verbose-```--## Description-The `infisical scan` command serves to scan repositories, directories, and files. It's compatible with both individual developer machines and Continuous Integration (CI) environments.--When you run `infisical scan` on a Git repository, Infisical will parses the output of a `git log -p` command. This command generates [patches](https://stackoverflow.com/questions/8279602/what-is-a-patch-in-git-version-control) that Infisical uses to identify secrets in your code.-You can configure the range of commits that `git log` will cover using the `--log-opts` flag.-Any options you can use with `git log -p` are valid for `--log-opts`.--For instance, to instruct Infisical to scan a specific range of commits, use the following command: `infisical scan --log-opts="--all commitA..commitB"`. For more details, refer to the [Git log documentation](https://git-scm.com/docs/git-log).--To scan individual files and directories, use the `--no-git` flag.--### Flags-<Accordion title="--log-opts">- **Description**-- git log options-</Accordion>--<Accordion title="--no-git">- **Description**-- treat git repo as a regular directory and scan those files, --log-opts has no effect on the scan when --no-git is set-- Default value: `false`-</Accordion>--<Accordion title="--pipe">- Short hand: `-b`-- **Description**-- scan input from stdin, ex: `cat some_file | infisical scan --pipe`-- Default value: `false`-</Accordion>--<Accordion title="--follow-symlinks">- Short hand: `-b`-- **Description**- scan files that are symlinks to other files-- Default value: `false`-</Accordion>--<Accordion title="--baseline-path">- Short hand: `-b`-- **Description**-- path to baseline with issues that can be ignored-</Accordion>--<Accordion title="--config">- Short hand: `-c`-- **Description**-- config file path-- order of precedence:- 1. --config flag- 2. env var INFISICAL_SCAN_CONFIG- 3. (--source/-s)/.infisical-scan.toml- If none of the three options are used, then Infisical will use the default config-</Accordion>--<Accordion title="--exit-code">- **Description**-- exit code when leaks have been encountered (default 1)-</Accordion>--<Accordion title="--max-target-megabytes">- **Description**-- files larger than this will be skipped-</Accordion>--<Accordion title="--no-color">- **Description**-- turn off color for verbose output-</Accordion>--<Accordion title="--redact">- **Description**-- redact secrets from logs and stdout-</Accordion>--<Accordion title="--report-format">- **Description**-- output format (json, csv, sarif) (default "json")-</Accordion>--<Accordion title="--report-path">- **Description**-- report file-</Accordion>--<Accordion title="--source">- **Description**-- path to source (default ".")-</Accordion>--<Accordion title="--verbose">- **Description**-- show verbose output from scan-</Accordion>diff --git a/docs/cli/commands/secrets.mdx b/docs/cli/commands/secrets.mdxdeleted file mode 100644index eaf3e3ebc5..0000000000--- a/docs/cli/commands/secrets.mdx+++ /dev/null@@ -1,395 +0,0 @@-----title: "infisical secrets"-description: "Perform CRUD operations with Infisical secrets"------```-infisical secrets-```--## Description--This command enables you to perform CRUD (create, read, update, delete) operations on secrets within your Infisical project. With it, you can view, create, update, and delete secrets in your environment.--### Sub-commands--<Accordion title="infisical secrets" defaultOpen="true">- Use this command to print out all of the secrets in your project--```bash-infisical secrets-```--### Environment variables-- <Accordion title="INFISICAL_TOKEN">- Used to fetch secrets via a [machine identity](/documentation/platform/identities/machine-identities) apposed to logged in credentials. Simply, export this variable in the terminal before running this command.-- ```bash- # Example- export INFISICAL_TOKEN=$(infisical login --method=universal-auth --client-id=<identity-client-id> --client-secret=<identity-client-secret> --silent --plain) # --plain flag will output only the token, so it can be fed to an environment variable. --silent will disable any update messages.- ```-- <Info>- Alternatively, you may use service tokens.-- ```bash- # Example- export INFISICAL_TOKEN=<service-token>- ```- </Info>-- </Accordion>-- <Accordion title="INFISICAL_DISABLE_UPDATE_CHECK">- Used to disable the check for new CLI versions. This can improve the time it takes to run this command. Recommended for production environments.-- To use, simply export this variable in the terminal before running this command.-- ```bash- # Example- export INFISICAL_DISABLE_UPDATE_CHECK=true- ```-- </Accordion>--### Flags-- <Accordion title="--expand">- Parse shell parameter expansions in your secrets-- Default value: `true`-- </Accordion>-- <Accordion title="--projectId">- The project ID to fetch secrets from. This is required when using a machine identity to authenticate.-- ```bash- # Example- infisical secrets --projectId=<project-id>- ```-- </Accordion>-- <Accordion title="--env">- Used to select the environment name on which actions should be taken on-- Default value: `dev`-- </Accordion>- <Accordion title="--path">- The `--path` flag indicates which project folder secrets will be injected from.-- ```bash- # Example- infisical secrets --path="/" --env=dev- ```-- </Accordion>- <Accordion title="--recursive">- By default, only the secrets sitting directly in `--path` are listed. Add `--recursive` to also list the secrets in every subfolder of `--path`.-- ```bash- # Example- infisical secrets --path="/" --env=dev --recursive- ```-- Default value: `false`-- </Accordion>- <Accordion title="--plain">- The `--plain` flag will output all your secret values without formatting, one per line.-- ```bash- # Example- infisical secrets --plain --silent- ```-- </Accordion>-- <Accordion title="--silent">- The `--silent` flag disables output of tip/info messages. Useful when running in scripts or CI/CD pipelines.-- ```bash- # Example- infisical secrets --silent- ```-- Can be used inline to replace `INFISICAL_DISABLE_UPDATE_CHECK`-- </Accordion>--</Accordion>--<Accordion title="infisical secrets get">- This command allows you selectively print the requested secrets by name--```bash-infisical secrets get <secret-name-a> <secret-name-b> ...--# Example-infisical secrets get DOMAIN-infisical secrets get DOMAIN PORT--```--### Flags-- <Accordion title="--env">- Used to select the environment name on which actions should be taken on-- Default value: `dev`-- </Accordion>-- <Accordion title="--plain">- The `--plain` flag will output all your requested secret values without formatting, one per line.-- Default value: `false`-- ```bash- # Example- infisical secrets get FOO --plain- infisical secrets get FOO BAR --plain-- # Fetch a single value and assign it to a variable- API_KEY=$(infisical secrets get FOO --plain --silent)- ```-- <Tip>- When running in CI/CD environments or in a script, set `INFISICAL_DISABLE_UPDATE_CHECK=true` or add the `--silent` flag. This will help hide any CLI info/debug output and only show the secret value.- </Tip>-- </Accordion>-- <Accordion title="--silent">- The `--silent` flag disables output of tip/info messages. Useful when running in scripts or CI/CD pipelines.-- ```bash- # Example- infisical secrets get FOO --plain --silent- ```-- Can be used inline to replace `INFISICAL_DISABLE_UPDATE_CHECK`-- </Accordion>-- <Accordion title="--raw-value (deprecated)">- Use `--plain` instead, as it supports single and multiple secrets.-- Used to print the plain value of a single requested secret without any table style.-- Default value: `false`-- Example: `infisical secrets get DOMAIN --raw-value`-- <Tip>- When running in CI/CD environments or in a script, set `INFISICAL_DISABLE_UPDATE_CHECK=true` or add the `--silent` flag. This will help hide any CLI info/debug output and only show the secret value.- </Tip>-- </Accordion>--</Accordion>--<Accordion title="infisical secrets set">-This command allows you to set or update secrets in your environment. If the secret key provided already exists, its value will be updated with the new value.-If the secret key doesn't exist, a new secret will be created using both the key and value provided.--```bash-infisical secrets set <key1=value1> <key2=value2> <key3=@/path/to/file>...--## Example-infisical secrets set STRIPE_API_KEY=sjdgwkeudyjwe DOMAIN=example.com HASH=jebhfbwe [email protected]-```-- <Tip>- When setting secret values:- - Use `secretName=@path/to/file` to load the secret value from a file- - Use `secretName=\@value` if you need the literal '@' character at the beginning of your value-- Example:-- ```bash- # Set a secret with the value loaded from a certificate file- secrets set CERTIFICATE=@/path/to/certificate.pem-- # Set a secret with the literal value "@example.com"- secrets set email="\@example.com"- ```- </Tip>--### Flags-- <Accordion title="--env">- Used to select the environment name on which actions should be taken on-- Default value: `dev`-- </Accordion>- <Accordion title="--path">- Used to select the project folder in which the secrets will be set. This is useful when creating new secrets under a particular path.-- ```bash- # Example- infisical secrets set DOMAIN=example.com --path="common/backend"- ```-- </Accordion>-- <Accordion title="--type">- Used to select the type of secret to create. This could be either personal or shared (defaults to shared)-- ```bash- # Example- infisical secrets set DOMAIN=example.com --type=personal- ```-- </Accordion>- <Accordion title="--tag">- Used to attach tags to the secret. If a tag doesn't exist on the server, it will be created automatically. **This flag overrides any existing tags on the secret**. If not provided, existing tags are kept intact. You can specify multiple `--tag` flags to add multiple tags.-- ```bash- # Example- infisical secrets set DOMAIN=example.com --tag=backend --tag=production- ```-- </Accordion>- <Accordion title="--file">- Used to set secrets from a file, supporting both `.env` and `YAML` formats. The file path can be either absolute or relative to the current working directory.-- The file should contain secrets in the following formats:- - `key=value` for `.env` files- - `key: value` for YAML files-- Comments can be written using `# comment` or `// comment`. Empty lines will be ignored during processing.--- ```bash- # Example- infisical secrets set --file="./.env"- ```- </Accordion>-</Accordion>--<Accordion title="infisical secrets delete">- This command allows you to delete secrets by their name(s).--```bash-infisical secrets delete <keyName1> <keyName2>...--## Example-infisical secrets delete STRIPE_API_KEY DOMAIN HASH-```--### Flags-- <Accordion title="--env">- Used to select the environment name on which actions should be taken on-- Default value: `dev`-- </Accordion>- <Accordion title="--path">- The `--path` flag indicates which project folder secrets will be injected from.-- ```bash- # Example- infisical secrets delete <keyName1> <keyName2>... --path="/"- ```-- </Accordion>-</Accordion>--<Accordion title="infisical secrets folders">- This command allows you to fetch, create and delete folders from within a path from a given project.--```bash-infisical secrets folders-```--### sub commands-- <Accordion title="get">- Used to fetch all folders within a path in a given project- ```- infisical secrets folders get --path=/some/path/to/folder- ```- #### Flags- <Accordion title="--path">- The path from where folders should be fetched from-- Default value: `/`- </Accordion>-- <Accordion title="--token">- Fetch folders using a [machine identity](/documentation/platform/identities/machine-identities) access token.-- Default value: ``- </Accordion>-- </Accordion>-- <Accordion title="create">- Used to create a folder by name within a path.- ```- infisical secrets folders create --path=/some/path/to/folder --name=folder-name- ```- ### Flags- <Accordion title="--path">- Path to where the folder should be created-- Default value: `/`- </Accordion>-- <Accordion title="--name">- Name of the folder to be created in selected `--path`-- Default value: ``- </Accordion>-- </Accordion>-- <Accordion title="delete">- Used to delete a folder by name within a path.- ```- infisical secrets folders delete --path=/some/path/to/folder --name=folder-name- ```- ### Flags- <Accordion title="--path">- Path to where the folder should be created-- Default value: `/`- </Accordion>-- <Accordion title="--name">- Name of the folder to be deleted within selected `--path`-- Default value: ``- </Accordion>-- </Accordion>-</Accordion>--<Accordion title="infisical secrets generate-example-env">-This command allows you to generate an example .env file from your secrets and with their associated comments and tags. This is useful when you would like to let- others who work on the project but do not use Infisical become aware of the required environment variables and their intended values.--To place default values in your example .env file, you can simply include the syntax `DEFAULT:<value>` within your secret's comment in Infisical. This will result in the specified value being extracted and utilized as the default.--```bash-infisical secrets generate-example-env--## Example-infisical secrets generate-example-env > .example-env-```--### Flags-- <Accordion title="--env">- Used to select the environment name on which actions should be taken on-- Default value: `dev`-- </Accordion>-</Accordion>diff --git a/docs/cli/commands/service-token.mdx b/docs/cli/commands/service-token.mdxdeleted file mode 100644index f096826019..0000000000--- a/docs/cli/commands/service-token.mdx+++ /dev/null@@ -1,96 +0,0 @@-----title: "infisical service-token"-description: "Manage Infisical service tokens"------<Warning>- This command is deprecated and will be removed in the near future. Please- switch to using [Machine- Identities](/documentation/platform/identities/machine-identities) for- authenticating with Infisical.-</Warning>--```bash-infisical service-token create --scope=dev:/global --scope=dev:/backend --access-level=read --access-level=write-```--## Description--The Infisical `service-token` command allows you to manage service tokens for a given Infisical project.-With this command, you can create, view, and delete service tokens.--<Accordion title="service-token create" defaultOpen="true">- Use this command to create a service token--```bash-infisical service-token create --scope=dev:/backend/** --access-level=read --access-level=write-```--### Flags-- <Accordion title="--scope">- ```bash- infisical service-token create --scope=dev:/global --scope=dev:/backend/** --access-level=read- ```-- Use the scope flag to define which environments and paths your service token should be authorized to access.-- The value of your scope flag should be in the following `<environment slug>:<path>`.- Here, `environment slug` refers to the slug name of the environment, and `path` indicates the folder path where your secrets are stored.-- For specifying multiple scopes, you can use multiple --scope flags.-- <Info>- The `path` can be a Glob pattern- </Info>-- </Accordion>-- <Accordion title="--projectId">- ```bash- infisical service-token create --scope=dev:/global --access-level=read --projectId=63cefb15c8d3175601cfa989- ```-- The project ID you'd like to create the service token for.- By default, the CLI will attempt to use the linked Infisical project in `.infisical.json` generated by `infisical init` command.-- </Accordion>- <Accordion title="--name">- ```bash- infisical service-token create --scope=dev:/global --access-level=read --name service-token-name- ```-- Service token name-- Default: `Service token generated via CLI`-- </Accordion>- <Accordion title="--expiry-seconds">- ```bash- infisical service-token create --scope=dev:/global --access-level=read --expiry-seconds 120- ```-- Set the service token's expiration time in seconds from now. To never expire set to zero.-- Default: `1 day`-- </Accordion>- <Accordion title="--access-level">- ```bash- infisical service-token create --scope=dev:/global --access-level=read --access-level=write- ```-- The type of access the service token should have. Can be `read` and or `write`-- </Accordion>- <Accordion title="--token-only">- ```bash- infisical service-token create --scope=dev:/global --access-level=read --access-level=write --token-only- ```-- When true, only the service token will be printed-- Default: `false`-- </Accordion>-</Accordion>diff --git a/docs/cli/commands/token.mdx b/docs/cli/commands/token.mdxdeleted file mode 100644index 4bb212d730..0000000000--- a/docs/cli/commands/token.mdx+++ /dev/null@@ -1,21 +0,0 @@-----title: "infisical token"-description: "Manage your Infisical identity access tokens"------```bash-infisical token renew <ua-access-token>-```--## Description-The Infisical `token` command allows you to manage your universal auth access tokens.-With this command, you can renew your access tokens. In the future more subcommands will be added to better help you manage your tokens through the CLI.--<Accordion title="token renew <access-token>" defaultOpen="true">- Use this command to renew your access token. This command will renew your access token and output a renewed access token to the console.-- ```bash- infisical token renew <ua-access-token>- ```--</Accordion>diff --git a/docs/cli/commands/user.mdx b/docs/cli/commands/user.mdxdeleted file mode 100644index d77320ec77..0000000000--- a/docs/cli/commands/user.mdx+++ /dev/null@@ -1,85 +0,0 @@-----title: "infisical user"-description: "Manage logged in users"------```bash-infisical user-```--## Description--This command manages the accounts that are logged in to the CLI.--Each login is stored as a profile: an account on the specified Infisical instance, and the organization you chose for it. See [profile](./profile) to create profiles, to select one per terminal or per directory, and to work in several organizations at the same time.--### Sub-commands--<Accordion title="infisical user switch" defaultOpen="true">- Pick which profile the CLI uses by default on this machine.--```bash-infisical user switch-```--<Tip>- `infisical profile use <name>` does the same thing without a prompt.- `infisical profile list` shows the available profile names.-</Tip>--</Accordion>--<Accordion title="infisical user update domain">- Change the Infisical instance that a profile points to. Use this to move a profile between Infisical Cloud and your own self-hosted instance.--```bash-infisical user update domain-```--<Warning>- The command clears the stored session of that profile. Run- `infisical login --profile <name>` to sign in to the new instance.-</Warning>--</Accordion>--<Accordion title="infisical user get token">- Use this command to get your current Infisical access token and session information. This command requires you to be logged in.--The command will display:--- Your session ID-- Your full JWT access token--```bash-infisical user get token-```--Example output:--```bash-Session ID: abc123-xyz-456-Token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...-```--### Flags-- <Accordion title="--plain">- Output only the JWT token without formatting (no session ID)-- Default value: `false`-- ```bash- # Example- infisical user get token --plain- ```-- Example output:-- ```bash- eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...- ```-- </Accordion>--</Accordion>diff --git a/docs/cli/commands/vault.mdx b/docs/cli/commands/vault.mdxdeleted file mode 100644index 807a06573e..0000000000--- a/docs/cli/commands/vault.mdx+++ /dev/null@@ -1,39 +0,0 @@-----title: "infisical vault"-description: "Change the vault type in Infisical"------<Tabs>- <Tab title="View current Vault">- ```bash- infisical vault-- # Example output- Vaults are used to securely store your login details locally. Available vaults:- - auto (automatically select native vault on system)- - file (encrypted file vault)-- You are currently using [file] vault to store your login credentials- ```- </Tab>-- <Tab title="Switch vault">- ```bash- infisical vault set <name-of-vault>-- # Example- infisical vault set keychain- ```- </Tab>-</Tabs>---## Description--To safeguard your login details when using the CLI, Infisical attempts to store them in a system keyring. If a system keyring can't be found on your machine, the data is stored in a config file.--<Warning>- Changing the vault removes your profiles and their stored credentials. The new- vault starts empty, so run `infisical login` after the change.-</Warning>-diff --git a/docs/cli/faq.mdx b/docs/cli/faq.mdxindex 7a41d43dd1..e20d6cbdf8 100644--- a/docs/cli/faq.mdx+++ b/docs/cli/faq.mdx@@ -1,27 +1,70 @@---title: "FAQ"-description: "Frequently Asked Questions about Infisical CLI"+description: "Frequently Asked Questions about the Infisical CLI."---Frequently asked questions about the CLI can be found on this page.-If you can't find the answer you're looking for, please create an issue on our GitHub repository or join our Slack channel for additional support.+If you can't find the answer you're looking for, please create an issue on the [CLI's GitHub repository](https://github.com/Infisical/cli/issues) or ask in the [Infisical community](https://community.infisical.com/) for additional support.-<Accordion title="I'm getting a Keyring related error message when trying to login" defaultOpen="true">+<AccordionGroup>++<Accordion title="I'm getting a Keyring-related error message when trying to login">By default, the CLI will choose the most suitable store available on your system.If you experience issues with the default store, you can switch to a different one.If none of the available stores work for you, you can try using the `file` store type by running `infisical vault set file`, which should work in most cases.If you're still experiencing trouble, please seek support.-[Learn more about vault command](./commands/vault)+[Learn more about the vault command](/cli/reference#vault)++</Accordion>++<Accordion title="How do I keep secret values out of my shell history?">+Your shell saves the commands you run to a history file, so a secret value you pass to `infisical secrets set` stays in that file. To avoid this, pass the values with `--file` or `name=@path`, or configure your shell to skip those commands.++<Tabs>+ <Tab title="Bash">+ Add the pattern to `HISTIGNORE` in `~/.bashrc`:++ ```bash+ echo 'export HISTIGNORE="*infisical secrets set*:$HISTIGNORE"' >> ~/.bashrc && source ~/.bashrc+ ```+ </Tab>+ <Tab title="Zsh">+ Add the pattern to `HISTORY_IGNORE` in `~/.zshrc`:++ ```bash+ echo "HISTORY_IGNORE='(*infisical secrets set*)'" >> ~/.zshrc && source ~/.zshrc+ ```++ Zsh applies `HISTORY_IGNORE` when it writes the history file, so the command still appears when you press the up arrow in the current session.+ </Tab>+ <Tab title="Windows">+ If you use WSL, follow the Bash or Zsh steps.++ In PowerShell, the PSReadLine module saves your command history. To check its version, run `(Get-Module PSReadLine).Version`.++ PSReadLine 2.2 and later, which ships with PowerShell 7.2 and later, doesn't save commands that contain words such as `secret`, `token`, or `password`, so `infisical secrets set` is already skipped.++ Older versions, including the one that ships with Windows PowerShell 5.1, save every command. Add this line to your [PowerShell profile](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_profiles) to skip `infisical secrets set`:++ ```powershell+ Set-PSReadLineOption -AddToHistoryHandler { param($line) $line -notlike '*infisical secrets set*' }+ ```++ Don't add this line on PSReadLine 2.2 or later, because a custom handler replaces the built-in one that skips commands with sensitive words.++ Command Prompt keeps history only until you close the window.+ </Tab>+</Tabs></Accordion>-<Accordion title="Can I fetch secrets with Infisical if I am offline?">+<Accordion title="Can I fetch secrets with Infisical while I'm offline?">Yes. If you have previously retrieved secrets for a specific project and environment (such as dev, staging, or prod), the `run`/`secret` command will utilize the saved secrets, even when offline, on subsequent fetch attempts.</Accordion>-<Accordion title="Can I upload the .infisical.json file that was generated?">+<Accordion title="Can I upload the `.infisical.json` file that was generated?">Yes. This is simply a configuration file and contains no sensitive data.</Accordion>@@ -57,4 +100,6 @@ Yes. This is simply a configuration file and contains no sensitive data.```bashexport INFISICAL_CUSTOM_HEADERS="Header1=value1 Header2=value2 Header3=value3"```-</Accordion>\ No newline at end of file+</Accordion>++</AccordionGroup>diff --git a/docs/cli/install.mdx b/docs/cli/install.mdxnew file mode 100644index 0000000000..d492bc0575--- /dev/null+++ b/docs/cli/install.mdx@@ -0,0 +1,34 @@+---+title: "Install the CLI"+sidebarTitle: "Install"+description: "Install the Infisical CLI with the package manager for your operating system."+---++import InstallCli from "/snippets/cli/install-cli.mdx";++<Warning>+ If you installed the CLI on Linux from the Cloudsmith package repository, move to `artifacts-cli.infisical.com`. Cloudsmith stopped serving the CLI on September 16, 2026, so machines still pointed at it can't install or upgrade the CLI. See [Migrate off Cloudsmith](/cli/cloudsmith-migration).+</Warning>++Install the CLI with the package manager for your operating system:++<InstallCli />++Check that the installation worked:++```bash+infisical --version+```++If you install the CLI in production, such as on a server or in a container image, pin a specific version so every reinstall gets the same one. The [CLI releases](https://github.com/Infisical/cli/releases) list every version.++## Next steps++<CardGroup cols={2}>+ <Card title="Quickstart" icon="rocket" href="/cli/usage">+ Log in and check that the CLI can reach your Infisical instance.+ </Card>+ <Card title="Upgrade" icon="refresh-cw" href="/cli/upgrade">+ Upgrade the CLI to the latest version.+ </Card>+</CardGroup>diff --git a/docs/cli/overview.mdx b/docs/cli/overview.mdxindex ca63740197..d550c2f995 100644--- a/docs/cli/overview.mdx+++ b/docs/cli/overview.mdx@@ -1,50 +1,43 @@----title: 'Install'-description: "Infisical's CLI is one of the best ways to manage environments and secrets. Install it here"+title: "Infisical CLI"sidebarTitle: "CLI"+description: "Install and set up the Infisical CLI."icon: "terminal"----import InstallCli from "/snippets/cli/install-cli.mdx";+The Infisical CLI allows you to interact with the Infisical platform from your terminal.<Warning>- **Action required for Linux users.** The Infisical CLI Linux package repository moved from Cloudsmith to `artifacts-cli.infisical.com`. The Cloudsmith repository stopped serving on **September 16, 2026**. Machines still pointed at the old URL will fail to install or update. See the [migration guide](/cli/cloudsmith-migration) for step-by-step instructions.+ If you installed the CLI on Linux from the Cloudsmith package repository, [move to `artifacts-cli.infisical.com`](/cli/cloudsmith-migration). Cloudsmith stopped serving the CLI on September 16, 2026, so machines still pointed at it can't install or upgrade the CLI.</Warning>-The Infisical CLI is a powerful command line tool that can be used to retrieve, modify, export and inject secrets into any process or application as environment variables.-You can use it across various environments, whether it's local development, CI/CD, staging, or production.--## Installation--Install the CLI with the package manager for your operating system.--<InstallCli />--<Tip>- When you install the CLI in a production environment, pin it to a specific version so that the version stays the same across reinstalls. [View versions](https://github.com/Infisical/cli/releases)-</Tip>--## Update the CLI--<CodeGroup>--```bash macOS-brew update && brew upgrade infisical-```--```bash Windows (Scoop)-scoop update infisical-```--```bash npm-npm update -g @infisical/cli-```+## Get started++Install the CLI, log in, and connect it to a project:++<CardGroup cols={2}>+ <Card title="Install" icon="download" href="/cli/install">+ Install the CLI on macOS, Windows, or Linux+ </Card>+ <Card title="Quickstart" icon="rocket" href="/cli/usage">+ Log in and find the CLI guide for each product+ </Card>+ <Card title="Upgrade" icon="refresh-cw" href="/cli/upgrade">+ Upgrade the CLI to the latest version+ </Card>+ <Card title="Project configuration" icon="file-cog" href="/cli/project-config">+ Link a directory to an Infisical project with `.infisical.json`+ </Card>+</CardGroup>++<Card title="FAQ" icon="circle-question-mark" href="/cli/faq">+ Answers to common problems, such as keyring errors+</Card>-</CodeGroup>+## Command reference-On Linux, update the CLI with the package manager you installed it with.+Look up a command's arguments, flags, and examples:-## Quick usage guide-<Card color="#00A300" href="./usage">- Now that you have the CLI installed on your system, follow this guide to make the best use of it+<Card title="Command reference" icon="square-terminal" href="/cli/reference">+ Every CLI command and the global flags they share</Card>diff --git a/docs/cli/project-config.mdx b/docs/cli/project-config.mdxindex eadbb7af54..081aa7d6f5 100644--- a/docs/cli/project-config.mdx+++ b/docs/cli/project-config.mdx@@ -1,69 +1,138 @@----title: "Project config file"-description: "Project config file & customization options"+title: "Project configuration"+description: "Configure how the Infisical CLI interacts with your directory."----To link your local project on your machine with an Infisical project, we suggest using the infisical init CLI command. This will generate a `.infisical.json` file in the root directory of your project.+`.infisical.json` links a directory to an [Infisical project](/documentation/platform/project). When you run a command such as [`infisical run`](/cli/reference#run) or [`infisical secrets`](/cli/reference#secrets) in that directory, the CLI reads the project from the file, so you don't have to pass [`--projectId`](/cli/reference#run--flag-projectid).-The `.infisical.json` file specifies various parameters, such as the Infisical project to retrieve secrets from, along with other configuration options. Furthermore, you can define additional properties in the file to further tailor your local development experience.+The file can also [choose an environment for you](#set-the-environment) and [pin the Infisical instance](#set-the-infisical-instance) the project lives on.-## Set default environment-If you need to change environments while using the CLI, you can do so by including the `--env` flag in your command.-However, this can be inconvenient if you typically work in just one environment.-To simplify the process, you can establish a default environment, which will be used for every command unless you specify otherwise.+<Info>+The `.infisical.json` file doesn't include any sensitive values and is safe to commit to version control.+</Info>++## Create the file++In the root of your codebase, run:++```bash+infisical init+```++Select the project when prompted. The CLI writes `.infisical.json` to the current directory:```json .infisical.json{- "workspaceId": "63ee5410a45f7a1ed39ba118",- "defaultEnvironment": "test",- "gitBranchToEnvironmentMapping": null+ "workspaceId": "<project-id>",+ "defaultEnvironment": "",+ "gitBranchToEnvironmentMapping": null}```-### How it works-If both `defaultEnvironment` and `gitBranchToEnvironmentMapping` are configured, `gitBranchToEnvironmentMapping` will take precedence over `defaultEnvironment`.-However, if `gitBranchToEnvironmentMapping` isn't set and `defaultEnvironment` is, then the `defaultEnvironment` will be used to execute your Infisical CLI commands.-If you wish to override the `defaultEnvironment`, you can do so by using the `--env` flag explicitly.+`workspaceId` is the project's ID. The other fields are empty until you set them, as described in the sections that follow. If you run [`infisical init`](/cli/reference#init) again, the CLI replaces the file with a new one that holds only the project ID, so you lose any settings you added.++<Note>+ If you authenticate as a [machine identity](/documentation/platform/identities/machine-identities), `infisical run`, [`infisical export`](/cli/reference#export), and `infisical secrets` don't read `workspaceId`. Pass the project with `--projectId` or the `INFISICAL_PROJECT_ID` environment variable instead.+</Note>++## Set the environment++Without an environment setting, commands read secrets from your project's [`dev` environment](/documentation/platform/secrets-mgmt/project#project-environments) unless you pass [`--env`](/cli/reference#run--flag-env). To use a different environment by default, set `defaultEnvironment` to the environment's slug:-## Set Infisical environment based on GitHub branch-When fetching your secrets from Infisical, you can switch between environments by using the `--env` flag. However, in certain cases, you may prefer the environment to be automatically mapped based on the current GitHub branch you're working on.-To achieve this, simply add the `gitBranchToEnvironmentMapping` property to your configuration file, as shown below.+```json .infisical.json+{+ "workspaceId": "<project-id>",+ "defaultEnvironment": "staging"+}+```++To pick the environment from the Git branch you're on, map branch names to environment slugs in `gitBranchToEnvironmentMapping`:```json .infisical.json{- "workspaceId": "63ee5410a45f7a1ed39ba118",- "gitBranchToEnvironmentMapping": {- "branchName": "dev",- "anotherBranchName": "staging"- }+ "workspaceId": "<project-id>",+ "defaultEnvironment": "dev",+ "gitBranchToEnvironmentMapping": {+ "main": "prod",+ "staging": "staging"+ }}```-### How it works-After configuring this property, every time you use the CLI with the specified configuration file, it will automatically verify if there is a corresponding environment mapping for the current GitHub branch you're on.-If it exists, the CLI will use that environment to retrieve secrets. You can override this behavior by explicitly using the `--env` flag while interacting with the CLI.+The CLI matches only the last part of a branch name, after the final `/`. For example, the branch `release/staging` matches the key `staging`. If your current branch has no mapping, or you aren't on a branch (such as when you check out a specific commit), the CLI falls back to `defaultEnvironment`.++The CLI picks the environment in this order:++1. The `--env` flag+2. The environment mapped to your current Git branch+3. `defaultEnvironment`+4. `dev`++## Set the Infisical instance-## Set the Infisical instance domain-If you connect to EU Cloud or a self-hosted instance, you can pin the instance URL to your project by adding a `domain` field. Every CLI command run from the project then targets that instance without needing the `--domain` flag or an environment variable.+If your project is on EU Cloud, a dedicated instance, or a self-hosted instance, set `domain` to the instance's address:```json .infisical.json{- "workspaceId": "63ee5410a45f7a1ed39ba118",- "defaultEnvironment": "dev",- "domain": "https://eu.infisical.com"+ "workspaceId": "<project-id>",+ "domain": "https://eu.infisical.com"}```-### How it works-The CLI resolves the domain in the following order, from highest to lowest precedence:+`domain` must be a URL that starts with `https://` or `http://`, or the CLI ignores it and prints a warning.-1. The `--domain` flag-2. The `INFISICAL_DOMAIN` environment variable (the legacy `INFISICAL_API_URL` is still honored; when both are set, `INFISICAL_DOMAIN` wins)-3. The `domain` field in `.infisical.json`-4. The default (US Cloud, `https://app.infisical.com`)+<Note>+We recommend using `https://`, since over `http://`, the CLI sends secrets and credentials unencrypted.+</Note>-The value must start with `http://` or `https://`, otherwise it's ignored. Always prefer `https://`. An `http://` domain sends your secrets and credentials over the network in plaintext, so only use it for isolated, private-network setups.+The CLI picks the instance in this order:++1. The [`--domain`](/cli/reference#global-flags--flag-domain) flag+2. The `INFISICAL_DOMAIN` environment variable, or the older `INFISICAL_API_URL` if `INFISICAL_DOMAIN` isn't set+3. `domain` in `.infisical.json`+4. US Cloud (`https://app.infisical.com`)++If you log in with your own account, [`infisical login`](/cli/reference#login) uses `domain` to choose the instance to log in to. After that:++- Any commands you run will connect to the instance you logged in to, even if `domain` specifies a different one+- If you pass `--domain` or set `INFISICAL_DOMAIN` to a different instance than the one you logged in to, the command fails<Warning>- Because `.infisical.json` is usually committed to your repository, the CLI prints a warning naming the host whenever the domain is read from the file, since all requests and credentials are sent there. Only set `domain` to an instance you trust, and review it when cloning a project you don't control.+ The CLI sends every request and credential to the instance in `domain`. Because `.infisical.json` is usually committed, anyone who can change the file in your repository can change where the CLI sends them. Each time the CLI uses `domain` from the file, it prints a warning that names the host. Only set `domain` to an instance you trust, and check it when you clone a repository you don't control.</Warning>++## Use the file from another directory++The CLI looks for `.infisical.json` in the current directory, then in each parent directory up to the root of the file system. This means that if you have an `.infisical.json` file in the root of your codebase, that configuration applies to every directory under it.++To read the project from a file somewhere else, such as one package's directory in a monorepo, pass the directory to `infisical run` with [`--project-config-dir`](/cli/reference#run--flag-project-config-dir):++```bash+infisical run --project-config-dir ./services/api -- npm run dev+```++<Note>+`--project-config-dir` only sets the project. The environment and instance settings still come from the `.infisical.json` the CLI finds from your current directory.+</Note>++## Field reference++<ResponseField name="workspaceId" type="string">+The ID of the project to read secrets from. Not used when you authenticate as a machine identity.+</ResponseField>++<ResponseField name="defaultEnvironment" type="string">+The environment slug to use when `--env` isn't passed and no branch mapping matches.+</ResponseField>++<ResponseField name="gitBranchToEnvironmentMapping" type="object">+Maps branch names to environment slugs, such as `{ "main": "prod" }`. Keys match only the last part of a branch name, after the final `/`.+</ResponseField>++<ResponseField name="defaultSecretPath" type="string">+The folder to read secrets from when [`--path`](/cli/reference#secrets-agent-proxy-run--flag-path) and `INFISICAL_SECRET_PATH` aren't set. Only the [`infisical secrets agent-proxy`](/cli/reference#secrets-agent-proxy) commands read it.+</ResponseField>++<ResponseField name="domain" type="string">+The Infisical instance to connect to, such as `https://eu.infisical.com`. Must start with `https://` or `http://`.+</ResponseField>diff --git a/docs/cli/reference.mdx b/docs/cli/reference.mdxnew file mode 100644index 0000000000..2118e2e775--- /dev/null+++ b/docs/cli/reference.mdx@@ -0,0 +1,1924 @@+---+title: "CLI reference"+hidden: true+description: "Every Infisical CLI command, with its flags and examples."+mode: "frame"+---++import { CLIPage, CLICommand } from "/snippets/CLIPage.jsx";++<CLIPage+ title="CLI reference"+ description="Every Infisical CLI command, with its arguments, flags, and examples. Select a command or flag in a heading to jump to its details."+>++<CLICommand+ id="global-flags"+ command="global flags"+ heading="Global flags"+ flags={[+ { name: "--domain", value: "<string>", type: "string", default: "https://app.infisical.com", description: "The Infisical instance to connect to, such as `https://eu.infisical.com` for EU Cloud or your self-hosted URL. Check out [Set the Infisical instance](/cli/project-config#set-the-infisical-instance) for more information." },+ { name: "--log-destination", value: "<string>", type: "string", description: "Where to write logs: `stderr` or `stdout`. Defaults to `stderr`. Can also be set with `LOG_DESTINATION`." },+ { name: "--log-format", value: "<string>", type: "string", description: "How to format logs: `console` for colored text, `plain` for text without color, or `json` for structured logs. Defaults to `console`. Set `NO_COLOR=1` to drop the colors from `console`. Can also be set with `LOG_FORMAT`." },+ { name: "--log-level", short: "-l", value: "<string>", type: "string", description: "The lowest level of log message to print: `trace`, `debug`, `info`, `warn`, `error`, or `fatal`. Defaults to `info`. Can also be set with `LOG_LEVEL`." },+ { name: "--org", value: "<string>", type: "string", description: "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 with `INFISICAL_ORG`." },+ { name: "--profile", value: "<string>", type: "string", description: "The login profile to use for this command. Run `infisical profile list` to see your profiles. Can also be set with `INFISICAL_PROFILE`." },+ { name: "--silent", type: "bool", description: "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." },+ { name: "--telemetry", type: "bool", default: "true", description: "Send usage telemetry to Infisical." },+ ]}+>++Every command accepts these flags.++</CLICommand>++<CLICommand+ id="agent"+ command="agent"+ usage="[flags]"+ flags={[+ { name: "--config", value: "<string>", type: "string", default: "agent-config.yaml", description: "The path to the agent's YAML configuration file. Ignored when `INFISICAL_AGENT_CONFIG_BASE64` is set." },+ ]}+ examples={[+ { title: "Start the agent with the default config file", code: "infisical agent" },+ { title: "Start the agent with a config file elsewhere", code: "infisical agent --config=/etc/infisical/agent-config.yaml" },+ { title: "Pass the configuration as an environment variable", code: "export INFISICAL_AGENT_CONFIG_BASE64=$(base64 < agent-config.yaml)\ninfisical agent" },+ ]}+>++Run the [Infisical Agent](/integrations/platforms/infisical-agent), a daemon that authenticates as a machine identity and renders secrets into files for your application to read.++Everything is set in the YAML configuration file, including the auth method, sinks, templates, and the Infisical instance in `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](/cli/reference#cert-manager-agent).++</CLICommand>++<CLICommand+ id="agent-vault"+ command="agent-vault"+>++Run [Agent Vault](/documentation/platform/agent-vault/overview), which lets AI agents call services such as LLM providers, GitHub, and Slack without holding the credentials. A proxy adds the real credential to each request the agent sends. Run the proxy with [infisical agent-vault proxy](/cli/reference#agent-vault-proxy), usually where agent traffic leaves your network, and launch agents through it with [infisical agent-vault run](/cli/reference#agent-vault-run).++`av` is an alias, so `infisical av run` works wherever `infisical agent-vault run` does. Agent Vault is a different product from the agent proxy that [infisical secrets agent-proxy](/cli/reference#secrets-agent-proxy) runs.++</CLICommand>++<CLICommand+ id="agent-vault-proxy"+ command="agent-vault proxy"+ usage="[flags]"+ flags={[+ { name: "--data-dir", value: "<string>", type: "string", description: "The directory that holds the proxy's certificate authority, access token, and last settings. It must persist across restarts. Defaults to `~/.infisical/agent-vault`, or `/etc/infisical/agent-vault` when run as root. Can also be set with `INFISICAL_AGENT_VAULT_DATA_DIR`." },+ { name: "--enrollment-token", value: "<string>", type: "string", description: "The one-time token shown when the proxy was created in Infisical. Needed on the first run and to re-enroll. Can also be set with `INFISICAL_AGENT_VAULT_ENROLLMENT_TOKEN`, which keeps it off the command line." },+ { name: "--log-file", value: "<string>", type: "string", description: "A file to also write logs to, as JSON lines. The file is appended to." },+ { name: "--log-format", value: "<string>", type: "string", default: "console", description: "The format of the logs written to stderr: `console` or `json`." },+ { name: "--port", value: "<int>", type: "int", default: "17323", description: "The port to listen on, on all interfaces. `0` picks any free port, which the startup line reports." },+ ]}+ examples={[+ { title: "Enroll a new proxy", code: "infisical agent-vault proxy --enrollment-token=<enrollment-token>" },+ { title: "Start an enrolled proxy", code: "infisical agent-vault proxy" },+ { title: "Log JSON to a file on a custom port", code: "infisical agent-vault proxy --port=18000 --log-format=json --log-file=/var/log/infisical/agent-vault.log" },+ ]}+>++Run an Agent Vault [proxy](/documentation/platform/agent-vault/proxies) in the foreground. For each request, the proxy decides whether the agent's session allows the host and attaches the real credential on the way out, so the agent never holds a secret.++Enroll once with `--enrollment-token`. The proxy saves its certificate authority and access token to `--data-dir`, so later starts need no token. Passing the same token again resumes the existing enrollment. A different token enrolls the proxy again and replaces its certificate authority, so agents that trusted the old one stop trusting the proxy.++You set the proxy's traffic policy, exceptions, and poll interval in Infisical, not with flags.++</CLICommand>++<CLICommand+ id="agent-vault-run"+ command="agent-vault run"+ usage="[flags] -- <command>"+ args={[+ { name: "command", usage: "<command>", required: true, description: "The agent's command, after `--`. Everything after `--` is passed to it unchanged." },+ ]}+ flags={[+ { name: "--access-bundle", value: "<stringArray>", type: "stringArray", description: "The access bundle to create a session with, by name, such as `coding-agent`. A session holds one access bundle, so pass the flag only once. Can't be combined with `--session-token`." },+ { name: "--ca-file", value: "<string>", type: "string", description: "Where to write the certificate authority fetched from the proxy. This is an output path, not a certificate to trust. Defaults to `ca-<proxy-id>.pem` in `~/.infisical/agent-vault`, or `/etc/infisical/agent-vault` when run as root, one file per proxy." },+ { name: "--ca-fingerprint", value: "<string>", type: "string", description: "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 the `SHA256:` prefix and colons." },+ { name: "--client-id", value: "<string>", type: "string", description: "The client ID of the machine identity that creates the session, for `--access-bundle`. Can also be set with `INFISICAL_UNIVERSAL_AUTH_CLIENT_ID`." },+ { name: "--client-secret", value: "<string>", type: "string", description: "The client secret of the machine identity that creates the session, for `--access-bundle`. Can also be set with `INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET`." },+ { name: "--keep-session", type: "bool", description: "Leave a session created with `--access-bundle` active when the agent exits, instead of revoking it. Can't be combined with `--session-token`." },+ { name: "--no-ca-trust", type: "bool", description: "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-fingerprint` is still checked." },+ { name: "--no-proxy", value: "<string>", type: "string", description: "More hosts for the agent to reach directly instead of through the proxy, separated by commas. Always merged with `localhost,127.0.0.1` and any `NO_PROXY` in your environment." },+ { name: "--proxy", value: "<string>", type: "string", required: true, description: "The Agent Vault proxy's address as `host:port`, such as `10.0.1.5:17323`. A leading `http://` or `https://` is dropped. Can also be set with `INFISICAL_AGENT_VAULT_PROXY_ADDRESS`." },+ { name: "--session-token", value: "<string>", type: "string", description: "A session token created in Infisical. The command never revokes this session. Can't be combined with `--access-bundle`." },+ { name: "--ttl", value: "<string>", type: "string", default: "7d", description: "How long a session created with `--access-bundle` lasts: one number and one unit, such as `30m`, `8h`, or `7d` (not `2h30m`), or `never`. Can't be combined with `--session-token`." },+ ]}+ examples={[+ { title: "Run an agent with a session token", code: "infisical agent-vault run --session-token=<session-token> --proxy=10.0.1.5:17323 -- claude" },+ { title: "Create a session from an access bundle", code: "infisical agent-vault run --access-bundle=code-review --ttl=8h --proxy=10.0.1.5:17323 -- claude" },+ { title: "Pin the proxy's certificate authority", code: "infisical agent-vault run --session-token=<session-token> --proxy=10.0.1.5:17323 --ca-fingerprint=SHA256:9F:2C:... -- claude" },+ { title: "Create the session as a machine identity", code: "infisical agent-vault run \\\n --access-bundle=code-review \\\n --client-id=<client-id> \\\n --client-secret=<client-secret> \\\n --proxy=10.0.1.5:17323 \\\n -- claude" },+ ]}+>++Launch an agent with its HTTP traffic routed through an Agent Vault proxy. The agent needs a [session](/documentation/platform/agent-vault/sessions), and you pass exactly one of `--session-token` or `--access-bundle`.++With `--session-token`, the agent uses a session created in Infisical, and no login is needed. With `--access-bundle`, the command creates a session with that [access bundle](/documentation/platform/agent-vault/access-bundles). The command authenticates with `--client-id` and `--client-secret`, then `INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN` or `INFISICAL_TOKEN`, then your login.++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. [Certificate trust](/documentation/platform/agent-vault/proxies#certificate-trust) lists those variables and explains the macOS keychain prompt.++The agent inherits the rest of your environment unchanged, and the command exits with the agent's exit code. Unlike [infisical secrets agent-proxy run](/cli/reference#secrets-agent-proxy-run), this command doesn't sandbox the agent.++</CLICommand>++<CLICommand+ id="bootstrap"+ command="bootstrap"+ usage="[flags]"+ flags={[+ { name: "--domain", value: "<string>", type: "string", required: true, description: "The URL of the Infisical instance to bootstrap. Can also be set with `INFISICAL_DOMAIN`, or the older `INFISICAL_API_URL`." },+ { name: "--email", value: "<string>", type: "string", required: true, description: "The email address of the admin user to create. Can also be set with `INFISICAL_ADMIN_EMAIL`." },+ { name: "--ignore-if-bootstrapped", type: "bool", description: "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." },+ { name: "--k8-secret-name", value: "<string>", type: "string", description: "The name of the Kubernetes secret to create or update. Required with `--output=k8-secret`." },+ { name: "--k8-secret-namespace", value: "<string>", type: "string", description: "The namespace of the Kubernetes secret. Required with `--output=k8-secret`." },+ { name: "--k8-secret-template", value: "<string>", type: "string", default: "{\"data\":{\"token\":\"{{.Identity.Credentials.Token}}\"}}", description: "A Go template that renders the secret's `data` and `stringData` as JSON, for `--output=k8-secret`. It can read the response fields, such as `.Identity.Credentials.Token`, `.Organization.ID`, and `.User.Email`, and use the `encodeBase64` function." },+ { name: "--organization", value: "<string>", type: "string", required: true, description: "The name of the organization to create. Can also be set with `INFISICAL_ADMIN_ORGANIZATION`." },+ { name: "--output", value: "<string>", type: "string", description: "Where to send the result. `k8-secret` writes it to a Kubernetes secret. Any other value, or none, prints it as JSON." },+ { name: "--password", value: "<string>", type: "string", required: true, description: "The password of the admin user to create. Can also be set with `INFISICAL_ADMIN_PASSWORD`." },+ ]}+ examples={[+ { title: "Bootstrap an instance", code: "infisical bootstrap \\\n --domain=https://infisical.example.com \\\n [email protected] \\\n --password=<password> \\\n --organization=<organization>" },+ { title: "Capture the admin token", code: "TOKEN=$(infisical bootstrap --domain=https://infisical.example.com [email protected] --password=<password> --organization=<organization> | jq -r \".identity.credentials.token\")" },+ { title: "Store the token in a Kubernetes secret", code: "infisical bootstrap \\\n --domain=https://infisical.example.com \\\n [email protected] \\\n --password=<password> \\\n --organization=<organization> \\\n --output=k8-secret \\\n --k8-secret-name=infisical-bootstrap \\\n --k8-secret-namespace=default \\\n --ignore-if-bootstrapped" },+ ]}+>++Set up a new self-hosted Infisical instance without the web UI, for [automated deployments](/self-hosting/guides/automated-bootstrapping). The command creates an admin user, an organization, and an instance admin machine identity, and prints the result as JSON, including the machine identity's access token. Bootstrapping works only once per instance.++The machine identity has the highest privileges on the instance. Treat its token as a root credential.++With `--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.++</CLICommand>++<CLICommand+ id="cert-manager"+ command="cert-manager"+>++Manage certificates with the Infisical Agent. [infisical cert-manager agent](/cli/reference#cert-manager-agent) runs the agent in certificate management mode.++</CLICommand>++<CLICommand+ id="cert-manager-agent"+ command="cert-manager agent"+ usage="[flags]"+ flags={[+ { name: "--config", value: "<string>", type: "string", default: "certificate-agent-config.yaml", description: "The path to the agent's YAML configuration file. Ignored when `INFISICAL_AGENT_CONFIG_BASE64` is set." },+ { name: "--verbose", short: "-v", type: "bool", description: "Log at debug level, for troubleshooting." },+ ]}+ examples={[+ { title: "Start the certificate agent", code: "infisical cert-manager agent --config=/etc/infisical/agent-config.yaml" },+ { title: "Start it with debug logging", code: "infisical cert-manager agent --config=/etc/infisical/agent-config.yaml --verbose" },+ ]}+>++Run the Infisical Agent in [certificate management mode](/documentation/platform/pki/reference/infisical-agent). The agent authenticates as a machine identity, requests the certificates in its configuration, writes them to disk, and renews them before they expire. It runs until it gets `SIGINT`, `SIGTERM`, or `SIGQUIT`.++The configuration can't include secret templates. To render secrets as well, use [infisical agent](/cli/reference#agent). To pass the configuration without a file, set `INFISICAL_AGENT_CONFIG_BASE64` to the base64-encoded YAML.++</CLICommand>++<CLICommand+ id="dynamic-secrets"+ command="dynamic-secrets"+ usage="[flags]"+ flags={[+ { name: "--env", value: "<string>", type: "string", default: "dev", description: "The environment to work in. Every `infisical dynamic-secrets` subcommand accepts it. Defaults to the [environment set in `.infisical.json`](/cli/project-config#set-the-environment), then `dev`." },+ { name: "--output", short: "-o", value: "<string>", type: "string", description: "Print the dynamic secrets as `json`, `yaml`, or `dotenv` instead of a table." },+ { name: "--path", value: "<string>", type: "string", default: "/", description: "The folder to list dynamic secrets from." },+ { name: "--project-slug", value: "<string>", type: "string", description: "The slug of the project to list dynamic secrets from. Takes precedence over `--projectId`." },+ { name: "--projectId", value: "<string>", type: "string", description: "The ID of the project to list dynamic secrets from. Without it or `--project-slug`, the CLI uses the project in `.infisical.json`. Can also be set with `INFISICAL_PROJECT_ID`." },+ { name: "--token", value: "<string>", type: "string", description: "A machine identity access token to authenticate with, instead of your login. Without it, the CLI reads `INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN`, then `INFISICAL_TOKEN`." },+ ]}+ examples={[+ { title: "List dynamic secrets in dev", code: "infisical dynamic-secrets" },+ { title: "List dynamic secrets in a production folder", code: "infisical dynamic-secrets --env=prod --path=/databases" },+ { title: "Print dynamic secrets as JSON", code: "infisical dynamic-secrets --projectId=<project-id> --output=json" },+ ]}+>++List the [dynamic secrets](/documentation/platform/dynamic-secrets/overview) in an environment and folder, with each one's provider, default TTL, and max TTL. A dynamic secret generates credentials on demand, such as a database user, and each set of credentials it generates is a lease. Manage leases with [infisical dynamic-secrets lease](/cli/reference#dynamic-secrets-lease).++</CLICommand>++<CLICommand+ id="dynamic-secrets-lease"+ command="dynamic-secrets lease"+ inheritedFlags={[+ { name: "--env", value: "<string>", type: "string", default: "dev", description: "The environment that holds the dynamic secret." },+ ]}+>++Create, list, renew, and delete the leases of a dynamic secret.++</CLICommand>++<CLICommand+ id="dynamic-secrets-lease-create"+ command="dynamic-secrets lease create"+ usage="<name> [flags]"+ args={[+ { name: "name", usage: "<name>", required: true, description: "The name of the dynamic secret to lease." },+ ]}+ flags={[+ { name: "--kubernetes-namespace", value: "<string>", type: "string", description: "The namespace to create the lease in. Used only by Kubernetes dynamic secrets." },+ { name: "--output", short: "-o", value: "<string>", type: "string", description: "Print only the credentials, as `json`, `yaml`, or `dotenv`, instead of the lease details and a table." },+ { name: "--path", short: "-p", value: "<string>", type: "string", default: "/", description: "The folder that holds the dynamic secret." },+ { name: "--plain", type: "bool", description: "Print each credential as `KEY=value`, one per line, with no other output. Ignored when you pass `--output`." },+ { name: "--principals", value: "<string>", type: "string", description: "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." },+ { name: "--project-slug", value: "<string>", type: "string", description: "The slug of the project that holds the dynamic secret. Takes precedence over `--projectId`." },+ { name: "--projectId", value: "<string>", type: "string", description: "The ID of the project that holds the dynamic secret. Without it or `--project-slug`, the CLI uses the project in `.infisical.json`. Can also be set with `INFISICAL_PROJECT_ID`." },+ { name: "--token", value: "<string>", type: "string", description: "A machine identity access token to authenticate with, instead of your login. Without it, the CLI reads `INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN`, then `INFISICAL_TOKEN`." },+ { name: "--ttl", value: "<string>", type: "string", description: "How long the lease lasts, such as `30m` or `1h`. Defaults to the dynamic secret's default TTL, and can't exceed its max TTL." },+ ]}+ inheritedFlags={[+ { name: "--env", value: "<string>", type: "string", default: "dev", description: "The environment that holds the dynamic secret." },+ ]}+ examples={[+ { title: "Lease database credentials for an hour", code: "infisical dynamic-secrets lease create postgres-app --env=prod --ttl=1h" },+ { title: "Lease credentials as JSON", code: "infisical dynamic-secrets lease create postgres-app --output=json" },+ { title: "Lease an SSH certificate", code: "infisical dynamic-secrets lease create ssh-prod \\\n --projectId=<project-id> \\\n --env=prod \\\n --principals=root,deploy" },+ ]}+>++Generate a new set of credentials from a dynamic secret. The command prints the lease ID, when the lease expires, and the credentials. Keep the lease ID to renew or delete the lease later, or find it with [infisical dynamic-secrets lease list](/cli/reference#dynamic-secrets-lease-list).++The table and `--plain` show only credentials whose values are strings. Pass `--output` to get every credential the provider returns.++</CLICommand>++<CLICommand+ id="dynamic-secrets-lease-delete"+ command="dynamic-secrets lease delete"+ usage="<lease-id> [flags]"+ args={[+ { name: "lease-id", usage: "<lease-id>", required: true, description: "The ID of the lease to delete." },+ ]}+ flags={[+ { name: "--output", short: "-o", value: "<string>", type: "string", description: "Print the deleted lease as `json`, `yaml`, or `dotenv` instead of a table." },+ { name: "--path", short: "-p", value: "<string>", type: "string", default: "/", description: "The folder that holds the lease's dynamic secret." },+ { name: "--project-slug", value: "<string>", type: "string", description: "The slug of the project that holds the lease. Takes precedence over `--projectId`." },+ { name: "--projectId", value: "<string>", type: "string", description: "The ID of the project that holds the lease. Without it or `--project-slug`, the CLI uses the project in `.infisical.json`. Can also be set with `INFISICAL_PROJECT_ID`." },+ { name: "--token", value: "<string>", type: "string", description: "A machine identity access token to authenticate with, instead of your login. Without it, the CLI reads `INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN`, then `INFISICAL_TOKEN`." },+ ]}+ inheritedFlags={[+ { name: "--env", value: "<string>", type: "string", default: "dev", description: "The environment that holds the lease's dynamic secret." },+ ]}+ examples={[+ { title: "Delete a lease", code: "infisical dynamic-secrets lease delete <lease-id> --env=prod" },+ ]}+>++Delete a lease before it expires, and revoke its credentials with the provider. `--env` and `--path` must point to the folder that holds the lease's dynamic secret, or Infisical reports that the lease doesn't exist.++</CLICommand>++<CLICommand+ id="dynamic-secrets-lease-list"+ command="dynamic-secrets lease list"+ usage="<name> [flags]"+ args={[+ { name: "name", usage: "<name>", required: true, description: "The name of the dynamic secret to list leases for." },+ ]}+ flags={[+ { name: "--output", short: "-o", value: "<string>", type: "string", description: "Print the leases as `json`, `yaml`, or `dotenv` instead of a table." },+ { name: "--path", short: "-p", value: "<string>", type: "string", default: "/", description: "The folder that holds the dynamic secret." },+ { name: "--project-slug", value: "<string>", type: "string", description: "The slug of the project that holds the dynamic secret. Takes precedence over `--projectId`." },+ { name: "--projectId", value: "<string>", type: "string", description: "The ID of the project that holds the dynamic secret. Without it or `--project-slug`, the CLI uses the project in `.infisical.json`. Can also be set with `INFISICAL_PROJECT_ID`." },+ { name: "--token", value: "<string>", type: "string", description: "A machine identity access token to authenticate with, instead of your login. Without it, the CLI reads `INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN`, then `INFISICAL_TOKEN`." },+ ]}+ inheritedFlags={[+ { name: "--env", value: "<string>", type: "string", default: "dev", description: "The environment that holds the dynamic secret." },+ ]}+ examples={[+ { title: "List a dynamic secret's leases", code: "infisical dynamic-secrets lease list postgres-app --env=prod" },+ ]}+>++List the active leases of a dynamic secret, with each lease's ID, expiry time, and creation time.++</CLICommand>++<CLICommand+ id="dynamic-secrets-lease-renew"+ command="dynamic-secrets lease renew"+ usage="<lease-id> [flags]"+ args={[+ { name: "lease-id", usage: "<lease-id>", required: true, description: "The ID of the lease to renew." },+ ]}+ flags={[+ { name: "--output", short: "-o", value: "<string>", type: "string", description: "Print the renewed lease as `json`, `yaml`, or `dotenv` instead of a table." },+ { name: "--path", short: "-p", value: "<string>", type: "string", default: "/", description: "The folder that holds the lease's dynamic secret." },+ { name: "--project-slug", value: "<string>", type: "string", description: "The slug of the project that holds the lease. Takes precedence over `--projectId`." },+ { name: "--projectId", value: "<string>", type: "string", description: "The ID of the project that holds the lease. Without it or `--project-slug`, the CLI uses the project in `.infisical.json`. Can also be set with `INFISICAL_PROJECT_ID`." },+ { name: "--token", value: "<string>", type: "string", description: "A machine identity access token to authenticate with, instead of your login. Without it, the CLI reads `INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN`, then `INFISICAL_TOKEN`." },+ { name: "--ttl", value: "<string>", type: "string", description: "How long to extend the lease by, from its current expiry, such as `30m` or `1h`. Defaults to the dynamic secret's default TTL." },+ ]}+ inheritedFlags={[+ { name: "--env", value: "<string>", type: "string", default: "dev", description: "The environment that holds the lease's dynamic secret." },+ ]}+ examples={[+ { title: "Extend a lease by 30 minutes", code: "infisical dynamic-secrets lease renew <lease-id> --env=prod --ttl=30m" },+ ]}+>++Extend a lease before it expires, and print its new expiry time. A renewal can't push the lease past the dynamic secret's max TTL, counted from when the lease was created. `--env` and `--path` must point to the folder that holds the lease's dynamic secret, or Infisical reports that the lease doesn't exist.++</CLICommand>++<CLICommand+ id="export"+ command="export"+ usage="[flags]"+ flags={[+ { name: "--env", short: "-e", value: "<string>", type: "string", default: "dev", description: "The environment to export secrets from, such as `dev`, `staging`, or `prod`. Defaults to the [environment set in `.infisical.json`](/cli/project-config#set-the-environment), then `dev`." },+ { name: "--expand", type: "bool", default: "true", description: "Resolve secret references and shell parameter expansions in secret values. Pass `--expand=false` to export values exactly as stored. It takes effect only when you authenticate with a token; with your login, the CLI always resolves them." },+ { name: "--format", short: "-f", value: "<string>", type: "string", default: "dotenv", description: "The output format: `dotenv`, `dotenv-export`, `dotenv-eval`, `csv`, `json`, or `yaml`." },+ { name: "--include-imports", type: "bool", default: "true", description: "Include secrets imported into the environment from other environments or folders." },+ { name: "--output-file", short: "-o", value: "<string>", type: "string", description: "A file or directory to write to, instead of standard output. In a directory, the CLI writes `.env`, `secrets.json`, `secrets.csv`, or `secrets.yaml`, depending on the format. A file name without an extension gets the format's extension, and missing parent directories are created." },+ { name: "--path", value: "<string>", type: "string", default: "/", description: "The folder to export secrets from." },+ { name: "--projectId", value: "<string>", type: "string", description: "The project to export secrets from. Required when you authenticate with a machine identity. Can also be set with `INFISICAL_PROJECT_ID`." },+ { name: "--secret-overriding", type: "bool", default: "true", description: "Export your personal secrets in place of shared secrets with the same name. Pass `--secret-overriding=false` to export only shared secrets." },+ { name: "--tags", short: "-t", value: "<string>", type: "string", description: "Only export secrets with these tag slugs, separated by commas." },+ { name: "--template", value: "<string>", type: "string", description: "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 other `export` flag except `--token` is ignored." },+ { name: "--token", value: "<string>", type: "string", description: "A machine identity access token to authenticate with, instead of your login. Without it, the CLI reads `INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN`, then `INFISICAL_TOKEN`." },+ ]}+ examples={[+ { title: "Write a .env file", code: "infisical export --output-file=./.env" },+ { title: "Export production secrets as JSON", code: "infisical export --env=prod --format=json > secrets.json" },+ { title: "Load secrets into the current shell", code: "eval \"$(infisical export --format=dotenv-eval)\"" },+ { title: "Render secrets through a template", code: "infisical export --template=./secrets.tmpl" },+ ]}+>++Print an environment's secrets in a file format such as `.env` or JSON, for tools that read configuration from a file. Output goes to standard output unless you pass `--output-file`.++`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](/integrations/platforms/infisical-agent#available-secret-template-functions) provides, such as `listSecrets` and `getSecretByName`.++</CLICommand>++<CLICommand+ id="gateway"+ command="gateway"+>++Run an Infisical [gateway](/documentation/platform/gateways/overview), which lets Infisical reach resources in a private network, such as a database in a private subnet. A gateway either connects out to a relay, so it needs no inbound firewall rules, or listens for Infisical to connect to it directly. Run it in the foreground with [infisical gateway start](/cli/reference#gateway-start), or as a systemd service with [infisical gateway systemd install](/cli/reference#gateway-systemd-install).++</CLICommand>++<CLICommand+ id="gateway-start"+ command="gateway start"+ usage="<name> [flags]"+ args={[+ { name: "name", usage: "<name>", required: true, description: "The gateway's name. Use the same name on every start so the gateway reuses its saved credentials. Can also be set with `INFISICAL_GATEWAY_NAME`." },+ ]}+ flags={[+ { name: "--auth-method", value: "<string>", type: "string", description: "Log in as a machine identity with this method instead of enrolling: `universal-auth`, `kubernetes`, `azure`, `gcp-id-token`, `gcp-iam`, `aws-iam`, or `oidc-auth`. Can also be set with `INFISICAL_AUTH_METHOD`." },+ { name: "--bind", value: "<string>", type: "string", description: "The local `host:port` to listen on when Infisical connects to the gateway directly. Defaults to all interfaces on the configured direct port. Can also be set with `INFISICAL_GATEWAY_BIND_ADDRESS`." },+ { name: "--client-id", value: "<string>", type: "string", description: "The machine identity's client ID, for `--auth-method=universal-auth`. Can also be set with `INFISICAL_UNIVERSAL_AUTH_CLIENT_ID`." },+ { name: "--client-secret", value: "<string>", type: "string", description: "The machine identity's client secret, for `--auth-method=universal-auth`. Can also be set with `INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET`." },+ { name: "--domain", value: "<string>", type: "string", description: "The Infisical instance to connect to. Without it, the gateway uses the domain it saved when it enrolled, then your active profile's domain." },+ { name: "--enroll-method", value: "<string>", type: "string", description: "How the gateway authenticates on its own: `token` for a one-time enrollment token from Infisical, `aws`, `gcp`, or `kubernetes`. Can also be set with `INFISICAL_GATEWAY_ENROLL_METHOD`." },+ { name: "--gateway-id", value: "<string>", type: "string", description: "The gateway's ID from Infisical. Required with `--enroll-method=aws`, `gcp`, or `kubernetes`, unless the gateway saved it on an earlier start. Can also be set with `INFISICAL_GATEWAY_ID`." },+ { name: "--gcp-auth-type", value: "<string>", type: "string", description: "How the gateway proves its GCP identity with `--enroll-method=gcp`: `gce` reads a token from the instance metadata server, covering Compute Engine VMs and GKE workload identity, and `iam` signs a JWT through the IAM Credentials API. Defaults to `gce`. Can also be set with `INFISICAL_GATEWAY_GCP_AUTH_TYPE`." },+ { name: "--jwt", value: "<string>", type: "string", description: "The JWT to exchange for an access token, for `--auth-method=oidc-auth`." },+ { name: "--listen-address", value: "<string>", type: "string", description: "The stable `host:port` the gateway advertises so Infisical can connect to it directly instead of through a relay. Can also be set with `INFISICAL_GATEWAY_LISTEN_ADDRESS`." },+ { name: "--machine-identity-id", value: "<string>", type: "string", description: "The machine identity's ID, for every `--auth-method` except `universal-auth`." },+ { name: "--name", value: "<string>", type: "string", deprecated: true, description: "Deprecated: pass the name as an argument instead, as in `infisical gateway start <name>`." },+ { name: "--organization-slug", value: "<string>", type: "string", description: "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." },+ { name: "--pam-session-recording-path", value: "<string>", type: "string", description: "The directory to store PAM session recordings in. Defaults to `/var/lib/infisical/session_recordings`. Can also be set with `INFISICAL_PAM_SESSION_RECORDING_PATH`." },+ { name: "--pkcs11-module", value: "<string>", type: "string", description: "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 with `INFISICAL_PKCS11_MODULE`." },+ { name: "--relay", value: "<string>", type: "string", deprecated: true, description: "Deprecated: use `--target-relay-name` instead." },+ { name: "--service-account-key-file-path", value: "<string>", type: "string", description: "The path to a GCP service account key file, for `--auth-method=gcp-iam`. Can also be set with `INFISICAL_GCP_IAM_SERVICE_ACCOUNT_KEY_FILE_PATH`." },+ { name: "--service-account-token-path", value: "<string>", type: "string", description: "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 with `INFISICAL_KUBERNETES_SERVICE_ACCOUNT_TOKEN_PATH`." },+ { name: "--target-relay-name", value: "<string>", type: "string", description: "The relay to connect through. Without it, the gateway picks the healthy relay with the lowest latency." },+ { name: "--token", value: "<string>", type: "string", description: "With `--enroll-method=token`, the one-time enrollment token. Otherwise, a machine identity access token to connect with, which can also be set with `INFISICAL_TOKEN`." },+ ]}+ examples={[+ { title: "Enroll and start a gateway", code: "infisical gateway start my-gateway --enroll-method=token --token=<enrollment-token>" },+ { title: "Start an enrolled gateway again", code: "infisical gateway start my-gateway" },+ { title: "Start a gateway on AWS", code: "infisical gateway start my-gateway --enroll-method=aws --gateway-id=<gateway-id>" },+ { title: "Start a gateway in Kubernetes", code: "infisical gateway start my-gateway --enroll-method=kubernetes --gateway-id=<gateway-id>" },+ ]}+>++Start a gateway in the foreground. A gateway authenticates in one of two ways.++With `--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](/cli/reference#login).++</CLICommand>++<CLICommand+ id="gateway-systemd"+ command="gateway systemd"+>++Install or remove a systemd service that runs a gateway. Both commands run only on Linux, as root.++</CLICommand>++<CLICommand+ id="gateway-systemd-install"+ command="gateway systemd install"+ usage="<name> [flags]"+ args={[+ { name: "name", usage: "<name>", required: true, description: "The gateway's name. The service is named after it." },+ ]}+ flags={[+ { name: "--bind", value: "<string>", type: "string", description: "The local `host:port` to listen on when Infisical connects to the gateway directly. Defaults to all interfaces on the configured direct port." },+ { name: "--domain", value: "<string>", type: "string", description: "The Infisical instance to connect to." },+ { name: "--enroll-method", value: "<string>", type: "string", description: "How the gateway authenticates: `token` for a one-time enrollment token, or `aws` or `gcp` to prove its cloud identity each time the service starts. `kubernetes` isn't available, because in-cluster gateways aren't managed by systemd." },+ { name: "--gateway-id", value: "<string>", type: "string", description: "The gateway's ID from Infisical. Required with `--enroll-method=aws` or `--enroll-method=gcp`." },+ { name: "--gcp-auth-type", value: "<string>", type: "string", description: "How the gateway proves its GCP identity with `--enroll-method=gcp`: `gce` or `iam`. Defaults to `gce`." },+ { name: "--listen-address", value: "<string>", type: "string", description: "The stable `host:port` the gateway advertises so Infisical can connect to it directly instead of through a relay." },+ { name: "--log-file", value: "<string>", type: "string", description: "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: "--name", value: "<string>", type: "string", deprecated: true, description: "Deprecated: pass the name as an argument instead, as in `infisical gateway systemd install <name>`." },+ { name: "--pkcs11-module", value: "<string>", type: "string", description: "The absolute path to a PKCS#11 driver. The service starts the gateway with the driver loaded for HSM operations." },+ { name: "--relay", value: "<string>", type: "string", deprecated: true, description: "Deprecated: use `--target-relay-name` instead." },+ { name: "--service-account-key-file-path", value: "<string>", type: "string", description: "The path to a GCP service account key file, for `--gcp-auth-type=iam`. Use an absolute path outside `/home` and `/tmp`, such as one in `/etc/infisical`, because the service can't read those directories." },+ { name: "--target-relay-name", value: "<string>", type: "string", description: "The relay to connect through. Without it, the gateway picks the healthy relay with the lowest latency." },+ { name: "--token", value: "<string>", type: "string", description: "With `--enroll-method=token`, the one-time enrollment token. Otherwise, a machine identity access token." },+ ]}+ examples={[+ { title: "Install a gateway service", code: "sudo infisical gateway systemd install my-gateway --enroll-method=token --token=<enrollment-token> --domain=https://app.infisical.com" },+ { title: "Start the installed service", code: "sudo systemctl start my-gateway" },+ ]}+>++Install and enable a systemd service that runs the gateway. The service is named after the gateway, and its configuration is written to `/etc/infisical/gateways/<name>.conf`. Start it with `sudo systemctl start <name>`. Run the command as root on Linux.++</CLICommand>++<CLICommand+ id="gateway-systemd-uninstall"+ command="gateway systemd uninstall"+ usage="[name]"+ args={[+ { name: "name", usage: "[name]", description: "The gateway whose service to remove. Without it, the command removes the single `infisical-gateway` service that older CLI versions installed." },+ ]}+ examples={[+ { title: "Remove a gateway service", code: "sudo infisical gateway systemd uninstall my-gateway" },+ ]}+>++Stop and remove a gateway's systemd service. Run the command as root on Linux.++</CLICommand>++<CLICommand+ id="init"+ command="init"+ examples={[+ { title: "Link the current directory to a project", code: "infisical init" },+ { title: "Link a project using another profile", code: "infisical init --profile=<profile>" },+ ]}+>++Link the current directory to an Infisical project. The command lists the projects in your profile's organization and writes the one you choose to `.infisical.json`, 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 `.infisical.json` already exists in the current directory, the command asks before replacing it. The new file holds only the project ID, so settings you added, such as `defaultEnvironment`, are lost. See [project config](/cli/project-config) for the file format.++`--org` only accepts the organization of the profile you're using. To link a project in a different organization, switch to a profile for that organization, or change your profile's organization with [infisical profile set-org](/cli/reference#profile-set-org).++</CLICommand>++<CLICommand+ id="kmip"+ command="kmip"+>++Run a [KMIP](/documentation/platform/kms/kmip) server, which lets clients that use the Key Management Interoperability Protocol (KMIP) use Infisical as their key manager. Run it in the foreground with [infisical kmip start](/cli/reference#kmip-start), or as a systemd service with [infisical kmip systemd install](/cli/reference#kmip-systemd-install).++</CLICommand>++<CLICommand+ id="kmip-start"+ command="kmip start"+ usage="<server-name> [flags]"+ args={[+ { name: "server-name", usage: "<server-name>", required: true, description: "The KMIP server's name. Can also be passed with `--server-name` or `INFISICAL_KMIP_SERVER_NAME`." },+ ]}+ flags={[+ { name: "--certificate-ttl", value: "<string>", type: "string", description: "How long the server's certificate is valid. Defaults to `1y`. Can also be set with `INFISICAL_KMIP_CERTIFICATE_TTL`." },+ { name: "--domain", value: "<string>", type: "string", description: "The Infisical instance to connect to." },+ { name: "--enroll-method", value: "<string>", type: "string", description: "How the server authenticates on its own: `token` for a one-time enrollment token, or `aws`. When set, the machine identity flags are ignored." },+ { name: "--hostnames-or-ips", value: "<string>", type: "string", description: "The hostnames or IP addresses clients use to reach the server, separated by commas. They go into its certificate. Can also be set with `INFISICAL_KMIP_HOSTNAMES_OR_IPS`." },+ { name: "--identity-auth-method", value: "<string>", type: "string", default: "universal-auth", description: "How to log in as a machine identity when you don't use `--enroll-method`." },+ { name: "--identity-client-id", value: "<string>", type: "string", description: "The machine identity's client ID. Can also be set with `INFISICAL_UNIVERSAL_AUTH_CLIENT_ID`." },+ { name: "--identity-client-secret", value: "<string>", type: "string", description: "The machine identity's client secret. Can also be set with `INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET`." },+ { name: "--kmip-server-id", value: "<string>", type: "string", description: "The KMIP server's ID from Infisical, for `--enroll-method=aws`." },+ { name: "--listen-address", value: "<string>", type: "string", description: "The address to listen on. Defaults to `localhost:5696`. Can also be set with `INFISICAL_KMIP_LISTEN_ADDRESS`." },+ { name: "--server-name", value: "<string>", type: "string", description: "The server's name, if you don't pass it as an argument." },+ { name: "--token", value: "<string>", type: "string", description: "The one-time enrollment token, for `--enroll-method=token`." },+ ]}+ examples={[+ { title: "Enroll and start a KMIP server", code: "infisical kmip start kmip-prod --enroll-method=token --token=<enrollment-token>" },+ { title: "Start as a machine identity", code: "infisical kmip start kmip-prod --identity-client-id=<client-id> --identity-client-secret=<client-secret> --hostnames-or-ips=kmip.example.com" },+ ]}+>++Start a KMIP server in the foreground. It authenticates to Infisical either by enrolling with `--enroll-method`, or as a machine identity with `--identity-client-id` and `--identity-client-secret`.++</CLICommand>++<CLICommand+ id="kmip-systemd"+ command="kmip systemd"+>++Install or remove a systemd service that runs a KMIP server. Both commands run only on Linux, as root.++</CLICommand>++<CLICommand+ id="kmip-systemd-install"+ command="kmip systemd install"+ usage="<server-name> [flags]"+ args={[+ { name: "server-name", usage: "<server-name>", required: true, description: "The KMIP server's name. Can also be passed with `--server-name`." },+ ]}+ flags={[+ { name: "--certificate-ttl", value: "<string>", type: "string", description: "How long the server's certificate is valid." },+ { name: "--domain", value: "<string>", type: "string", description: "The Infisical instance to connect to." },+ { name: "--enroll-method", value: "<string>", type: "string", description: "How the server authenticates on its own: `token` or `aws`. When set, the machine identity flags are ignored." },+ { name: "--hostnames-or-ips", value: "<string>", type: "string", description: "The hostnames or IP addresses clients use to reach the server, separated by commas." },+ { name: "--identity-client-id", value: "<string>", type: "string", description: "The machine identity's client ID, when you don't use `--enroll-method`." },+ { name: "--identity-client-secret", value: "<string>", type: "string", description: "The machine identity's client secret, when you don't use `--enroll-method`." },+ { name: "--kmip-server-id", value: "<string>", type: "string", description: "The KMIP server's ID from Infisical, for `--enroll-method=aws`." },+ { name: "--listen-address", value: "<string>", type: "string", description: "The address to listen on." },+ { name: "--server-name", value: "<string>", type: "string", description: "The server's name, if you don't pass it as an argument." },+ { name: "--token", value: "<string>", type: "string", description: "The one-time enrollment token, for `--enroll-method=token`." },+ ]}+ examples={[+ { title: "Install a KMIP server service", code: "sudo infisical kmip systemd install kmip-prod --enroll-method=token --token=<enrollment-token> --domain=https://app.infisical.com" },+ ]}+>++Install and enable a systemd service that runs the KMIP server. Run the command as root on Linux.++</CLICommand>++<CLICommand+ id="kmip-systemd-uninstall"+ command="kmip systemd uninstall"+ examples={[+ { title: "Remove the KMIP server service", code: "sudo infisical kmip systemd uninstall" },+ ]}+>++Stop and remove the KMIP server's systemd service. Run the command as root on Linux.++</CLICommand>++<CLICommand+ id="login"+ command="login"+ usage="[flags]"+ flags={[+ { name: "--clear-domains", type: "bool", description: "Remove all saved self-hosted domains from the CLI's config file, then exit without logging in." },+ { name: "--client-id", value: "<string>", type: "string", description: "The client ID of a machine identity, for `--method=universal-auth`. Can also be set with `INFISICAL_UNIVERSAL_AUTH_CLIENT_ID`." },+ { name: "--client-secret", value: "<string>", type: "string", description: "The client secret of a machine identity, for `--method=universal-auth`. Can also be set with `INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET`." },+ { name: "--email", value: "<string>", type: "string", description: "Your email address, for logging in without prompts along with `--password` and `--organization-id`. Can also be set with `INFISICAL_EMAIL`." },+ { name: "--interactive", short: "-i", type: "bool", description: "Prompt for your email and password in the terminal instead of opening a browser." },+ { name: "--jwt", value: "<string>", type: "string", description: "The JWT to exchange for an access token, for `--method=oidc-auth` and `--method=jwt-auth`. Can also be set with `INFISICAL_JWT`." },+ { name: "--machine-identity-id", value: "<string>", type: "string", description: "The ID of the machine identity to log in as. Required for every `--method` except `user` and `universal-auth`. Can also be set with `INFISICAL_MACHINE_IDENTITY_ID`." },+ { name: "--method", value: "<string>", type: "string", default: "user", description: "How to authenticate: `user` for your own account, or a machine identity method: `universal-auth`, `kubernetes`, `azure`, `gcp-id-token`, `gcp-iam`, `aws-iam`, `oidc-auth`, or `jwt-auth`." },+ { name: "--oidc-jwt", value: "<string>", type: "string", deprecated: true, description: "Deprecated: use `--jwt` instead. The JWT for `--method=oidc-auth`." },+ { name: "--organization-id", value: "<string>", type: "string", description: "The organization to log in to, for logging in without prompts. Not needed with `--profile`, which already has one. Can also be set with `INFISICAL_ORGANIZATION_ID`." },+ { name: "--organization-slug", value: "<string>", type: "string", description: "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." },+ { name: "--password", value: "<string>", type: "string", description: "Your password, for logging in without prompts. Can also be set with `INFISICAL_PASSWORD`." },+ { name: "--plain", type: "bool", description: "Print only the access token, with no other output. Combine with `--silent` to capture the token in a variable." },+ { name: "--save-as", value: "<string>", type: "string", description: "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 `--profile` instead." },+ { name: "--service-account-key-file-path", value: "<string>", type: "string", description: "The path to a GCP service account key file, for `--method=gcp-iam`. Can also be set with `INFISICAL_GCP_IAM_SERVICE_ACCOUNT_KEY_FILE_PATH`." },+ { name: "--service-account-token-path", value: "<string>", type: "string", description: "The path to the Kubernetes service account token, for `--method=kubernetes`. Defaults to `/var/run/secrets/kubernetes.io/serviceaccount/token`. Can also be set with `INFISICAL_KUBERNETES_SERVICE_ACCOUNT_TOKEN_PATH`." },+ ]}+ examples={[+ { title: "Log in through the browser", code: `infisical login` },+ { title: "Log in to EU Cloud", code: `infisical login --domain=https://eu.infisical.com` },+ { title: "Log in as a machine identity", code: "export INFISICAL_TOKEN=$(infisical login \\\n --method=universal-auth \\\n --client-id=<client-id> \\\n --client-secret=<client-secret> \\\n --silent --plain)" },+ { title: "Log in without prompts", code: "infisical login \\\n [email protected] \\\n --password=<password> \\\n --organization-id=<organization-id>" },+ ]}+>++Log in to Infisical. By default, `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.++A user login is stored as a [profile](/cli/reference#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](/cli/reference#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`.++</CLICommand>++<CLICommand+ id="login-status"+ command="login status"+ usage="[flags]"+ flags={[+ { name: "--json", type: "bool", description: "Print the status as JSON." },+ { name: "--token", value: "<string>", type: "string", description: "A machine identity access token to inspect instead of the active session or environment variables." },+ ]}+ examples={[+ { title: "Check the current session", code: `infisical login status` },+ { title: "Print the status as JSON", code: `infisical login status --json` },+ ]}+>++Show whether the CLI is authenticated to Infisical and, when available, the organization the session is scoped to. It checks the session of the profile in effect, or a machine identity token set in the environment.++</CLICommand>++<CLICommand+ id="logout"+ command="logout"+ usage="[flags]"+ flags={[+ { name: "--all", type: "bool", description: "Log out of every profile on this machine." },+ { name: "--local-only", type: "bool", description: "Remove the stored credentials without revoking the session on the server. The session stays valid until it expires." },+ ]}+ examples={[+ { title: "Log out of the current profile", code: `infisical logout` },+ { title: "Log out of a specific profile", code: `infisical logout --profile acme` },+ { title: "Log out of every profile", code: `infisical logout --all` },+ ]}+>++End a login session. The CLI removes the profile's stored credentials from this machine, and revokes its session on the server unless another profile still uses that session.++The profile itself is kept, so `infisical login --profile <name>` signs back in without setting it up again. To remove the profile, run [infisical profile delete](/cli/reference#profile-delete).++Without `--all` or `--profile`, the command logs out of the profile in effect. See [infisical profile](/cli/reference#profile) for how that profile is chosen.++</CLICommand>++<CLICommand+ id="org"+ command="org"+>++List organizations, and change the one your profile uses.++The organization is a setting on your login profile, not a separate login. Run [infisical profile current](/cli/reference#profile-current) to see the profile and organization in effect, and pass `--org` to any command to use a different organization for that command only.++</CLICommand>++<CLICommand+ id="org-list"+ command="org list"+ examples={[+ { title: "List your organizations", code: `infisical org list` },+ ]}+>++List the organizations that the current profile's account can use. The organization the profile uses is marked.++</CLICommand>++<CLICommand+ id="org-switch"+ command="org switch"+ usage="[organization] [flags]"+ args={[+ { name: "organization", usage: "[organization]", description: "The organization to use, by name, slug, or ID. Without it, the CLI asks you to pick one." },+ ]}+ flags={[+ { name: "--org-id", value: "<string>", type: "string", deprecated: true, description: "Deprecated: pass the organization as an argument instead. The ID of the organization to use." },+ ]}+ examples={[+ { title: "Pick an organization from a list", code: `infisical org switch` },+ { title: "Switch to an organization by name", code: `infisical org switch acme` },+ ]}+>++Change the current profile's organization. This is the same command as [infisical profile set-org](/cli/reference#profile-set-org).++To use a different organization for a single command, pass `--org` to that command instead. To keep a second organization available at the same time, give it its own profile with [infisical profile create](/cli/reference#profile-create).++</CLICommand>++<CLICommand+ id="pam"+ command="pam"+>++Connect to databases, servers, Kubernetes clusters, and cloud accounts managed by [Infisical PAM](/documentation/platform/pam/overview) (privileged access management) from your terminal. A gateway supplies each account's credential, so you never see it, and every session is recorded. Open one account for yourself with [infisical pam access](/cli/reference#pam-access), or give an AI agent brokered access with [infisical pam agentic access](/cli/reference#pam-agentic-access).++</CLICommand>++<CLICommand+ id="pam-access"+ command="pam access"+ usage="<path> [flags] [-- <command>]"+ args={[+ { name: "path", usage: "<path>", required: true, description: "The account to open, as `folder/account`. A leading `/` is optional." },+ { name: "command", usage: "[-- <command>]", description: "A command to run on the target instead of opening a shell, after `--`. SSH accounts only." },+ ]}+ flags={[+ { name: "--duration", value: "<string>", type: "string", default: "1h", description: "How long the session lasts, in Go duration format such as `30m`, `1h`, or `2h30m`." },+ { name: "--port", value: "<int>", type: "int", default: "0", description: "The port the local proxy listens on at `127.0.0.1`. `0` picks a free port. For SSH accounts, it applies only when a proxy runs. Has no effect on AWS IAM accounts." },+ { name: "--proxy", type: "bool", description: "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 `--`." },+ { name: "--reason", value: "<string>", type: "string", description: "Why you're accessing the account, recorded for audit. If the account requires a reason and you don't pass one, the CLI prompts for it in an interactive terminal and fails otherwise." },+ { name: "--target", value: "<string>", type: "string", description: "The host to connect to, for accounts that allow several hosts, such as Windows AD accounts." },+ ]}+ examples={[+ { title: "Open a database session for two hours", code: "infisical pam access production/postgres-main --duration=2h" },+ { title: "Open a shell on a server", code: "infisical pam access servers/prod-bastion" },+ { title: "Run one command on a server", code: "infisical pam access servers/prod-bastion -- systemctl status nginx" },+ { title: "Start a local SSH proxy", code: "infisical pam access servers/prod-bastion --proxy" },+ ]}+>++Open a session for one PAM account. The command runs as the user you logged in as with [infisical login](/cli/reference#login); it doesn't accept a machine identity. To open accounts for an agent, use [infisical pam agentic access](/cli/reference#pam-agentic-access).++SSH accounts connect you to a shell on the target. Pass a command after `--` to run only that command, or `--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, the CLI starts a local proxy on `127.0.0.1` and prints how to connect to it. For AWS IAM accounts, the CLI writes temporary credentials to your AWS credentials file instead. The page for each [account type](/documentation/platform/pam/accounts/overview#account-types) 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.++If the account requires approval, the CLI offers to submit an access request in an interactive terminal. If it requires MFA, the CLI has you complete MFA in your browser before it continues.++</CLICommand>++<CLICommand+ id="pam-agentic"+ command="pam agentic"+>++Run AI agents against PAM accounts. The agent reaches each account through a local proxy and never holds a credential. Start a run with [infisical pam agentic access](/cli/reference#pam-agentic-access), and see [AI agents](/documentation/platform/pam/ai-agents/overview) for how it works.++</CLICommand>++<CLICommand+ id="pam-agentic-access"+ command="pam agentic access"+ usage="[flags] -- <agent-command>"+ args={[+ { name: "agent-command", usage: "<agent-command>", required: true, description: "The command that starts the agent, such as `claude`, after `--`. Everything after `--` is passed to it unchanged." },+ ]}+ flags={[+ { name: "--account", value: "<stringArray>", type: "stringArray", description: "An account to expose, as `folder/account`. Repeat the flag or separate paths with commas. Defaults to every account you can launch. If a named account can't be used, the command stops and says why." },+ { name: "--agent", value: "<string>", type: "string", description: "The agent type, when the CLI can't detect it from the command name: `claude`, `codex`, `gemini`, or `generic`. It sets how the instructions are delivered." },+ { name: "--auth-method", value: "<string>", type: "string", description: "Log in as a machine identity with this method: `universal-auth`, `kubernetes`, `azure`, `gcp-id-token`, `gcp-iam`, `aws-iam`, `oidc-auth`, `jwt-auth`, or `ldap-auth`. The CLI renews the machine identity's token for the whole run. Can also be set with `INFISICAL_AUTH_METHOD`." },+ { name: "--client-id", value: "<string>", type: "string", description: "The machine identity's client ID, for `--auth-method=universal-auth`. Can also be set with `INFISICAL_UNIVERSAL_AUTH_CLIENT_ID`." },+ { name: "--client-secret", value: "<string>", type: "string", description: "The machine identity's client secret, for `--auth-method=universal-auth`. Can also be set with `INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET`." },+ { name: "--duration", value: "<string>", type: "string", default: "1h", description: "How long each PAM session can last, in Go duration format such as `30m`, `1h`, or `2h30m`. It must be positive." },+ { name: "--jwt", value: "<string>", type: "string", description: "The JWT to log in with, for `--auth-method=oidc-auth` or `jwt-auth`. Can also be set with `INFISICAL_JWT`." },+ { name: "--ldap-password", value: "<string>", type: "string", description: "The LDAP password, for `--auth-method=ldap-auth`. Can also be set with `INFISICAL_LDAP_PASSWORD`." },+ { name: "--ldap-username", value: "<string>", type: "string", description: "The LDAP username, for `--auth-method=ldap-auth`. Can also be set with `INFISICAL_LDAP_USERNAME`." },+ { name: "--log-file", value: "<string>", type: "string", description: "A file to write proxy logs to while the agent runs. Without it, proxy logs are discarded." },+ { name: "--machine-identity-id", value: "<string>", type: "string", description: "The machine identity's ID, for every `--auth-method` except `universal-auth`. Can also be set with `INFISICAL_MACHINE_IDENTITY_ID`." },+ { name: "--no-approval-request", type: "bool", description: "Don't raise access requests for accounts that need approval, and leave those accounts out of the run. By default, the CLI raises a request the first time the agent connects to one, and the account works once a reviewer approves it." },+ { name: "--no-sandbox", type: "bool", description: "Run the agent without the OS sandbox, so it can read your Infisical login and other credential files. Required on hosts with no sandbox, such as Windows." },+ { name: "--organization-slug", value: "<string>", type: "string", description: "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. Can also be set with `INFISICAL_AUTH_ORGANIZATION_SLUG`." },+ { name: "--reason", value: "<string>", type: "string", description: "Why the agent needs access, recorded for audit. The CLI can't prompt for a reason while the agent is running in the terminal, so accounts that require a reason need this flag." },+ { name: "--service-account-key-file-path", value: "<string>", type: "string", description: "The path to a GCP service account key file, for `--auth-method=gcp-iam`. Can also be set with `INFISICAL_GCP_IAM_SERVICE_ACCOUNT_KEY_FILE_PATH`." },+ { name: "--service-account-token-path", value: "<string>", type: "string", description: "The path to the Kubernetes service account token, for `--auth-method=kubernetes`. Required with that method. Can also be set with `INFISICAL_KUBERNETES_SERVICE_ACCOUNT_TOKEN_PATH`." },+ { name: "--token", value: "<string>", type: "string", description: "A machine identity access token to run as. Service tokens aren't accepted. Without it, the CLI reads `INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN`, then `INFISICAL_TOKEN`." },+ ]}+ examples={[+ { title: "Run Claude Code with every account you can launch", code: "infisical pam agentic access -- claude" },+ { title: "Run Codex with two accounts", code: "infisical pam agentic access --account=prod/orders-db,prod/bastion -- codex --model gpt-5" },+ { title: "Record a reason and keep proxy logs", code: "infisical pam agentic access --reason=\"investigating INC-4021\" --log-file=/tmp/pam.log -- claude" },+ { title: "Run your own agent as a machine identity", code: "export INFISICAL_UNIVERSAL_AUTH_CLIENT_ID=<client-id>\nexport INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET=<client-secret>\ninfisical pam agentic access --auth-method=universal-auth -- python triage_agent.py" },+ ]}+>++Start a local proxy for each PAM account you can launch, then start an AI agent with instructions for reaching them. Everything after `--` is the command that starts the agent. The `--` is required when that command has flags of its own.++The CLI gives each account its own port on `127.0.0.1`, and the agent connects through those ports without ever holding a credential. The CLI skips accounts that require MFA and accounts of [types agentic access doesn't support](/documentation/platform/pam/ai-agents/overview#supported-account-types), and lists each skipped account with the reason. To open a skipped account, use [infisical pam access](/cli/reference#pam-access).++The CLI [adds instructions for reaching the accounts](/documentation/platform/pam/ai-agents/overview#how-the-agent-is-told) to the agent's system prompt or to a file such as `AGENTS.md`, depending on the agent. It runs the agent in an [OS sandbox](/documentation/platform/pam/ai-agents/overview#the-sandbox), which stops the agent from reading your Infisical login. On a host without a sandbox, the command fails unless you pass `--no-sandbox`.++The run authenticates with `--token` when one is set, then as a machine identity when `--auth-method` is set, and otherwise as the user you logged in as with [infisical login](/cli/reference#login).++</CLICommand>++<CLICommand+ id="profile"+ command="profile"+>++Manage login profiles. A profile is one login: an account on one instance, plus the organization it uses by default. Selecting a profile selects all three, so switching between organizations or instances never means logging in again.++Create your first profile with [infisical login](/cli/reference#login), one per extra organization with [infisical profile create](/cli/reference#profile-create), and one per extra account or instance with `infisical login --save-as <name>`.++A command uses the first of these that's set:++1. `--profile` on the command+2. The `INFISICAL_PROFILE` environment variable, set by [infisical profile pin](/cli/reference#profile-pin)+3. A directory bound with [infisical profile bind](/cli/reference#profile-bind)+4. The machine's default profile, set with [infisical profile use](/cli/reference#profile-use)++</CLICommand>++<CLICommand+ id="profile-bind"+ command="profile bind"+ usage="[name] [path]"+ args={[+ { name: "name", usage: "[name]", description: "The profile to bind. Defaults to the profile in effect." },+ { name: "path", usage: "[path]", description: "The directory to bind. Defaults to the current directory." },+ ]}+ examples={[+ { title: "Bind this directory to the profile in effect", code: `infisical profile bind` },+ { title: "Bind this directory to another profile", code: `infisical profile bind client-a` },+ { title: "Bind a different directory", code: `infisical profile bind client-a ~/work/client-a` },+ ]}+>++Bind a directory, and everything under it, to a profile. Commands run inside that directory select the profile with no flag or environment variable, so moving between projects moves between organizations.++If several parent directories are bound, the closest one applies. Bindings are stored in your CLI configuration, never in the repository. Remove one with [infisical profile unbind](/cli/reference#profile-unbind).++</CLICommand>++<CLICommand+ id="profile-create"+ command="profile create"+ usage="<name> [flags]"+ args={[+ { name: "name", usage: "<name>", required: true, description: "The name of the new profile." },+ ]}+ flags={[+ { name: "--pin", type: "bool", description: "Also pin this terminal to the new profile. Run the command through `eval` for the pin to take effect." },+ { name: "--use", type: "bool", description: "Also make the new profile the default for this machine." },+ ]}+ examples={[+ { title: "Create a profile for another organization", code: `infisical profile create client-b --org acme` },+ { title: "Create it and use it in this terminal", code: `eval "$(infisical profile create client-b --org acme --pin)"` },+ { title: "Create it and make it the default", code: `infisical profile create client-b --org acme --use` },+ ]}+>++Create a profile for another organization without logging in again. The new profile reuses the account and instance you're signed in to, scoped to the organization you choose, so both organizations stay usable at the same time. Pass the organization with `--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.++</CLICommand>++<CLICommand+ id="profile-current"+ command="profile current"+ usage="[flags]"+ flags={[+ { name: "--plain", type: "bool", description: "Print only the profile name, for use in shell prompts." },+ ]}+ examples={[+ { title: "Show the profile in effect", code: `infisical profile current` },+ { title: "Print only its name", code: `infisical profile current --plain` },+ ]}+>++Show which profile the CLI uses in this terminal and directory, and why.++</CLICommand>++<CLICommand+ id="profile-delete"+ command="profile delete"+ usage="<name> [flags]"+ args={[+ { name: "name", usage: "<name>", required: true, description: "The profile to delete." },+ ]}+ flags={[+ { name: "--local-only", type: "bool", description: "Remove the profile without revoking its session on the server. The session stays valid until it expires." },+ ]}+ examples={[+ { title: "Delete a profile", code: `infisical profile delete old-client` },+ ]}+>++Delete a profile and its stored credentials. The CLI also revokes the profile's session on the server, unless another profile still uses that session.++</CLICommand>++<CLICommand+ id="profile-list"+ command="profile list"+ examples={[+ { title: "List your profiles", code: `infisical profile list` },+ ]}+>++List every login profile on this machine.++</CLICommand>++<CLICommand+ id="profile-pin"+ command="profile pin"+ usage="<name>"+ args={[+ { name: "name", usage: "<name>", required: true, description: "The profile to pin this terminal to." },+ ]}+ examples={[+ { title: "Pin this terminal to a profile", code: `eval "$(infisical profile pin acme)"` },+ ]}+>++Pin the current terminal to a profile. Only this terminal changes: the default profile and every other terminal keep what they were using, so you can work in several organizations at once. Undo it with [infisical profile unpin](/cli/reference#profile-unpin).++The command prints an `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.++</CLICommand>++<CLICommand+ id="profile-rename"+ command="profile rename"+ usage="<name> <new-name>"+ args={[+ { name: "name", usage: "<name>", required: true, description: "The profile's current name." },+ { name: "new-name", usage: "<new-name>", required: true, description: "The name to give it." },+ ]}+ examples={[+ { title: "Rename a profile", code: `infisical profile rename [email protected] acme` },+ ]}+>++Rename a profile. Its stored session, the default-profile setting, and directory bindings all follow the new name. Terminals pinned to the old name with [infisical profile pin](/cli/reference#profile-pin) keep pointing at it and need pinning again.++</CLICommand>++<CLICommand+ id="profile-set-org"+ command="profile set-org"+ usage="[organization] [flags]"+ args={[+ { name: "organization", usage: "[organization]", description: "The organization to use, by name, slug, or ID. Without it, the CLI asks you to pick one." },+ ]}+ flags={[+ { name: "--org-id", value: "<string>", type: "string", deprecated: true, description: "Deprecated: pass the organization as an argument instead. The ID of the organization to use." },+ ]}+ examples={[+ { title: "Pick an organization from a list", code: `infisical profile set-org` },+ { title: "Set the organization by name", code: `infisical profile set-org acme` },+ ]}+>++Change the current profile's organization. This is the same command as [infisical org switch](/cli/reference#org-switch).++To use a different organization for a single command, pass `--org` to that command instead. To keep a second organization available at the same time, give it its own profile with [infisical profile create](/cli/reference#profile-create).++</CLICommand>++<CLICommand+ id="profile-unbind"+ command="profile unbind"+ usage="[path]"+ args={[+ { name: "path", usage: "[path]", description: "The bound directory. Defaults to whichever binding covers the current directory, so running the command inside a bound tree removes that binding." },+ ]}+ examples={[+ { title: "Remove the binding that covers this directory", code: `infisical profile unbind` },+ { title: "Remove a specific directory's binding", code: `infisical profile unbind ~/work/client-a` },+ ]}+>++Remove a directory's profile binding.++</CLICommand>++<CLICommand+ id="profile-unpin"+ command="profile unpin"+ examples={[+ { title: "Unpin this terminal", code: `eval "$(infisical profile unpin)"` },+ ]}+>++Remove the current terminal's profile pin, so it falls back to a bound directory or the default profile.++The command prints an `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.++</CLICommand>++<CLICommand+ id="profile-use"+ command="profile use"+ usage="<name>"+ args={[+ { name: "name", usage: "<name>", required: true, description: "The profile to make the default." },+ ]}+ examples={[+ { title: "Make a profile the default", code: `infisical profile use work-eu` },+ ]}+>++Make a profile the default for this machine. Commands use the default when nothing more specific applies. To choose a profile for one terminal, use [infisical profile pin](/cli/reference#profile-pin), and for one directory, use [infisical profile bind](/cli/reference#profile-bind).++</CLICommand>++<CLICommand+ id="proxy"+ command="proxy"+>++Run the [Infisical Proxy](/integrations/platforms/infisical-proxy), which sits between your applications and Infisical and caches secret responses, so applications keep getting secrets when Infisical is unreachable.++</CLICommand>++<CLICommand+ id="proxy-start"+ command="proxy start"+ usage="[flags]"+ flags={[+ { name: "--access-token-check-interval", value: "<string>", type: "string", default: "5m", description: "How often to check that cached access tokens are still valid, such as `5m` or `1h`." },+ { name: "--client-id", value: "<string>", type: "string", description: "A universal auth machine identity's client ID. Required with `--enable-event-subscriptions`. Can also be set with `INFISICAL_UNIVERSAL_AUTH_CLIENT_ID`." },+ { name: "--client-secret", value: "<string>", type: "string", description: "The machine identity's client secret. Required with `--enable-event-subscriptions`. Can also be set with `INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET`." },+ { name: "--domain", value: "<string>", type: "string", description: "The Infisical instance to forward requests to, such as `https://app.infisical.com`." },+ { name: "--enable-event-subscriptions", type: "bool", description: "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-id` and `--client-secret`." },+ { name: "--eviction-strategy", value: "<string>", type: "string", default: "optimistic", description: "How to handle the cache when Infisical is unreachable. `optimistic`, the only strategy, keeps serving cached data." },+ { name: "--listen-address", value: "<string>", type: "string", default: "localhost:8081", description: "The address to listen on." },+ { name: "--polling-fallback-interval", value: "<string>", type: "string", default: "10m", description: "How often to poll for secret changes when event subscriptions are unavailable, such as `1m`. Used only with `--enable-event-subscriptions`." },+ { name: "--static-secrets-refresh-interval", value: "<string>", type: "string", default: "1h", description: "How often to refresh cached secrets, such as `30m` or `1h`. Not used with `--enable-event-subscriptions`." },+ { name: "--tls-cert-file", value: "<string>", type: "string", description: "The proxy's TLS certificate file. Required while `--tls-enabled` is on." },+ { name: "--tls-enabled", type: "bool", default: "true", description: "Serve the proxy over TLS. Pass `--tls-enabled=false` to serve plain HTTP." },+ { name: "--tls-key-file", value: "<string>", type: "string", description: "The proxy's TLS private key file. Required while `--tls-enabled` is on." },+ ]}+ examples={[+ { title: "Start the proxy with TLS", code: "infisical proxy start --domain=https://app.infisical.com --tls-cert-file=./proxy.crt --tls-key-file=./proxy.key" },+ { title: "Start the proxy locally without TLS", code: "infisical proxy start --domain=https://app.infisical.com --tls-enabled=false" },+ ]}+>++Start the Infisical Proxy. Point your applications at its `--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.++</CLICommand>++<CLICommand+ id="relay"+ command="relay"+>++Run an Infisical [relay](/documentation/platform/gateways/relay-deployment), which carries traffic between Infisical and your gateways, so gateways need only outbound connections. Run it in the foreground with [infisical relay start](/cli/reference#relay-start), or as a systemd service with [infisical relay systemd install](/cli/reference#relay-systemd-install).++</CLICommand>++<CLICommand+ id="relay-start"+ command="relay start"+ usage="[flags]"+ flags={[+ { name: "--auth-method", value: "<string>", type: "string", description: "Log in as a machine identity with this method instead of enrolling: `universal-auth`, `kubernetes`, `azure`, `gcp-id-token`, `gcp-iam`, `aws-iam`, or `oidc-auth`. Can also be set with `INFISICAL_AUTH_METHOD`." },+ { name: "--client-id", value: "<string>", type: "string", description: "The machine identity's client ID, for `--auth-method=universal-auth`. Can also be set with `INFISICAL_UNIVERSAL_AUTH_CLIENT_ID`." },+ { name: "--client-secret", value: "<string>", type: "string", description: "The machine identity's client secret, for `--auth-method=universal-auth`. Can also be set with `INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET`." },+ { name: "--domain", value: "<string>", type: "string", description: "The Infisical instance to connect to. Without it, the relay uses the domain it saved when it enrolled, then your active profile's domain." },+ { name: "--enroll-method", value: "<string>", type: "string", description: "How the relay authenticates on its own: `token` for a one-time enrollment token, or `aws`. Can also be set with `INFISICAL_RELAY_ENROLL_METHOD`." },+ { name: "--host", value: "<string>", type: "string", description: "The IP address or hostname gateways use to reach the relay. Required unless you use `--enroll-method`. Can also be set with `INFISICAL_RELAY_HOST`." },+ { name: "--jwt", value: "<string>", type: "string", description: "The JWT to exchange for an access token, for `--auth-method=oidc-auth`." },+ { name: "--machine-identity-id", value: "<string>", type: "string", description: "The machine identity's ID, for every `--auth-method` except `universal-auth`." },+ { name: "--name", value: "<string>", type: "string", description: "The relay's name. Can also be set with `INFISICAL_RELAY_NAME`." },+ { name: "--relay-id", value: "<string>", type: "string", description: "The relay's ID from Infisical. Required with `--enroll-method=aws`, unless the relay saved it on an earlier start. Can also be set with `INFISICAL_RELAY_ID`." },+ { name: "--service-account-key-file-path", value: "<string>", type: "string", description: "The path to a GCP service account key file, for `--auth-method=gcp-iam`." },+ { name: "--service-account-token-path", value: "<string>", type: "string", description: "The path to the Kubernetes service account token, for `--auth-method=kubernetes`." },+ { name: "--token", value: "<string>", type: "string", description: "With `--enroll-method=token`, the one-time enrollment token. Otherwise, a machine identity access token to connect with." },+ { name: "--type", value: "<string>", type: "string", description: "`org` for a relay that belongs to your organization, or `instance` for a relay that serves the whole Infisical instance, run by the instance's admins. Defaults to `org`. Can also be set with `INFISICAL_RELAY_TYPE`." },+ ]}+ examples={[+ { title: "Enroll and start a relay", code: "infisical relay start --name=my-relay --enroll-method=token --token=<enrollment-token>" },+ { title: "Start a relay on AWS", code: "infisical relay start --name=my-relay --enroll-method=aws --relay-id=<relay-id>" },+ { title: "Start an instance relay", code: "INFISICAL_RELAY_AUTH_SECRET=<secret> infisical relay start --type=instance --host=relay.example.com --name=my-relay" },+ ]}+>++Start a relay in the foreground. An organization relay authenticates by enrolling with `--enroll-method`, or as a machine identity with the same flags as [infisical login](/cli/reference#login). An instance relay authenticates with the secret in `INFISICAL_RELAY_AUTH_SECRET`.++</CLICommand>++<CLICommand+ id="relay-systemd"+ command="relay systemd"+>++Install or remove a systemd service that runs a relay. Both commands run only on Linux, as root.++</CLICommand>++<CLICommand+ id="relay-systemd-install"+ command="relay systemd install"+ usage="[name] [flags]"+ args={[+ { name: "name", usage: "[name]", description: "The relay's name. Required with `--enroll-method=token`." },+ ]}+ flags={[+ { name: "--domain", value: "<string>", type: "string", description: "The Infisical instance to connect to." },+ { name: "--enroll-method", value: "<string>", type: "string", description: "How the relay authenticates: `token` for a one-time enrollment token, or `aws`." },+ { name: "--host", value: "<string>", type: "string", description: "The IP address or hostname gateways use to reach the relay. Required with `--type=instance`." },+ { name: "--log-file", value: "<string>", type: "string", description: "A file to write the service's logs to, such as `/var/log/infisical/relay.log`." },+ { name: "--relay-auth-secret", value: "<string>", type: "string", description: "The secret an instance relay authenticates with. Required with `--type=instance`." },+ { name: "--relay-id", value: "<string>", type: "string", description: "The relay's ID from Infisical. Required with `--enroll-method=aws`." },+ { name: "--token", value: "<string>", type: "string", description: "The one-time enrollment token, for `--enroll-method=token`." },+ { name: "--type", value: "<string>", type: "string", default: "org", description: "`org` for a relay that belongs to your organization, or `instance` for a relay that serves the whole Infisical instance, run by the instance's admins." },+ ]}+ examples={[+ { title: "Install an organization relay", code: "sudo infisical relay systemd install my-relay --enroll-method=token --token=<enrollment-token> --domain=https://app.infisical.com" },+ { title: "Install a relay on AWS", code: "sudo infisical relay systemd install my-relay --enroll-method=aws --relay-id=<relay-id> --domain=https://app.infisical.com" },+ { title: "Install an instance relay", code: "sudo infisical relay systemd install my-relay --type=instance --host=relay.example.com --relay-auth-secret=<secret>" },+ ]}+>++Install and enable a systemd service that runs the relay. Run the command as root on Linux.++</CLICommand>++<CLICommand+ id="relay-systemd-uninstall"+ command="relay systemd uninstall"+ usage="[name]"+ args={[+ { name: "name", usage: "[name]", description: "The relay whose service to remove. Without it, the command removes the single relay service that older CLI versions installed." },+ ]}+ examples={[+ { title: "Remove a relay service", code: "sudo infisical relay systemd uninstall my-relay" },+ ]}+>++Stop and remove a relay's systemd service. Run the command as root on Linux.++</CLICommand>++<CLICommand+ id="reset"+ command="reset"+ usage="[flags]"+ flags={[+ { name: "--local-only", type: "bool", description: "Delete local data without revoking the sessions on the server. The sessions stay valid until they expire." },+ ]}+ examples={[+ { title: "Reset the CLI", code: "infisical reset" },+ { title: "Reset without contacting the server", code: "infisical reset --local-only" },+ ]}+>++Delete all the data the CLI stores on your machine and return it to its default state. Use it when a problem persists and you want a clean start.++The command revokes the session of every profile on the server, then deletes every profile's credentials from your system keyring and deletes the `~/.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.json` files in your projects aren't touched.++Log in again with [infisical login](/cli/reference#login) afterwards. Directory bindings are deleted with the rest of the configuration, and terminals pinned with [infisical profile pin](/cli/reference#profile-pin) point to a profile that no longer exists.++</CLICommand>++<CLICommand+ id="run"+ command="run"+ usage="[flags] -- [command]"+ args={[+ { name: "command", usage: "[command]", description: "The command to run, after `--`. Everything after `--` is passed to it unchanged. Required unless you pass `--command`." },+ ]}+ flags={[+ { name: "--command", short: "-c", value: "<string>", type: "string", description: "A shell command to run instead of the arguments after `--`, such as `\"npm run build && npm start\"`. Use it to chain several commands." },+ { name: "--env", short: "-e", value: "<string>", type: "string", default: "dev", description: "The environment to fetch secrets from, such as `dev`, `staging`, or `prod`. Defaults to the [environment set in `.infisical.json`](/cli/project-config#set-the-environment), then `dev`." },+ { name: "--expand", type: "bool", default: "true", description: "Resolve secret references and shell parameter expansions in secret values before injecting them. Pass `--expand=false` to inject values exactly as stored." },+ { name: "--include-imports", type: "bool", default: "true", description: "Include secrets imported into the environment from other environments or folders." },+ { name: "--path", value: "<stringArray>", type: "stringArray", default: "/", description: "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 `--path` wins." },+ { name: "--project-config-dir", value: "<string>", type: "string", description: "The directory that contains `.infisical.json`. Use it when the file isn't in the directory you run the command from, such as in a monorepo." },+ { name: "--projectId", value: "<string>", type: "string", description: "The project to fetch secrets from. Required when you authenticate with a machine identity. Can also be set with `INFISICAL_PROJECT_ID`." },+ { name: "--recursive", type: "bool", description: "Also inject the secrets in every subfolder of each `--path`." },+ { name: "--secret-overriding", type: "bool", default: "true", description: "Use your personal secrets in place of shared secrets with the same name. Pass `--secret-overriding=false` to use only shared secrets." },+ { name: "--tags", short: "-t", value: "<string>", type: "string", description: "Only inject secrets with these tag slugs, separated by commas." },+ { name: "--token", value: "<string>", type: "string", description: "A machine identity access token to fetch secrets with, instead of your login. Without it, the CLI reads `INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN`, then `INFISICAL_TOKEN`." },+ { name: "--watch", type: "bool", description: "Restart the command whenever secrets change in Infisical. Intended for local development." },+ { name: "--watch-interval", value: "<int>", type: "int", default: "10", description: "How often, in seconds, `--watch` checks for changes. The minimum is `5`." },+ ]}+ examples={[+ { title: "Start a dev server with secrets", code: `infisical run -- npm run dev` },+ { title: "Use another environment and two folders", code: `infisical run --env=prod --path=/shared --path=/backend -- node server.js` },+ { title: "Run in CI with a machine identity", code: `export INFISICAL_TOKEN=<access-token>+infisical run --projectId=<project-id> --env=prod -- npm start` },+ { title: "Restart when secrets change", code: `infisical run --watch -- npm run dev` },+ ]}+>++Inject secrets from Infisical into a process as environment variables. The CLI fetches the secrets for the project linked in [`.infisical.json`](/cli/project-config), 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.++</CLICommand>++<CLICommand+ id="scan"+ command="scan"+ usage="[flags]"+ flags={[+ { name: "--baseline-path", short: "-b", value: "<string>", type: "string", description: "A JSON report from an earlier `infisical scan` run. Findings already in it aren't reported again. If the file can't be loaded, the scan logs an error and continues without it." },+ { name: "--confidence", value: "<string>", type: "string", default: "medium", description: "The lowest confidence a finding needs to be reported: `low`, `medium`, or `high`. Findings from rules that don't set a confidence are always reported." },+ { name: "--config", short: "-c", value: "<string>", type: "string", description: "The scan config file to use. Without it, the CLI uses `.infisical-scan.toml` in the `--source` directory, then the built-in rules. Can also be set with `INFISICAL_SCAN_CONFIG`." },+ { name: "--exit-code", value: "<int>", type: "int", default: "1", description: "The exit code to use when the scan finds leaks. Pass `0` to exit successfully anyway." },+ { name: "--follow-symlinks", type: "bool", description: "Scan the files that symbolic links point to. Applies only with `--no-git`." },+ { name: "--log-opts", value: "<string>", type: "string", description: "Options to pass to `git log -p` to choose the commits to scan, such as `--all commitA..commitB`. They replace the default `--full-history --all`. Has no effect with `--no-git` or `--pipe`." },+ { name: "--max-target-megabytes", value: "<int>", type: "int", default: "0", description: "Skip files larger than this many megabytes. `0` means no limit. Applies only with `--no-git`." },+ { name: "--no-color", type: "bool", description: "Turn off color in verbose output." },+ { name: "--no-git", type: "bool", description: "Scan the files in `--source` as a plain directory instead of reading Git history." },+ { name: "--pipe", type: "bool", description: "Scan standard input instead of `--source`, as in `cat app.log | infisical scan --pipe`. Has no effect with `--no-git`." },+ { name: "--platform", value: "<string>", type: "string", description: "The source code platform to link findings to: `github`, `gitlab`, `azuredevops`, `bitbucket`, or `gitea`, or `none` for no links. Without it, the CLI detects the platform from the repository's remote URL. Applies only to Git history scans." },+ { name: "--redact", type: "bool", description: "Replace secrets with `REDACTED` in verbose output. Reports written with `--report-path` still contain the secrets." },+ { name: "--report-format", short: "-f", value: "<string>", type: "string", default: "json", description: "The report's format: `json`, `csv`, `sarif`, or `junit`." },+ { name: "--report-path", short: "-r", value: "<string>", type: "string", description: "The file to write a report of the findings to. Without it, no report is written." },+ { name: "--source", short: "-s", value: "<string>", type: "string", default: ".", description: "The repository, directory, or file to scan." },+ { name: "--verbose", short: "-v", type: "bool", description: "Print each finding: the file, where in the file, and the secret." },+ ]}+ examples={[+ { title: "Scan a repository's history", code: "infisical scan --verbose" },+ { title: "Scan a range of commits", code: "infisical scan --log-opts=\"--all commitA..commitB\"" },+ { title: "Scan a directory without Git", code: "infisical scan --no-git --source=./config" },+ { title: "Write a report, ignoring known findings", code: "infisical scan --baseline-path=baseline.json --report-path=findings.json" },+ ]}+>++Scan a Git repository's history, a directory, or standard input for leaked secrets. The scan runs locally and doesn't need an Infisical login.++By default, the CLI reads `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](/documentation/platform/secret-scanning/scan-locally).++The command exits with `--exit-code` when it finds leaks, and with `1` when the scan fails.++</CLICommand>++<CLICommand+ id="scan-git-changes"+ command="scan git-changes"+ usage="[flags]"+ flags={[+ { name: "--confidence", value: "<string>", type: "string", default: "medium", description: "The lowest confidence a finding needs to be reported: `low`, `medium`, or `high`. Findings from rules that don't set a confidence are always reported." },+ { name: "--staged", type: "bool", description: "Scan the changes staged with `git add` instead of the unstaged changes." },+ ]}+ inheritedFlags={[+ { name: "--config", short: "-c", value: "<string>", type: "string", description: "The scan config file to use. Without it, the CLI uses `.infisical-scan.toml` in the `--source` directory, then the built-in rules. Can also be set with `INFISICAL_SCAN_CONFIG`." },+ { name: "--exit-code", value: "<int>", type: "int", default: "1", description: "The exit code to use when the scan finds leaks. Pass `0` to exit successfully anyway." },+ { name: "--no-color", type: "bool", description: "Turn off color in verbose output." },+ { name: "--redact", type: "bool", description: "Replace secrets with `REDACTED` in verbose output. Reports written with `--report-path` still contain the secrets." },+ { name: "--report-format", short: "-f", value: "<string>", type: "string", default: "json", description: "The report's format: `json`, `csv`, `sarif`, or `junit`." },+ { name: "--report-path", short: "-r", value: "<string>", type: "string", description: "The file to write a report of the findings to. Without it, no report is written." },+ { name: "--source", short: "-s", value: "<string>", type: "string", default: ".", description: "The Git repository to scan." },+ { name: "--verbose", short: "-v", type: "bool", description: "Print each finding: the file, where in the file, and the secret." },+ ]}+ examples={[+ { title: "Scan unstaged changes", code: "infisical scan git-changes --verbose" },+ { title: "Scan staged changes before a commit", code: "infisical scan git-changes --staged --verbose" },+ ]}+>++Scan the uncommitted changes in a Git repository for leaked secrets, by reading `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](/cli/reference#scan-install) sets one up.++The scan uses the same config and `.infisicalignore` file as [infisical scan](/cli/reference#scan), and exits with `--exit-code` when it finds leaks.++</CLICommand>++<CLICommand+ id="scan-install"+ command="scan install"+ usage="[flags]"+ flags={[+ { name: "--pre-commit-hook", type: "bool", description: "Install a Git pre-commit hook that scans staged changes before each commit." },+ ]}+ examples={[+ { title: "Install the pre-commit hook", code: "infisical scan install --pre-commit-hook" },+ ]}+>++Install a Git pre-commit hook in the current repository with `--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`.++</CLICommand>++<CLICommand+ id="secrets"+ command="secrets"+ usage="[flags]"+ flags={[+ { name: "--env", value: "<string>", type: "string", default: "dev", description: "The environment to list secrets from. Every `infisical secrets` subcommand accepts it. Defaults to the [environment set in `.infisical.json`](/cli/project-config#set-the-environment), then `dev`." },+ { name: "--expand", type: "bool", default: "true", description: "Resolve secret references and shell parameter expansions in secret values." },+ { name: "--include-imports", type: "bool", default: "true", description: "Include secrets imported into the environment from other environments or folders." },+ { name: "--output", short: "-o", value: "<string>", type: "string", description: "Print the secrets as `json`, `yaml`, or `dotenv` instead of a table." },+ { name: "--path", value: "<string>", type: "string", default: "/", description: "The folder to list secrets from." },+ { name: "--plain", type: "bool", deprecated: true, description: "Deprecated: use `--output` instead. Print only secret values, one per line." },+ { name: "--projectId", value: "<string>", type: "string", description: "The project to list secrets from. Required when you authenticate with a machine identity. Can also be set with `INFISICAL_PROJECT_ID`." },+ { name: "--recursive", type: "bool", description: "Also list the secrets in every subfolder of `--path`." },+ { name: "--secret-overriding", type: "bool", default: "true", description: "Show your personal secrets in place of shared secrets with the same name. Pass `--secret-overriding=false` to show only shared secrets." },+ { name: "--tags", short: "-t", value: "<string>", type: "string", description: "Only list secrets with these tag slugs, separated by commas. `infisical secrets get` and `infisical secrets generate-example-env` accept it too." },+ { name: "--token", value: "<string>", type: "string", description: "A machine identity access token to fetch secrets with, instead of your login. Without it, the CLI reads `INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN`, then `INFISICAL_TOKEN`." },+ ]}+ examples={[+ { title: "List secrets in dev", code: `infisical secrets` },+ { title: "List every secret in a folder tree", code: `infisical secrets --env=staging --path=/ --recursive` },+ { title: "Print production secrets as JSON", code: `infisical secrets --env=prod --output=json` },+ ]}+>++Print the secrets in an environment and folder as a table. Pass `--output` to print them as JSON, YAML, or dotenv instead.++</CLICommand>++<CLICommand+ id="secrets-agent-proxy"+ command="secrets agent-proxy"+ inheritedFlags={[+ { name: "--env", value: "<string>", type: "string", default: "dev", description: "Has no effect on `agent-proxy` commands. `connect` and `run` take their own `--env`." },+ { name: "--tags", short: "-t", value: "<string>", type: "string", description: "Has no effect on `agent-proxy` commands." },+ ]}+>++Run the [Infisical Agent Proxy](/documentation/platform/agent-proxy/overview), which lets AI agents and untrusted code use secrets without holding them. Agents send their HTTP requests through the proxy, which replaces placeholder credentials with real ones before forwarding each request, so the agent never holds the real secret.++For an agent on your own computer, [infisical secrets agent-proxy run](/cli/reference#secrets-agent-proxy-run) starts a proxy and a sandboxed agent together. For a proxy shared across your network, run [infisical secrets agent-proxy start](/cli/reference#secrets-agent-proxy-start) on its own host, and launch agents behind it with [infisical secrets agent-proxy connect](/cli/reference#secrets-agent-proxy-connect).++</CLICommand>++<CLICommand+ id="secrets-agent-proxy-connect"+ command="secrets agent-proxy connect"+ usage="[flags] -- <command>"+ args={[+ { name: "command", usage: "<command>", required: true, description: "The agent's command, after `--`. Everything after `--` is passed to it unchanged." },+ ]}+ flags={[+ { name: "--allow-readable-brokered-secrets", type: "bool", description: "Start the agent even if it can read the real value of a secret that a proxied service substitutes into its requests. Without this flag, the command exits with an error, and you fix it by removing the agent's read permission on that secret. Can also be set with `INFISICAL_AGENT_PROXY_ALLOW_READABLE_BROKERED_SECRETS`." },+ { name: "--client-id", value: "<string>", type: "string", description: "The client ID of the agent's machine identity. Can also be set with `INFISICAL_UNIVERSAL_AUTH_CLIENT_ID`." },+ { name: "--client-secret", value: "<string>", type: "string", description: "The client secret of the agent's machine identity. Can also be set with `INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET`." },+ { name: "--env", short: "-e", value: "<string>", type: "string", required: true, description: "The environment to fetch proxied services and secrets from. Without it, the CLI reads `INFISICAL_ENVIRONMENT`, then the environment that `.infisical.json` maps to your git branch, then its `defaultEnvironment`." },+ { name: "--no-proxy", value: "<string>", type: "string", description: "More hosts for the agent to reach directly instead of through the proxy, separated by commas. Always merged with `localhost,127.0.0.1` and any `NO_PROXY` in your environment." },+ { name: "--path", value: "<string>", type: "string", default: "/", description: "The folder to fetch proxied services and secrets from. Without it, the CLI reads `INFISICAL_SECRET_PATH`, then `defaultSecretPath` in `.infisical.json`." },+ { name: "--projectId", value: "<string>", type: "string", required: true, description: "The project to fetch proxied services and secrets from. Can also be set with `INFISICAL_PROJECT_ID`, or read from `.infisical.json`." },+ { name: "--proxy", value: "<string>", type: "string", required: true, description: "The agent proxy's address as `host:port`. Can also be set with `INFISICAL_AGENT_PROXY_ADDRESS`. It's never read from `.infisical.json`." },+ { name: "--token", value: "<string>", type: "string", description: "A machine identity access token to authenticate with, instead of `--client-id` and `--client-secret`. Without it, the CLI reads `INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN`, then `INFISICAL_TOKEN`." },+ ]}+ examples={[+ { title: "Launch an agent behind a proxy", code: "infisical secrets agent-proxy connect --proxy=<proxy-host>:17322 --projectId=<project-id> --env=prod --path=/ai-agents -- claude" },+ { title: "Read the settings from environment variables", code: "export INFISICAL_AGENT_PROXY_ADDRESS=<proxy-host>:17322\nexport INFISICAL_PROJECT_ID=<project-id>\nexport INFISICAL_ENVIRONMENT=prod\ninfisical secrets agent-proxy connect -- claude" },+ { title: "Authenticate as a machine identity", code: "infisical secrets agent-proxy connect \\\n --proxy=<proxy-host>:17322 \\\n --env=prod \\\n --client-id=<client-id> \\\n --client-secret=<client-secret> \\\n -- codex" },+ ]}+>++Launch an agent that sends its requests through an agent proxy on another host, started with [infisical secrets agent-proxy start](/cli/reference#secrets-agent-proxy-start). See [Standalone Agent Proxy](/documentation/platform/agent-proxy/standalone-agent-proxy).++The command authenticates as the agent's machine identity, with `--client-id` and `--client-secret` or a token. It doesn't use your login. It then 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 your organization's root certificate. See [what `connect` puts in the agent's environment](/documentation/platform/agent-proxy/standalone-agent-proxy#what-connect-puts-in-the-agents-environment).++If the agent can read a secret or lease a dynamic secret that a proxied service brokers to it, the command refuses to start, because the agent would get the real value and bypass the proxy.++The command exits with the agent's exit code.++</CLICommand>++<CLICommand+ id="secrets-agent-proxy-run"+ command="secrets agent-proxy run"+ usage="[flags] -- <command>"+ args={[+ { name: "command", usage: "<command>", required: true, description: "The agent's command, after `--`. Everything after `--` is passed to it unchanged." },+ ]}+ flags={[+ { name: "--allow-host", value: "<stringArray>", type: "stringArray", description: "A host the agent can reach, without a credential, when `--unmatched-host=block` is set. Repeatable." },+ { name: "--allow-read", value: "<stringArray>", type: "stringArray", description: "A path the agent can read even though the sandbox blocks it by default, such as `~/.aws/config`. The path stays read-only, and the rest of a denied directory stays denied. Repeatable." },+ { name: "--allow-write", value: "<stringArray>", type: "stringArray", description: "A path the agent can write, beyond the working directory, the temporary directory, and the state directories of Claude Code, Codex, and Gemini CLI. Repeatable." },+ { name: "--env", short: "-e", value: "<string>", type: "string", required: true, description: "The environment to fetch proxied services from. Without it, the CLI reads `INFISICAL_ENVIRONMENT`, then the environment that `.infisical.json` maps to your git branch, then its `defaultEnvironment`." },+ { name: "--log-file", value: "<string>", type: "string", description: "A file to write the proxy's per-request activity to. The file is appended to. Without it, nothing is written, and only warnings and errors print to stderr unless you pass `--log-level`." },+ { name: "--no-sandbox", type: "bool", description: "Run the agent without the OS sandbox. Credentials are still brokered, but the agent can read your files and keyring and reach the network directly." },+ { name: "--pass-env", value: "<stringArray>", type: "stringArray", description: "One of your environment variables to pass through to the agent, by name, when the command would otherwise remove it. Repeatable." },+ { name: "--path", value: "<string>", type: "string", default: "/", description: "The folder to fetch proxied services from. Without it, the CLI reads `INFISICAL_SECRET_PATH`, then `defaultSecretPath` in `.infisical.json`." },+ { name: "--poll-interval", value: "<int>", type: "int", default: "60", description: "The number of seconds between refreshes of permissions and credentials." },+ { name: "--projectId", value: "<string>", type: "string", required: true, description: "The project to fetch proxied services from. Can also be set with `INFISICAL_PROJECT_ID`, or read from `.infisical.json`." },+ { name: "--sandbox", type: "bool", default: "true", description: "Run the agent inside the OS sandbox. Pass `--sandbox=false` or `--no-sandbox` to turn it off. Can also be set with `INFISICAL_AGENT_PROXY_SANDBOX`, where `0`, `false`, or `off` turns it off." },+ { name: "--set-env", value: "<stringArray>", type: "stringArray", description: "An environment variable to set in the agent, as `KEY=VALUE`. It overrides every other value. Repeatable." },+ { name: "--token", value: "<string>", type: "string", description: "A token to broker with, instead of your login. Without it, the CLI reads `INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN`, then `INFISICAL_TOKEN`, then uses your login." },+ { name: "--unmatched-host", value: "<string>", type: "string", default: "allow", description: "What to do with requests to a host that has no proxied service: `allow` forwards them with no credential, and `block` rejects them." },+ ]}+ examples={[+ { title: "Run an agent in the sandbox", code: "infisical secrets agent-proxy run --projectId=<project-id> --env=dev --path=/coding-agent -- claude" },+ { title: "Read the project and environment from .infisical.json", code: "infisical secrets agent-proxy run -- claude" },+ { title: "Allow only proxied services and one registry", code: "infisical secrets agent-proxy run --env=dev --unmatched-host=block --allow-host=registry.npmjs.org -- claude" },+ { title: "Keep a log of proxied requests", code: "infisical secrets agent-proxy run --env=dev --log-file=/tmp/agent-proxy.log -- claude" },+ ]}+>++Launch an agent on your own computer in an OS sandbox, with a proxy that brokers credentials onto its requests. The command starts the proxy, runs the agent, and stops the proxy when the agent exits. It authenticates as your login, or with `--token`. See [Local Agent Proxy](/documentation/platform/agent-proxy/local-agent-proxy).++The [sandbox](/documentation/platform/agent-proxy/local-agent-proxy#the-sandbox) stops the agent from reading credential files such as `~/.ssh` and `~/.aws`. If the host supports it, the sandbox also blocks every network connection except the one to the proxy. The sandbox needs macOS, or Linux with `bubblewrap` installed. On any other system, the command won't start unless you pass `--no-sandbox`.++The agent never gets real secret values or an Infisical token. It gets placeholder values for [proxied services](/documentation/platform/agent-proxy/proxied-services) that substitute credentials into requests. The command [removes variables that look like credentials](/documentation/platform/agent-proxy/local-agent-proxy#environment-scrubbed) from the agent's environment, such as any variable with `TOKEN` or `SECRET` in its name. To keep one of those variables, pass its name to `--pass-env`.++The command always starts its own proxy. To use a proxy on another host, run [infisical secrets agent-proxy connect](/cli/reference#secrets-agent-proxy-connect).++</CLICommand>++<CLICommand+ id="secrets-agent-proxy-start"+ command="secrets agent-proxy start"+ usage="[flags]"+ flags={[+ { name: "--client-id", value: "<string>", type: "string", required: true, description: "The client ID of the proxy's machine identity. Can also be set with `INFISICAL_UNIVERSAL_AUTH_CLIENT_ID`." },+ { name: "--client-secret", value: "<string>", type: "string", required: true, description: "The client secret of the proxy's machine identity. Can also be set with `INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET`." },+ { name: "--log-file", value: "<string>", type: "string", description: "A file to also write logs to, as JSON lines. The file is appended to." },+ { name: "--log-format", value: "<string>", type: "string", default: "console", description: "The format of the logs written to stderr: `console` or `json`." },+ { name: "--poll-interval", value: "<int>", type: "int", default: "60", description: "The number of seconds between refreshes of permissions and credentials for active agents." },+ { name: "--port", value: "<int>", type: "int", default: "17322", description: "The port to listen on, on all interfaces." },+ { name: "--unmatched-host", value: "<string>", type: "string", default: "allow", description: "What to do with requests to a host that has no proxied service: `allow` forwards them with no credential, and `block` rejects them. `block` also rejects requests to your Infisical instance." },+ ]}+ examples={[+ { title: "Start the proxy", code: "infisical secrets agent-proxy start --client-id=<client-id> --client-secret=<client-secret>" },+ { title: "Block hosts with no proxied service", code: "infisical secrets agent-proxy start --port=17322 --unmatched-host=block" },+ { title: "Log JSON to a file", code: "infisical secrets agent-proxy start --log-format=json --log-file=/var/log/infisical/agent-proxy.log" },+ ]}+>++Start an agent proxy in the foreground, for agents on other hosts to connect to with [infisical secrets agent-proxy connect](/cli/reference#secrets-agent-proxy-connect). See [Standalone Agent Proxy](/documentation/platform/agent-proxy/standalone-agent-proxy).++The proxy authenticates as its own machine identity, which needs read access to the secrets your proxied services reference, and renews its access token as it runs. The proxy logs brokered requests at `info` and blocked requests at `warn`. To also see requests passed through without a credential, pass `--log-level=debug`.++</CLICommand>++<CLICommand+ id="secrets-delete"+ command="secrets delete"+ usage="<name>... [flags]"+ args={[+ { name: "name", usage: "<name>...", required: true, repeatable: true, description: "The names of the secrets to delete." },+ ]}+ flags={[+ { name: "--output", short: "-o", value: "<string>", type: "string", description: "Print the result as `json`, `yaml`, or `dotenv` instead of a table." },+ { name: "--path", value: "<string>", type: "string", default: "/", description: "The folder to delete from." },+ { name: "--projectId", value: "<string>", type: "string", description: "The project to delete from. Required when you authenticate with a machine identity. Can also be set with `INFISICAL_PROJECT_ID`." },+ { name: "--token", value: "<string>", type: "string", description: "A machine identity access token to authenticate with, instead of your login. Without it, the CLI reads `INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN`, then `INFISICAL_TOKEN`." },+ { name: "--type", value: "<string>", type: "string", default: "personal", description: "Which secrets to delete: `personal` or `shared`." },+ ]}+ inheritedFlags={[+ { name: "--env", value: "<string>", type: "string", default: "dev", description: "The environment to delete from." },+ ]}+ examples={[+ { title: "Delete two shared secrets", code: `infisical secrets delete STRIPE_API_KEY DOMAIN --type=shared` },+ { title: "Remove your personal override of a secret", code: `infisical secrets delete API_URL` },+ ]}+>++Delete secrets by name.++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.++</CLICommand>++<CLICommand+ id="secrets-folders"+ command="secrets folders"+ flags={[+ { name: "--env", value: "<string>", type: "string", default: "dev", description: "The environment to work in. Every `infisical secrets folders` subcommand accepts it." },+ ]}+ inheritedFlags={[+ { name: "--tags", short: "-t", value: "<string>", type: "string", description: "Has no effect on folder commands." },+ ]}+>++Create, delete, and list the folders in an environment. Folders organize an environment's secrets into paths such as `/backend/api`.++</CLICommand>++<CLICommand+ id="secrets-folders-create"+ command="secrets folders create"+ usage="[flags]"+ flags={[+ { name: "--name", short: "-n", value: "<string>", type: "string", required: true, description: "The name of the folder to create." },+ { name: "--output", short: "-o", value: "<string>", type: "string", description: "Print the result as `json`, `yaml`, or `dotenv` instead of a table." },+ { name: "--path", short: "-p", value: "<string>", type: "string", default: "/", description: "The folder to create the new folder in." },+ { name: "--projectId", value: "<string>", type: "string", description: "The project to create the folder in. Required when you authenticate with a machine identity. Can also be set with `INFISICAL_PROJECT_ID`." },+ { name: "--token", value: "<string>", type: "string", description: "A machine identity access token to authenticate with, instead of your login. Without it, the CLI reads `INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN`, then `INFISICAL_TOKEN`." },+ ]}+ inheritedFlags={[+ { name: "--env", value: "<string>", type: "string", default: "dev", description: "The environment to create the folder in." },+ ]}+ examples={[+ { title: "Create a folder", code: `infisical secrets folders create --path=/backend --name=api` },+ ]}+>++Create a folder named `--name` inside `--path`.++</CLICommand>++<CLICommand+ id="secrets-folders-delete"+ command="secrets folders delete"+ usage="[flags]"+ flags={[+ { name: "--name", short: "-n", value: "<string>", type: "string", required: true, description: "The name of the folder to delete." },+ { name: "--output", short: "-o", value: "<string>", type: "string", description: "Print the result as `json`, `yaml`, or `dotenv` instead of a table." },+ { name: "--path", short: "-p", value: "<string>", type: "string", default: "/", description: "The folder that contains the folder to delete." },+ { name: "--projectId", value: "<string>", type: "string", description: "The project to delete the folder from. Required when you authenticate with a machine identity. Can also be set with `INFISICAL_PROJECT_ID`." },+ { name: "--token", value: "<string>", type: "string", description: "A machine identity access token to authenticate with, instead of your login. Without it, the CLI reads `INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN`, then `INFISICAL_TOKEN`." },+ ]}+ inheritedFlags={[+ { name: "--env", value: "<string>", type: "string", default: "dev", description: "The environment to delete the folder from." },+ ]}+ examples={[+ { title: "Delete a folder", code: `infisical secrets folders delete --path=/backend --name=api` },+ ]}+>++Delete the folder named `--name` inside `--path`.++</CLICommand>++<CLICommand+ id="secrets-folders-get"+ command="secrets folders get"+ usage="[flags]"+ flags={[+ { name: "--output", short: "-o", value: "<string>", type: "string", description: "Print the folders as `json`, `yaml`, or `dotenv` instead of a table." },+ { name: "--path", short: "-p", value: "<string>", type: "string", default: "/", description: "The folder to list folders from." },+ { name: "--projectId", value: "<string>", type: "string", description: "The project to list folders from. Required when you authenticate with a machine identity. Can also be set with `INFISICAL_PROJECT_ID`." },+ { name: "--token", value: "<string>", type: "string", description: "A machine identity access token to authenticate with, instead of your login. Without it, the CLI reads `INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN`, then `INFISICAL_TOKEN`." },+ ]}+ inheritedFlags={[+ { name: "--env", value: "<string>", type: "string", default: "dev", description: "The environment to list folders from." },+ ]}+ examples={[+ { title: "List the folders at the root", code: `infisical secrets folders get` },+ { title: "List the folders under a path in production", code: `infisical secrets folders get --env=prod --path=/backend` },+ ]}+>++List the folders inside `--path`.++</CLICommand>++<CLICommand+ id="secrets-generate-example-env"+ command="secrets generate-example-env"+ usage="[flags]"+ flags={[+ { name: "--path", value: "<string>", type: "string", default: "/", description: "The folder to read secrets from." },+ { name: "--projectId", value: "<string>", type: "string", description: "The project to read secrets from. Required when you authenticate with a machine identity. Can also be set with `INFISICAL_PROJECT_ID`." },+ { name: "--token", value: "<string>", type: "string", description: "A machine identity access token to authenticate with, instead of your login. Without it, the CLI reads `INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN`, then `INFISICAL_TOKEN`." },+ ]}+ inheritedFlags={[+ { name: "--env", value: "<string>", type: "string", default: "dev", description: "The environment to read secrets from." },+ { name: "--tags", short: "-t", value: "<string>", type: "string", description: "Only include secrets with these tag slugs, separated by commas." },+ ]}+ examples={[+ { title: "Write an example .env file", code: `infisical secrets generate-example-env > .env.example` },+ ]}+>++Print an example `.env` file that lists every secret's name without its value, for people who work on the project without Infisical.++Each secret's comment in Infisical appears as a comment above it. To give a secret an example value, add `DEFAULT:<value>` to the end of its comment.++</CLICommand>++<CLICommand+ id="secrets-get"+ command="secrets get"+ usage="<name>... [flags]"+ args={[+ { name: "name", usage: "<name>...", required: true, repeatable: true, description: "The names of the secrets to print." },+ ]}+ flags={[+ { name: "--expand", type: "bool", default: "true", description: "Resolve secret references and shell parameter expansions in secret values." },+ { name: "--include-imports", type: "bool", default: "true", description: "Also look for the names among secrets imported from other environments or folders." },+ { name: "--output", short: "-o", value: "<string>", type: "string", description: "Print the secrets as `json`, `yaml`, or `dotenv` instead of a table." },+ { name: "--path", value: "<string>", type: "string", default: "/", description: "The folder to read from." },+ { name: "--plain", type: "bool", description: "Print only the values, one per line." },+ { name: "--projectId", value: "<string>", type: "string", description: "The project to read from. Required when you authenticate with a machine identity. Can also be set with `INFISICAL_PROJECT_ID`." },+ { name: "--recursive", type: "bool", description: "Also look for the names in every subfolder of `--path`." },+ { name: "--secret-overriding", type: "bool", default: "true", description: "Return your personal secret in place of a shared secret with the same name. Pass `--secret-overriding=false` to return only shared secrets." },+ { name: "--token", value: "<string>", type: "string", description: "A machine identity access token to authenticate with, instead of your login. Without it, the CLI reads `INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN`, then `INFISICAL_TOKEN`." },+ ]}+ inheritedFlags={[+ { name: "--env", value: "<string>", type: "string", default: "dev", description: "The environment to read from." },+ { name: "--tags", short: "-t", value: "<string>", type: "string", description: "Only return secrets with these tag slugs, separated by commas." },+ ]}+ examples={[+ { title: "Show two secrets", code: `infisical secrets get DOMAIN PORT` },+ { title: "Read a value into a variable", code: `API_KEY=$(infisical secrets get API_KEY --plain --silent)` },+ { title: "Print production secrets as JSON", code: `infisical secrets get DB_HOST DB_PASSWORD --env=prod --output=json` },+ ]}+>++Print the secrets you name. A name that doesn't exist prints as `*not found*`.++In scripts, pass `--plain --silent` to print only the values, with no other output.++</CLICommand>++<CLICommand+ id="secrets-set"+ command="secrets set"+ usage="[name=value]... [flags]"+ args={[+ { name: "name=value", usage: "[name=value]...", repeatable: true, description: "A secret to create or update. Use `name=@path/to/file` to read the value from a file, and `name=\\@value` for a value that starts with `@`. Required unless you pass `--file`." },+ ]}+ flags={[+ { name: "--file", value: "<string>", type: "string", description: "A `.env` or YAML file to read secrets from, instead of arguments. Lines starting with `#` or `//` are comments." },+ { name: "--output", short: "-o", value: "<string>", type: "string", description: "Print the result as `json`, `yaml`, or `dotenv` instead of a table." },+ { name: "--path", value: "<string>", type: "string", default: "/", description: "The folder to write to." },+ { name: "--projectId", value: "<string>", type: "string", description: "The project to write to. Required when you authenticate with a machine identity. Can also be set with `INFISICAL_PROJECT_ID`." },+ { name: "--show-values", type: "bool", description: "Show secret values in the result table instead of masking them." },+ { name: "--tag", value: "<stringArray>", type: "stringArray", description: "A tag to attach, created if it doesn't exist. Repeat the flag for several tags. When you update a secret, these tags replace its existing ones." },+ { name: "--token", value: "<string>", type: "string", description: "A machine identity access token to authenticate with, instead of your login. Without it, the CLI reads `INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN`, then `INFISICAL_TOKEN`." },+ { name: "--type", value: "<string>", type: "string", default: "shared", description: "`shared` for secrets everyone on the project sees, or `personal` for secrets that override them only for you." },+ ]}+ inheritedFlags={[+ { name: "--env", value: "<string>", type: "string", default: "dev", description: "The environment to write to." },+ { name: "--tags", short: "-t", value: "<string>", type: "string", description: "Has no effect on this command. Use `--tag` to attach tags." },+ ]}+ examples={[+ { title: "Set two secrets", code: `infisical secrets set DOMAIN=example.com PORT=443` },+ { title: "Load a value from a file", code: `infisical secrets set TLS_CERT=@./cert.pem --env=prod` },+ { title: "Import a .env file", code: `infisical secrets set --file=./.env` },+ { title: "Override a secret only for yourself", code: `infisical secrets set API_URL=http://localhost:3000 --type=personal` },+ ]}+>++Create secrets, or update the value of secrets that already exist. 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](/cli/faq).++</CLICommand>++<CLICommand+ id="service-token"+ command="service-token"+>++Manage service tokens. Service tokens are deprecated and will be removed in a future release. Use a [machine identity](/documentation/platform/identities/machine-identities) instead, and log in as it with [infisical login](/cli/reference#login).++</CLICommand>++<CLICommand+ id="service-token-create"+ command="service-token create"+ usage="[flags]"+ flags={[+ { name: "--access-level", short: "-a", value: "<stringSlice>", type: "stringSlice", required: true, description: "What the token can do: `read`, `write`, or both. Repeat the flag or separate the values with commas." },+ { name: "--expiry-seconds", short: "-e", value: "<int>", type: "int", default: "86400", description: "How long the token lasts, in seconds from now. Pass `0` for a token that never expires." },+ { name: "--name", short: "-n", value: "<string>", type: "string", default: "Service token generated via CLI", description: "The token's name." },+ { name: "--projectId", value: "<string>", type: "string", description: "The project to create the token for. Without it, the CLI uses the project in `.infisical.json`. Can also be set with `INFISICAL_PROJECT_ID`." },+ { name: "--scope", short: "-s", value: "<stringSlice>", type: "stringSlice", required: true, description: "An environment and folder the token can access, as `<env-slug>:<folder-path>`, such as `dev:/backend`. The folder path can be a glob pattern. Repeat the flag for several scopes." },+ { name: "--token-only", type: "bool", description: "Print only the token, to standard output, with no other details." },+ ]}+ examples={[+ { title: "Create a read-only token for two folders", code: "infisical service-token create --scope=dev:/global --scope=dev:/backend --access-level=read" },+ { title: "Create a read and write token that never expires", code: "infisical service-token create --scope='prod:/**' --access-level=read,write --expiry-seconds=0" },+ { title: "Capture the token in a variable", code: "TOKEN=$(infisical service-token create --scope=dev:/ --access-level=read --token-only)" },+ ]}+>++Create a service token for a project with your user login. Service tokens are deprecated; create a [machine identity](/documentation/platform/identities/machine-identities) instead.++Without `--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.++</CLICommand>++<CLICommand+ id="ssh"+ command="ssh"+>++<Warning>+Infisical SSH has been removed, so these commands no longer work. SSH access is now part of Infisical PAM: set up an [SSH account](/documentation/platform/pam/accounts/ssh), then connect to it with [infisical pam access](/cli/reference#pam-access).+</Warning>++</CLICommand>++<CLICommand+ id="ssh-add-host"+ command="ssh add-host"+ usage="[flags]"+ flags={[+ { name: "--alias", value: "<string>", type: "string", description: "A friendly name for the host, shown instead of the hostname when `infisical ssh connect` asks you to pick one." },+ { name: "--configure-sshd", type: "bool", description: "Add `TrustedUserCAKeys`, `HostKey`, and `HostCertificate` entries to `/etc/ssh/sshd_config`. Requires `--write-user-ca-to-file` and `--write-host-cert-to-file`. The command doesn't restart `sshd`." },+ { name: "--force", type: "bool", description: "Overwrite the user CA file, the host certificate, and existing `sshd_config` entries instead of stopping when they already exist." },+ { name: "--hostname", value: "<string>", type: "string", required: true, description: "The host's hostname." },+ { name: "--projectId", value: "<string>", type: "string", required: true, description: "The project to register the host in. Can also be set with `INFISICAL_PROJECT_ID`." },+ { name: "--token", value: "<string>", type: "string", description: "A machine identity access token to authenticate with, instead of your login. Without it, the CLI reads `INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN`, then `INFISICAL_TOKEN`." },+ { name: "--user-ca-out-file-path", value: "<string>", type: "string", default: "/etc/ssh/infisical_user_ca.pub", description: "The file to write the user CA public key to, with `--write-user-ca-to-file`." },+ { name: "--write-host-cert-to-file", type: "bool", description: "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`, checking `ed25519`, then `ecdsa`, then `rsa`." },+ { name: "--write-user-ca-to-file", type: "bool", description: "Write the public key of the CA that signs user certificates to `--user-ca-out-file-path`, so `sshd` can trust certificates issued for this host." },+ ]}+>++<Warning>+Removed along with Infisical SSH, so this command no longer works. See [infisical ssh](/cli/reference#ssh).+</Warning>++</CLICommand>++<CLICommand+ id="ssh-connect"+ command="ssh connect"+ usage="[flags]"+ flags={[+ { name: "--hostname", value: "<string>", type: "string", description: "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." },+ { name: "--login-user", value: "<string>", type: "string", description: "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." },+ { name: "--out-file-path", value: "<string>", type: "string", description: "Write the private key, public key, and certificate to files instead of connecting. Pass a directory to name them `id_ed25519`, `id_ed25519.pub`, and `id_ed25519-cert.pub`, or a path ending in `-cert.pub` to name the certificate, with the keys next to it." },+ { name: "--token", value: "<string>", type: "string", description: "A machine identity access token to authenticate with, instead of your login. Without it, the CLI reads `INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN`, then `INFISICAL_TOKEN`." },+ { name: "--write-host-ca-to-file", type: "bool", default: "true", description: "Add the host CA's public key to `~/.ssh/known_hosts` as a `@cert-authority` entry for the host, if it isn't there yet. Pass `--write-host-ca-to-file=false` to leave `known_hosts` unchanged." },+ ]}+>++<Warning>+Removed along with Infisical SSH, so this command no longer works. To reach SSH hosts through Infisical, use [infisical pam access](/cli/reference#pam-access). See [infisical ssh](/cli/reference#ssh).+</Warning>++</CLICommand>++<CLICommand+ id="ssh-issue-credentials"+ command="ssh issue-credentials"+ usage="[flags]"+ flags={[+ { name: "--addToAgent", type: "bool", description: "Add the issued key and certificate to your SSH agent. Needs `SSH_AUTH_SOCK` to be set. Pass this, `--outFilePath`, or both." },+ { name: "--certType", value: "<string>", type: "string", default: "user", description: "The kind of certificate to issue: `user` or `host`." },+ { name: "--certificateTemplateId", value: "<string>", type: "string", required: true, description: "The ID of the SSH certificate template to issue against." },+ { name: "--keyAlgorithm", value: "<string>", type: "string", default: "RSA_2048", description: "The algorithm of the key pair to generate: `RSA_2048`, `RSA_4096`, `EC_prime256v1`, or `EC_secp384r1`." },+ { name: "--keyId", value: "<string>", type: "string", description: "The key ID to put in the certificate." },+ { name: "--outFilePath", value: "<string>", type: "string", description: "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 as `id_rsa_2048`, `id_rsa_2048.pub`, and `id_rsa_2048-cert.pub`. Pass this, `--addToAgent`, or both." },+ { name: "--principals", value: "<string>", type: "string", required: true, description: "The principals to issue the certificate for, separated by commas." },+ { name: "--token", value: "<string>", type: "string", description: "A machine identity access token to authenticate with, instead of your login. Without it, the CLI reads `INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN`, then `INFISICAL_TOKEN`." },+ { name: "--ttl", value: "<string>", type: "string", description: "How long the certificate is valid for. Without it, the certificate template's default applies." },+ ]}+>++<Warning>+Removed along with Infisical SSH, so this command no longer works. See [infisical ssh](/cli/reference#ssh).+</Warning>++</CLICommand>++<CLICommand+ id="ssh-sign-key"+ command="ssh sign-key"+ usage="[flags]"+ flags={[+ { name: "--certType", value: "<string>", type: "string", default: "user", description: "The kind of certificate to issue: `user` or `host`." },+ { name: "--certificateTemplateId", value: "<string>", type: "string", required: true, description: "The ID of the SSH certificate template to sign against." },+ { name: "--keyId", value: "<string>", type: "string", description: "The key ID to put in the certificate." },+ { name: "--outFilePath", value: "<string>", type: "string", description: "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 `.pub` replaced by `-cert.pub`." },+ { name: "--principals", value: "<string>", type: "string", required: true, description: "The principals to sign the certificate for, separated by commas." },+ { name: "--publicKey", value: "<string>", type: "string", description: "The public key to sign, as text. Pass this or `--publicKeyFilePath`, not both." },+ { name: "--publicKeyFilePath", value: "<string>", type: "string", description: "The path to the public key file to sign. It must end in `.pub`. Pass this or `--publicKey`, not both." },+ { name: "--token", value: "<string>", type: "string", description: "A machine identity access token to authenticate with, instead of your login. Without it, the CLI reads `INFISICAL_UNIVERSAL_AUTH_ACCESS_TOKEN`, then `INFISICAL_TOKEN`." },+ { name: "--ttl", value: "<string>", type: "string", description: "How long the certificate is valid for. Without it, the certificate template's default applies." },+ ]}+>++<Warning>+Removed along with Infisical SSH, so this command no longer works. See [infisical ssh](/cli/reference#ssh).+</Warning>++</CLICommand>++<CLICommand+ id="token"+ command="token"+>++Manage machine identity access tokens. The only subcommand is [infisical token renew](/cli/reference#token-renew).++</CLICommand>++<CLICommand+ id="token-renew"+ command="token renew"+ usage="<token>"+ args={[+ { name: "token", usage: "<token>", required: true, description: "The machine identity access token to renew." },+ ]}+ examples={[+ { title: "Renew an access token", code: "infisical token renew <access-token>" },+ { title: "Renew a token on another instance", code: "infisical token renew <access-token> --domain=https://eu.infisical.com" },+ ]}+>++Renew a machine identity access token, such as one printed by `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`.++</CLICommand>++<CLICommand+ id="user"+ command="user"+>++Print a profile's session token, pick the default profile from a list, or move a profile to another instance. For everything else, use [infisical profile](/cli/reference#profile).++</CLICommand>++<CLICommand+ id="user-get"+ command="user get"+>++Print details of a login profile. The only subcommand is [infisical user get token](/cli/reference#user-get-token).++</CLICommand>++<CLICommand+ id="user-get-token"+ command="user get token"+ usage="[flags]"+ flags={[+ { name: "--plain", type: "bool", description: "Print only the access token, with no labels, session ID, or expiry." },+ ]}+ examples={[+ { title: "Show the session token and its expiry", code: "infisical user get token" },+ { title: "Capture the token in a variable", code: "TOKEN=$(infisical user get token --plain)" },+ { title: "Get the token of a specific profile", code: "infisical user get token --profile acme --plain" },+ ]}+>++Print the access token of the profile in effect, along with its session ID, expiry time, and remaining lifetime. Pass `--profile` to read another profile's token, or `--org` to get a token for a different organization. See [infisical profile](/cli/reference#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.++</CLICommand>++<CLICommand+ id="user-switch"+ command="user switch"+ examples={[+ { title: "Pick the default profile from a list", code: "infisical user switch" },+ ]}+>++Pick the machine's default profile from a list of your profiles, each shown with its account, organization, and instance. This does the same as [infisical profile use](/cli/reference#profile-use), which takes the profile name instead of asking.++A terminal pinned with [infisical profile pin](/cli/reference#profile-pin) or a directory bound with [infisical profile bind](/cli/reference#profile-bind) keeps using its own profile.++</CLICommand>++<CLICommand+ id="user-update"+ command="user update"+>++Change a login profile. The only subcommand is [infisical user update domain](/cli/reference#user-update-domain).++</CLICommand>++<CLICommand+ id="user-update-domain"+ command="user update domain"+ examples={[+ { title: "Move a profile to another instance", code: "infisical user update domain" },+ ]}+>++Point a profile at a different Infisical instance, such as moving it from Infisical Cloud to your self-hosted instance. The command asks which profile to change, then for the new instance's URL. Only the profile you pick changes, even when other profiles use the same account and instance.++A session issued by the old instance isn't valid on the new one, so the CLI clears the profile's stored credentials and its organization. Sign in again with `infisical login --profile <name> --domain <url>`.++</CLICommand>++<CLICommand+ id="vault"+ command="vault"+ examples={[+ { title: "Show the vault in use", code: "infisical vault" },+ ]}+>++Show where the CLI stores your login credentials, and list the vaults you can switch to with [infisical vault set](/cli/reference#vault-set).++There are two vaults. `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`.++</CLICommand>++<CLICommand+ id="vault-set"+ command="vault set"+ usage="<vault>"+ args={[+ { name: "vault", usage: "<vault>", required: true, description: "The vault to store credentials in: `auto` for the system keyring, or `file` for an encrypted file." },+ ]}+ examples={[+ { title: "Store credentials in an encrypted file", code: "infisical vault set file" },+ { title: "Go back to the system keyring", code: "infisical vault set auto" },+ ]}+>++Change where the CLI stores your login credentials. See [infisical vault](/cli/reference#vault) for what each vault is.++Credentials in the previous vault can't be read from the new one, so switching removes every profile, the default profile, and every directory binding. Log in again with [infisical login](/cli/reference#login) afterwards. Credentials already in the previous vault aren't deleted.++</CLICommand>++</CLIPage>diff --git a/docs/cli/reference/agent-vault.mdx b/docs/cli/reference/agent-vault.mdxnew file mode 100644index 0000000000..f7799d57b6--- /dev/null+++ b/docs/cli/reference/agent-vault.mdx@@ -0,0 +1,4 @@+---+title: "infisical agent-vault"+url: "/cli/reference#agent-vault"+---diff --git a/docs/cli/reference/agent.mdx b/docs/cli/reference/agent.mdxnew file mode 100644index 0000000000..dc2b4c343c--- /dev/null+++ b/docs/cli/reference/agent.mdx@@ -0,0 +1,4 @@+---+title: "infisical agent"+url: "/cli/reference#agent"+---diff --git a/docs/cli/reference/bootstrap.mdx b/docs/cli/reference/bootstrap.mdxnew file mode 100644index 0000000000..760d865650--- /dev/null+++ b/docs/cli/reference/bootstrap.mdx@@ -0,0 +1,4 @@+---+title: "infisical bootstrap"+url: "/cli/reference#bootstrap"+---diff --git a/docs/cli/reference/cert-manager.mdx b/docs/cli/reference/cert-manager.mdxnew file mode 100644index 0000000000..d135158d8b--- /dev/null+++ b/docs/cli/reference/cert-manager.mdx@@ -0,0 +1,4 @@+---+title: "infisical cert-manager"+url: "/cli/reference#cert-manager"+---diff --git a/docs/cli/reference/dynamic-secrets.mdx b/docs/cli/reference/dynamic-secrets.mdxnew file mode 100644index 0000000000..b883b885b7--- /dev/null+++ b/docs/cli/reference/dynamic-secrets.mdx@@ -0,0 +1,4 @@+---+title: "infisical dynamic-secrets"+url: "/cli/reference#dynamic-secrets"+---diff --git a/docs/cli/reference/export.mdx b/docs/cli/reference/export.mdxnew file mode 100644index 0000000000..8bbe7a63de--- /dev/null+++ b/docs/cli/reference/export.mdx@@ -0,0 +1,4 @@+---+title: "infisical export"+url: "/cli/reference#export"+---diff --git a/docs/cli/reference/gateway.mdx b/docs/cli/reference/gateway.mdxnew file mode 100644index 0000000000..812034ad59--- /dev/null+++ b/docs/cli/reference/gateway.mdx@@ -0,0 +1,4 @@+---+title: "infisical gateway"+url: "/cli/reference#gateway"+---diff --git a/docs/cli/reference/global-flags.mdx b/docs/cli/reference/global-flags.mdxnew file mode 100644index 0000000000..ae94d2bdd8--- /dev/null+++ b/docs/cli/reference/global-flags.mdx@@ -0,0 +1,4 @@+---+title: "Global flags"+url: "/cli/reference#global-flags"+---diff --git a/docs/cli/reference/init.mdx b/docs/cli/reference/init.mdxnew file mode 100644index 0000000000..a5fd4667b6--- /dev/null+++ b/docs/cli/reference/init.mdx@@ -0,0 +1,4 @@+---+title: "infisical init"+url: "/cli/reference#init"+---diff --git a/docs/cli/reference/kmip.mdx b/docs/cli/reference/kmip.mdxnew file mode 100644index 0000000000..5108db88e0--- /dev/null+++ b/docs/cli/reference/kmip.mdx@@ -0,0 +1,4 @@+---+title: "infisical kmip"+url: "/cli/reference#kmip"+---diff --git a/docs/cli/reference/login.mdx b/docs/cli/reference/login.mdxnew file mode 100644index 0000000000..b046cddd07--- /dev/null+++ b/docs/cli/reference/login.mdx@@ -0,0 +1,4 @@+---+title: "infisical login"+url: "/cli/reference#login"+---diff --git a/docs/cli/reference/logout.mdx b/docs/cli/reference/logout.mdxnew file mode 100644index 0000000000..ed855ccc69--- /dev/null+++ b/docs/cli/reference/logout.mdx@@ -0,0 +1,4 @@+---+title: "infisical logout"+url: "/cli/reference#logout"+---diff --git a/docs/cli/reference/org.mdx b/docs/cli/reference/org.mdxnew file mode 100644index 0000000000..5b41d0e01f--- /dev/null+++ b/docs/cli/reference/org.mdx@@ -0,0 +1,4 @@+---+title: "infisical org"+url: "/cli/reference#org"+---diff --git a/docs/cli/reference/pam.mdx b/docs/cli/reference/pam.mdxnew file mode 100644index 0000000000..36894a7a28--- /dev/null+++ b/docs/cli/reference/pam.mdx@@ -0,0 +1,4 @@+---+title: "infisical pam"+url: "/cli/reference#pam"+---diff --git a/docs/cli/reference/profile.mdx b/docs/cli/reference/profile.mdxnew file mode 100644index 0000000000..5ee303fbad--- /dev/null+++ b/docs/cli/reference/profile.mdx@@ -0,0 +1,4 @@+---+title: "infisical profile"+url: "/cli/reference#profile"+---diff --git a/docs/cli/reference/proxy.mdx b/docs/cli/reference/proxy.mdxnew file mode 100644index 0000000000..bd74d6b49a--- /dev/null+++ b/docs/cli/reference/proxy.mdx@@ -0,0 +1,4 @@+---+title: "infisical proxy"+url: "/cli/reference#proxy"+---diff --git a/docs/cli/reference/relay.mdx b/docs/cli/reference/relay.mdxnew file mode 100644index 0000000000..aad38cc900--- /dev/null+++ b/docs/cli/reference/relay.mdx@@ -0,0 +1,4 @@+---+title: "infisical relay"+url: "/cli/reference#relay"+---diff --git a/docs/cli/reference/reset.mdx b/docs/cli/reference/reset.mdxnew file mode 100644index 0000000000..1eb8a21e57--- /dev/null+++ b/docs/cli/reference/reset.mdx@@ -0,0 +1,4 @@+---+title: "infisical reset"+url: "/cli/reference#reset"+---diff --git a/docs/cli/reference/run.mdx b/docs/cli/reference/run.mdxnew file mode 100644index 0000000000..1c29bfb319--- /dev/null+++ b/docs/cli/reference/run.mdx@@ -0,0 +1,4 @@+---+title: "infisical run"+url: "/cli/reference#run"+---diff --git a/docs/cli/reference/scan.mdx b/docs/cli/reference/scan.mdxnew file mode 100644index 0000000000..1e26ac0908--- /dev/null+++ b/docs/cli/reference/scan.mdx@@ -0,0 +1,4 @@+---+title: "infisical scan"+url: "/cli/reference#scan"+---diff --git a/docs/cli/reference/secrets.mdx b/docs/cli/reference/secrets.mdxnew file mode 100644index 0000000000..3b7874f2ef--- /dev/null+++ b/docs/cli/reference/secrets.mdx@@ -0,0 +1,4 @@+---+title: "infisical secrets"+url: "/cli/reference#secrets"+---diff --git a/docs/cli/reference/service-token.mdx b/docs/cli/reference/service-token.mdxnew file mode 100644index 0000000000..e49cc78bc2--- /dev/null+++ b/docs/cli/reference/service-token.mdx@@ -0,0 +1,4 @@+---+title: "infisical service-token"+url: "/cli/reference#service-token"+---diff --git a/docs/cli/reference/ssh.mdx b/docs/cli/reference/ssh.mdxnew file mode 100644index 0000000000..6f8320773f--- /dev/null+++ b/docs/cli/reference/ssh.mdx@@ -0,0 +1,4 @@+---+title: "infisical ssh"+url: "/cli/reference#ssh"+---diff --git a/docs/cli/reference/token.mdx b/docs/cli/reference/token.mdxnew file mode 100644index 0000000000..deacd19912--- /dev/null+++ b/docs/cli/reference/token.mdx@@ -0,0 +1,4 @@+---+title: "infisical token"+url: "/cli/reference#token"+---diff --git a/docs/cli/reference/user.mdx b/docs/cli/reference/user.mdxnew file mode 100644index 0000000000..641be52bb8--- /dev/null+++ b/docs/cli/reference/user.mdx@@ -0,0 +1,4 @@+---+title: "infisical user"+url: "/cli/reference#user"+---diff --git a/docs/cli/reference/vault.mdx b/docs/cli/reference/vault.mdxnew file mode 100644index 0000000000..f29fe5af6a--- /dev/null+++ b/docs/cli/reference/vault.mdx@@ -0,0 +1,4 @@+---+title: "infisical vault"+url: "/cli/reference#vault"+---diff --git a/docs/cli/scanning-overview.mdx b/docs/cli/scanning-overview.mdxdeleted file mode 100644index 55afe7f619..0000000000--- a/docs/cli/scanning-overview.mdx+++ /dev/null@@ -1,245 +0,0 @@-----title: 'Secret scanning'-description: "Scan and prevent secret leaks in your code base"------Building upon its core functionality of fetching and injecting secrets into your applications, Infisical now takes a significant step forward in bolstering your code security.-We've enhanced our CLI tool to include a powerful scanning feature, capable of identifying more than 140 different types of secret leaks in your codebase.-In addition to scanning for past leaks, this new addition also actively aids in preventing future leaks.--# Scanning-<Tabs>- <Tab title="Scanning files, directories and or git history">- ```bash- infisical scan-- # Display the full secret findings- infisical scan --verbose- ```-- The `infisical scan` command serves to scan repositories, directories, and files. It's compatible with both individual developer machines and Continuous Integration (CI) environments.-- When you run `infisical scan` on a Git repository, Infisical will parses the output of a `git log -p` command. This command generates [patches](https://stackoverflow.com/questions/8279602/what-is-a-patch-in-git-version-control) that Infisical uses to identify secrets in your code.- You can configure the range of commits that `git log` will cover using the `--log-opts` flag.- Any options you can use with `git log -p` are valid for `--log-opts`.-- For instance, to instruct Infisical to scan a specific range of commits, use the following command: `infisical scan --log-opts="--all commitA..commitB"`. For more details, refer to the [Git log documentation](https://git-scm.com/docs/git-log).-- To scan individual files and directories, use the `--no-git` flag.-- **View [full details for this command](./commands/scan)**- </Tab>- <Tab title="Scanning uncommitted files ">- ```bash- infisical scan git-changes-- # Display the full secret findings- infisical scan git-changes --verbose- ```-- Scanning for secrets before you commit your changes is great way to prevent leaks. Infisical makes this easy with the sub command `git-changes`.-- The `git-changes` scans for uncommitted changes in a Git repository, and is especially designed for use on developer machines, aligning with the ['shift left'](https://cloud.google.com/architecture/devops/devops-tech-shifting-left-on-security) security approach.- When `git-changes` is run on a Git repository, Infisical parses the output from a `git diff` command.-- To scan changes in commits that have been staged via `git add`, you can add the `--staged` flag to the sub command. This flag is particularly useful when using Infisical CLI as a pre-commit tool.-- **View [full details for this command](./commands/scan-git-changes)**- - <Info>- `git-changes` command is only for Git repositories; using it on files or directories will result in an error.- </Info>- </Tab>-</Tabs>--#-#-# Automatically scan changes before you commit--To lower the risk of committing hardcoded secrets to your code repository, we have designed a custom git pre-commit hook.-This hook scans the changes you're about to commit for any exposed secrets. If any hardcoded secrets are detected, it will block your commit.--### Install pre-commit hook--To install this git hook, go into your local git repository and run the following command.--```bash-infisical scan install --pre-commit-hook-```--To disable this hook after installing it, run the command `git config --bool hooks.infisical-scan false`--### Third party hooks management-If you would rather handle your pre-commit hook outside of the standard `.git/hooks` directory, you can quickly achieve this by adding the following command into your pre-commit script.-For instance, if you utilize [Husky](https://typicode.github.io/husky/) for managing your Git hooks, you can insert the command provided below into your `.husky/pre-commit` file.--```bash-infisical scan git-changes --staged --verbose-```--#-#-# Creating a baseline--When scanning large repositories or repositories with a long history, it can be helpful to use a baseline.--A baseline allows Infisical to ignore any old findings that are already present in the baseline findings. You can create a infisical scan report by running `infisical scan` with the `--report-path` flag.--To create a Infisical scan report and save it in a file called leaks-report.json, use the following command:--```-infisical scan --report-path leaks-report.json-```--Once a baseline is created, you can apply it when running the `infisical scan` command again. Use the following command:--```-infisical scan --baseline-path leaks-report.json --report-path findings.json-```--After running the `scan` command with the `--baseline-path` flag, the report output in findings.json will only contain new issues.--#-#-# Configuration file--To customize the scan, such as specifying your own rules or establishing exceptions for certain files or paths that shouldn't be flagged as risks, you can define these specifications in the configuration file.--<Accordion title="Example custom configuration file">-```toml infisical-scan.toml-# Title for the configuration file-title = "Some title"---# This configuration is the foundation that can be expanded. If there are any overlapping rules-# between this base and the expanded configuration, the rules in this base will take priority.-# Another aspect of extending configurations is the ability to link multiple files, up to a depth of 2.-# "Allowlist" arrays get appended and may have repeated elements.-# "useDefault" and "path" cannot be used simultaneously. Please choose one.-[extend]-# useDefault will extend the base configuration with the default config:-# https://raw.githubusercontent.com/Infisical/infisical/main/cli/config/infisical-scan.toml-useDefault = true-# or you can supply a path to a configuration. Path is relative to where infisical cli-# was invoked, not the location of the base config.-path = "common_config.toml"--# An array of tables that contain information that define instructions-# on how to detect secrets-[[rules]]--# Unique identifier for this rule-id = "some-identifier-for-rule"--# Short human readable description of the rule.-description = "awesome rule 1"--# Golang regular expression used to detect secrets. Note Golang's regex engine-# does not support lookaheads.-regex = '''one-go-style-regex-for-this-rule'''--# Golang regular expression used to match paths. This can be used as a standalone rule or it can be used-# in conjunction with a valid `regex` entry.-path = '''a-file-path-regex'''--# Array of strings used for metadata and reporting purposes.-tags = ["tag","another tag"]--# A regex match may have many groups, this allows you to specify the group that should be used as (which group the secret is contained in)-# its entropy checked if `entropy` is set.-secretGroup = 3--# Float representing the minimum shannon entropy a regex group must have to be considered a secret.-# Shannon entropy measures how random a data is. Since secrets are usually composed of many random characters, they typically have high entropy-entropy = 3.5--# Keywords are used for pre-regex check filtering.-# If rule has keywords but the text fragment being scanned doesn't have at least one of it's keywords, it will be skipped for processing further.-# Ideally these values should either be part of the identifier or unique strings specific to the rule's regex-# (introduced in v8.6.0)-keywords = [- "auth",- "password",- "token",-]--# You can include an allowlist table for a single rule to reduce false positives or ignore commits-# with known/rotated secrets-[rules.allowlist]-description = "ignore commit A"-commits = [ "commit-A", "commit-B"]-paths = [- '''go\.mod''',- '''go\.sum'''-]-# note: (rule) regexTarget defaults to check the _Secret_ in the finding.-# if regexTarget is not specified then _Secret_ will be used.-# Acceptable values for regexTarget are "match" and "line"-regexTarget = "match"-regexes = [- '''process''',- '''getenv''',-]-# note: stopwords targets the extracted secret, not the entire regex match-# if the extracted secret is found in the stopwords list, the finding will be skipped (i.e not included in report)-stopwords = [- '''client''',- '''endpoint''',-]---# This is a global allowlist which has a higher order of precedence than rule-specific allowlists.-# If a commit listed in the `commits` field below is encountered then that commit will be skipped and no-# secrets will be detected for said commit. The same logic applies for regexes and paths.-[allowlist]-description = "global allow list"-commits = [ "commit-A", "commit-B", "commit-C"]-paths = [- '''gitleaks\.toml''',- '''(.*?)(jpg|gif|doc)'''-]--# note: (global) regexTarget defaults to check the _Secret_ in the finding.-# if regexTarget is not specified then _Secret_ will be used.-# Acceptable values for regexTarget are "match" and "line"-regexTarget = "match"--regexes = [- '''219-09-9999''',- '''078-05-1120''',- '''(9[0-9]{2}|666)-\d{2}-\d{4}''',-]-# note: stopwords targets the extracted secret, not the entire regex match-# if the extracted secret is found in the stopwords list, the finding will be skipped (i.e not included in report)-stopwords = [- '''client''',- '''endpoint''',-]-```-</Accordion>--#-#-# Ignoring known secrets-If you're intentionally committing a test secret that `infisical scan` might flag, you can instruct Infisical to overlook that secret with the methods listed below.--### infisical-scan:ignore--To ignore a secret contained in line of code, simply add `infisical-scan:ignore ` at the end of the line as comment in the given programming.--```js example.js-function helloWorld() {- console.log("8dyfuiRyq=vVc3RRr_edRk-fK__JItpZ"); // infisical-scan:ignore-}-```--### .infisicalignore-An alternative method to exclude specific findings involves creating a .infisicalignore file at your repository's root.-You can then add the fingerprints of the findings you wish to exclude. The Infisical scan report provides a unique Fingerprint for each secret found.-By incorporating these Fingerprints into the .infisicalignore file, Infisical will skip the corresponding secret findings in subsequent scans.--```.ignore .infisicalignore-bea0ff6e05a4de73a5db625d4ae181a015b50855:frontend/components/utilities/attemptLogin.js:stripe-access-token:147-bea0ff6e05a4de73a5db625d4ae181a015b50855:backend/src/json/integrations.json:generic-api-key:5-1961b92340e5d2613acae528b886c842427ce5d0:frontend/components/utilities/attemptLogin.js:stripe-access-token:148-```diff --git a/docs/cli/upgrade.mdx b/docs/cli/upgrade.mdxnew file mode 100644index 0000000000..224998a54a--- /dev/null+++ b/docs/cli/upgrade.mdx@@ -0,0 +1,55 @@+---+title: "Upgrade the CLI"+sidebarTitle: "Upgrade"+description: "Upgrade the Infisical CLI to the latest version with the package manager you installed it with."+---++Upgrade the CLI with the same package manager you [installed it](/cli/install) with:++<CodeGroup>++```bash macOS+brew update && brew upgrade infisical+```++```bash Windows (winget)+winget upgrade infisical+```++```bash Windows (Scoop)+scoop update infisical+```++```bash npm+npm update -g @infisical/cli+```++```bash Debian/Ubuntu+sudo apt-get update && sudo apt-get install --only-upgrade -y infisical+```++```bash RedHat/CentOS/Amazon Linux+sudo yum update infisical+```++```bash Alpine+sudo apk update && sudo apk upgrade infisical+```++```bash Arch Linux+yay -S infisical-bin+```++</CodeGroup>++Check which version you have now:++```bash+infisical --version+```++The [CLI releases](https://github.com/Infisical/cli/releases) list what changed in each version.++<Note>+ If an upgrade on Linux fails because the package repository can't be reached, your machine may still point at the old Cloudsmith repository. See [Migrate off Cloudsmith](/cli/cloudsmith-migration).+</Note>diff --git a/docs/cli/usage.mdx b/docs/cli/usage.mdxindex d512c15d64..7089419196 100644--- a/docs/cli/usage.mdx+++ b/docs/cli/usage.mdx@@ -1,325 +1,101 @@---title: "Quickstart"-description: "Manage secrets with Infisical CLI"+description: "Get started with the Infisical CLI."---+import InstallCli from "/snippets/cli/install-cli.mdx";import LogIn from "/snippets/cli/local-development/log-in.mdx";-import LinkProject from "/snippets/cli/local-development/link-project.mdx";-import StartApplication from "/snippets/cli/local-development/start-application.mdx";-The CLI is designed for a variety of secret management applications ranging from local development to CI/CD and production scenarios.+Every Infisical product that has a CLI workflow starts the same way: install the CLI, log in, and check that the CLI can reach your Infisical instance. This page covers those steps, then links to the command reference.-<Tabs>- <Tab title="Local development">- The steps below authenticate the CLI with your own account, link a codebase to an Infisical project, and inject the secrets you have access to into your local development process as environment variables.-- <Note>- If you prefer to learn by watching, follow along with our [step-by-step video tutorial](https://www.youtube.com/watch?v=zYCeELjcgQ4).- </Note>-- ## Step 1: Log in to Infisical-- <LogIn />-- ## Step 2: Link your codebase to your project-- <LinkProject />+## Prerequisites- ## Step 3: Start your application with secrets injected+- An Infisical account on [Infisical Cloud](https://app.infisical.com) or on a [self-hosted instance](/self-hosting/overview)- <StartApplication />+## Step 1: Install the CLI- For installation instructions, troubleshooting, and related local workflows such as personal overrides and secret scanning, see the [local development guide](/documentation/guides/local-development).+Install the CLI with the package manager for your operating system.- </Tab>+<InstallCli />- <Tab title="Docker containers">- Install the Infisical CLI into your Docker image and start your application with it to inject secrets at runtime.+Check that the installation worked:- <Steps>- <Step title="Install the Infisical CLI in your Dockerfile">- Install the CLI with the package manager of your base image. The example below targets Alpine; find the commands for other distributions [here](/cli/overview).+```bash+infisical --version+```- ```dockerfile- RUN apk add --no-cache bash wget && \- wget -qO- 'https://artifacts-cli.infisical.com/setup.apk.sh' | sh && \- apk update && apk add infisical- ```- </Step>- <Step title="Start your application with the CLI">- Set your container start command to run your application through `infisical run`. The CLI fetches your secrets from Infisical and injects them as environment variables.+## Step 2: Log in- ```dockerfile- CMD ["infisical", "run", "--projectId", "<your-project-id>", "--env", "prod", "--", "npm", "run", "start"]- ```- </Step>- <Step title="Authenticate the container">- Create a [machine identity](/documentation/platform/identities/machine-identities) and pass its access token to the container through the `INFISICAL_TOKEN` environment variable.+Log in with your own account when you run the CLI yourself, such as on your laptop during local development. Log in as a [machine identity](/documentation/platform/identities/machine-identities) when the CLI runs without you, such as in a CI/CD pipeline, a container, a scheduled job, or a script on a shared server.- ```bash- docker run --env INFISICAL_TOKEN=$INFISICAL_TOKEN <your-image>- ```- </Step>- </Steps>+<Note>+If your Infisical instance is behind a service that requires its own headers, such as Cloudflare Access, [ set those up first](/cli/faq#how-do-i-use-custom-headers-with-the-infisical-cli).+</Note>- For Docker Compose and `--env-file` workflows, see the [Docker guide](/integrations/platforms/docker).+<Tabs>+ <Tab title="Your own account">+ <LogIn />+ The CLI saves the instance you select with your login, so later commands use it without asking again.</Tab>-- <Tab title="Staging, production & all other use cases">- In the following steps, we explore how to use the Infisical CLI in a non-local development scenario- to fetch back environment variables and export them to a file.+ <Tab title="Machine identity"><Steps>- <Step title="Create a machine identity and obtain credentials for it">- Follow the steps listed [here](/documentation/platform/identities/universal-auth) to create a machine identity and obtain a **client ID** and **client secret** for it.+ <Step>+ Follow the [Universal Auth guide](/documentation/platform/identities/universal-auth) to create a machine identity and get a **Client ID** and **Client Secret** for it.</Step>- <Step title="Obtain a machine identity access token">- Run the following command to authenticate with Infisical using the **client ID** and **client secret** credentials from step 1 and set the `INFISICAL_TOKEN` environment variable to the retrieved access token.-- ```bash- export INFISICAL_TOKEN=$(infisical login --method=universal-auth --client-id=<identity-client-id> --client-secret=<identity-client-secret> --silent --plain) # --plain flag will output only the token, so it can be fed to an environment variable. --silent will disable any update messages.- ```+ <Step>+ If you use EU Cloud, a dedicated instance, or a self-hosted instance, set `INFISICAL_DOMAIN` to the address of your instance. A machine identity login doesn't save the instance, so without `INFISICAL_DOMAIN` every command goes to US Cloud (`https://app.infisical.com`).- The CLI is configured to look out for the `INFISICAL_TOKEN` environment variable, so going forward any command used will be authenticated.+ <CodeGroup>+ ```bash macOS/Linux+ export INFISICAL_DOMAIN="https://your-domain.infisical.com"+ ```- Alternatively, assuming you have an access token on hand, you can also pass it directly to the CLI using the `--token` flag in conjunction with other CLI commands.+ ```powershell Windows (PowerShell)+ setx INFISICAL_DOMAIN "https://your-domain.infisical.com"+ ```+ </CodeGroup>- <Info>- Keep in mind that the machine identity access token has a limited lifetime. It is recommended to use it only for the duration of the task at hand.- You can [refresh the token](./commands/token) if needed.- </Info>+ On Windows, `setx` saves the variable for new sessions only, so restart PowerShell before you run the next command.++ To set the instance another way, such as with the `--domain` flag or in `.infisical.json`, see [Set the Infisical instance](/cli/project-config#set-the-infisical-instance).</Step>- <Step title="Export environment variables back into a file">- Finally, export the environment variables from Infisical to a file of choice.+ <Step>+ Log in with the client ID and client secret, and store the access token in the `INFISICAL_TOKEN` environment variable:```bash- # export variables to a .env file (with export keyword)- infisical export --format=dotenv-export > .env-- # export variables to a YAML file- infisical export --format=yaml > secrets.yaml+ export INFISICAL_TOKEN=$(infisical login --method=universal-auth --client-id=<identity-client-id> --client-secret=<identity-client-secret> --silent --plain)```++ `--plain` prints only the token, and `--silent` hides update and tip messages, so the command's output is just the token. The CLI reads `INFISICAL_TOKEN` automatically, so every later command in the same shell is authenticated.</Step></Steps>-</Tab></Tabs>-<Note>- Starting with CLI version v0.4.0, you can now choose to log in via Infisical Cloud (US/EU) or your own self-hosted instance by simply running `infisical login` and following the on-screen instructions — no need to manually set the `INFISICAL_API_URL` environment variable.--For versions prior to v0.4.0, the CLI defaults to US Cloud. To connect to EU Cloud or a self-hosted instance, set the `INFISICAL_API_URL` environment variable to `https://eu.infisical.com` or your custom URL.--</Note>--<Warning>- ## Domain configuration--**Important:** If you're not using interactive login, you must configure the domain for **all CLI commands**.--The CLI defaults to US Cloud (https://app.infisical.com). To connect to **EU Cloud (https://eu.infisical.com)** or a **self-hosted instance**, you must configure the domain in one of the following ways:--- Use the `INFISICAL_DOMAIN` environment variable-- Use the `--domain` flag on every command-- Set the `domain` field in your project's [`.infisical.json`](/cli/project-config)--When more than one is set, the CLI uses this order of precedence: `--domain` flag, then `INFISICAL_DOMAIN`, then the `domain` field in `.infisical.json`, then the default. The legacy `INFISICAL_API_URL` environment variable is still honored, but `INFISICAL_DOMAIN` takes precedence when both are set.--<Tabs>- <Tab title='Use Environment Variable (Recommended)'>- The easiest way to ensure all CLI commands use the correct domain is to set- the `INFISICAL_DOMAIN` environment variable. This applies the domain- setting globally to all commands:-- ```bash- # Linux/MacOS- export INFISICAL_DOMAIN="https://your-domain.infisical.com"-- # Windows PowerShell- setx INFISICAL_DOMAIN "https://your-domain.infisical.com"- ```-- Once set, all subsequent CLI commands will automatically use this domain:-- ```bash- # Login with the domain- infisical login --method=universal-auth --client-id=<client-id> --client-secret=<client-secret> --silent --plain-- # All other commands will also use the same domain automatically- infisical secrets --projectId <id> --env dev- ```-- </Tab>- <Tab title='Use --domain Flag'>- The `--domain` flag can be used to set the domain for a single command. This- applies the domain setting to the command only:-- ```bash- # Login with domain- infisical login --domain="https://your-domain.infisical.com" --method=universal-auth --client-id=<client-id> --client-secret=<client-secret> --silent --plain-- # All subsequent commands must also include --domain- infisical secrets --domain="https://your-domain.infisical.com" --projectId=<id> --env=dev- ```-- <Note>- If you use `--domain` during login but forget to include it on subsequent commands, you may encounter authentication errors.- </Note>-- </Tab>- <Tab title='Use .infisical.json'>- If your project has a [`.infisical.json`](/cli/project-config) file, you can pin the- domain to the project by adding a `domain` field. Every CLI command run from the- project then uses it automatically, with no flag or environment variable needed:-- ```json .infisical.json- {- "workspaceId": "<workspace-id>",- "defaultEnvironment": "dev",- "domain": "https://your-domain.infisical.com"- }- ```-- <Note>- Since `.infisical.json` is usually committed to your repository, the CLI prints a warning naming the host whenever the domain is read from the file, since all requests and credentials are sent there. Only set `domain` to an instance you trust.- </Note>-- </Tab>-</Tabs>--</Warning>--<Tip>- ## Custom request headers--The Infisical CLI supports custom HTTP headers for requests to servers protected by authentication services such as Cloudflare Access. Configure these headers using the `INFISICAL_CUSTOM_HEADERS` environment variable:+## Step 3: Check that you're logged in```bash-# Syntax: headername1=headervalue1 headername2=headervalue2-export INFISICAL_CUSTOM_HEADERS="Access-Client-Id=your-client-id Access-Client-Secret=your-client-secret"--# Execute Infisical commands after setting the environment variable-infisical secrets+infisical login status```-This functionality enables secure interaction with Infisical instances that require specific authentication headers.--</Tip>--## History--Your terminal keeps a history with the commands you run. When you create Infisical secrets directly from your terminal, they'll stay there for a while.--For security and privacy concerns, we recommend you to configure your terminal to ignore those specific Infisical commands.--<Accordion title="Ignore commands">- <Tabs>- <Tab title="Unix/Linux">- <Tip>- `$HOME/.profile` is pretty common but, you could place it under `$HOME/.profile.d/infisical.sh` or any profile file run at login- </Tip>-- ```bash- cat <<EOF >> $HOME/.profile && source $HOME/.profile-- # Ignoring specific Infisical CLI commands- DEFAULT_HISTIGNORE=$HISTIGNORE- export HISTIGNORE="*infisical secrets set*:$DEFAULT_HISTIGNORE"- EOF- ```-- </Tab>- <Tab title="Windows">- If you're on WSL, then you can use the Unix/Linux method.+The CLI asks your Infisical instance whether your login is valid. If it is, the output starts with the account or machine identity you're logged in as, followed by the instance the CLI connected to:- <Tip>- Here's some [documentation](https://superuser.com/a/1658331) about how to clear the terminal history, in PowerShell and CMD- </Tip>-- </Tab>-- </Tabs>-</Accordion>--## FAQ--<AccordionGroup>- <Accordion title="Can I connect the CLI to my self-hosted or non-US Cloud Infisical instance?">- Yes. The CLI is set to connect to Infisical US Cloud by default, but if you're using EU Cloud or a self-hosted instance you can configure the domain for **all CLI commands**.-- #### Method 1: Use the updated CLI (v0.4.0+)-- Beginning with CLI version V0.4.0, you can choose between logging in through Infisical US Cloud, EU Cloud, or your own self-hosted instance. Simply execute the `infisical login` command and follow the on-screen instructions.-- #### Method 2: Export environment variable-- You can point the CLI to the self-hosted Infisical instance by exporting the environment variable `INFISICAL_DOMAIN` in your terminal. (The legacy `INFISICAL_API_URL` variable still works.)-- <Tabs>- <Tab title="Linux/MacOs">- ```bash- # Set the domain- export INFISICAL_DOMAIN="https://your-self-hosted-infisical.com"-- # For EU Cloud- export INFISICAL_DOMAIN="https://eu.infisical.com"-- # Remove the setting- unset INFISICAL_DOMAIN- ```-- </Tab>- <Tab title="Windows Powershell">- ```bash- # Set the domain- setx INFISICAL_DOMAIN "https://your-self-hosted-infisical.com"-- # For EU Cloud- setx INFISICAL_DOMAIN "https://eu.infisical.com"-- # Remove the setting- setx INFISICAL_DOMAIN ""-- # NOTE: Once set, please restart powershell for the change to take effect- ```-- </Tab>-- </Tabs>-- #### Method 3: Set manually on every command-- If you prefer not to use an environment variable, you must include the `--domain` flag on **every CLI command** you run:-- ```bash- # Login with domain- infisical login --domain="https://your-domain.infisical.com" --method=oidc-auth --jwt $JWT-- # All subsequent commands must also include --domain- infisical secrets --domain="https://your-self-hosted-infisical.com" --projectId <id> --env dev- infisical export --domain="https://your-self-hosted-infisical.com" --format=dotenv-export- ```-- <Tip>- **Best Practice:** Use `INFISICAL_DOMAIN` environment variable (Method 2) to avoid having to remember the `--domain` flag on every command. This is especially important in CI/CD pipelines and automation scripts.- </Tip>+```text+✓ Authenticated as <your-email-or-identity-name>+ - Domain: https://app.infisical.com+```- </Accordion>- <Accordion title="Can I use the CLI with service tokens?">- To use Infisical for non local development scenarios, please create a service token. The service token will allow you to authenticate and interact with Infisical. Once you have created a service token with the required permissions, you’ll need to feed the token to the CLI.+The lines after `Domain` include when your login expires and which organization it belongs to. If the output says `You are not authenticated`, log in again. If it says `Failed to authenticate`, check that the `Domain` line shows your instance, then log in again.- ```bash- infisical export --token=<service-token>- infisical secrets --token=<service-token>- infisical run --token=<service-token> -- npm run dev- ```+<Check>+You successfully installed and logged into the Infisical CLI.+</Check>- #### Pass via shell environment variable- The CLI is configured to look for an environment variable named `INFISICAL_TOKEN`. If set, it’ll attempt to use it for authentication.+## Next steps- ```bash- export INFISICAL_TOKEN=<service-token>- ```+Now that you've installed the CLI and logged in, you can start using its commands.- </Accordion>-</AccordionGroup>+<Card title="Command reference" icon="square-terminal" href="/cli/reference" horizontal>+ See every CLI command, with its arguments, flags, and examples+</Card>diff --git a/docs/contributing/platform/pam-development.mdx b/docs/contributing/platform/pam-development.mdxindex 7745e6149b..fae7d3e6f4 100644--- a/docs/contributing/platform/pam-development.mdx+++ b/docs/contributing/platform/pam-development.mdx@@ -76,7 +76,7 @@ go run main.go gateway start \Verify registration at **Organization Settings** > **Networking** > **Gateways**.-For all available flags, see the [Gateway CLI Reference](/cli/commands/gateway).+For all available flags, see the [Gateway CLI Reference](/cli/reference#gateway-start).<Accordion title="Using a relay instead">Direct listen needs nothing else running, so prefer it unless you're testing relay behaviour itself. For that, start a relay first and point the gateway at it with `--target-relay-name` instead of `--listen-address`:@@ -98,7 +98,7 @@ go run main.go gateway start \--pam-session-recording-path=$(pwd)/session```-Verify the relay at **Organization Settings** > **Networking** > **Relays**. See the [Relay CLI Reference](/cli/commands/relay) for all flags.+Verify the relay at **Organization Settings** > **Networking** > **Relays**. See the [Relay CLI Reference](/cli/reference#relay-start) for all flags.</Accordion>## Quick referencediff --git a/docs/docs.json b/docs/docs.jsonindex 9fc18320cb..1c7e61e4ad 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -444,6 +444,7 @@{"group": "Secrets scanning","pages": [+ "documentation/platform/secret-scanning/scan-locally",{"group": "Concepts","pages": [@@ -1298,54 +1299,47 @@"icon": "terminal","pages": ["cli/overview",+ "cli/cloudsmith-migration",{- "group": "Command line",+ "group": "Get started","pages": [+ "cli/install","cli/usage",- {- "group": "Core commands",- "pages": [- "cli/commands/login",- "cli/commands/logout",- "cli/commands/profile",- "cli/commands/org",- "cli/commands/init",- "cli/commands/run",- "cli/commands/secrets",- "cli/commands/agent-proxy",- "cli/commands/agent-vault",- "cli/commands/dynamic-secrets",- {- "group": "infisical pam",- "pages": [- "cli/commands/pam",- "cli/commands/pam-agentic"- ]- },- "cli/commands/gateway",- "cli/commands/kmip",- "cli/commands/relay",- "cli/commands/bootstrap",- "cli/commands/export",- "cli/commands/token",- "cli/commands/service-token",- "cli/commands/vault",- "cli/commands/user",- "cli/commands/reset",- {- "group": "infisical scan",- "pages": [- "cli/commands/scan",- "cli/commands/scan-git-changes",- "cli/commands/scan-install"- ]- }- ]- },- "cli/scanning-overview",+ "cli/upgrade","cli/project-config",- "cli/faq",- "cli/cloudsmith-migration"+ "cli/faq"+ ]+ },+ {+ "group": "Command reference",+ "pages": [+ "cli/reference",+ "cli/reference/global-flags",+ "cli/reference/agent",+ "cli/reference/agent-vault",+ "cli/reference/bootstrap",+ "cli/reference/cert-manager",+ "cli/reference/dynamic-secrets",+ "cli/reference/export",+ "cli/reference/gateway",+ "cli/reference/init",+ "cli/reference/kmip",+ "cli/reference/login",+ "cli/reference/logout",+ "cli/reference/org",+ "cli/reference/pam",+ "cli/reference/profile",+ "cli/reference/proxy",+ "cli/reference/relay",+ "cli/reference/reset",+ "cli/reference/run",+ "cli/reference/scan",+ "cli/reference/secrets",+ "cli/reference/service-token",+ "cli/reference/ssh",+ "cli/reference/token",+ "cli/reference/user",+ "cli/reference/vault"]}]@@ -4756,6 +4750,114 @@}},"redirects": [+ {+ "source": "/cli/scanning-overview",+ "destination": "/documentation/platform/secret-scanning/scan-locally"+ },+ {+ "source": "/cli/commands/commands",+ "destination": "/cli/reference"+ },+ {+ "source": "/cli/commands/agent-proxy",+ "destination": "/cli/reference#secrets-agent-proxy"+ },+ {+ "source": "/cli/commands/agent-vault",+ "destination": "/cli/reference#agent-vault"+ },+ {+ "source": "/cli/commands/bootstrap",+ "destination": "/cli/reference#bootstrap"+ },+ {+ "source": "/cli/commands/dynamic-secrets",+ "destination": "/cli/reference#dynamic-secrets"+ },+ {+ "source": "/cli/commands/export",+ "destination": "/cli/reference#export"+ },+ {+ "source": "/cli/commands/gateway",+ "destination": "/cli/reference#gateway"+ },+ {+ "source": "/cli/commands/init",+ "destination": "/cli/reference#init"+ },+ {+ "source": "/cli/commands/kmip",+ "destination": "/cli/reference#kmip"+ },+ {+ "source": "/cli/commands/login",+ "destination": "/cli/reference#login"+ },+ {+ "source": "/cli/commands/logout",+ "destination": "/cli/reference#logout"+ },+ {+ "source": "/cli/commands/org",+ "destination": "/cli/reference#org"+ },+ {+ "source": "/cli/commands/pam-agentic",+ "destination": "/cli/reference#pam-agentic"+ },+ {+ "source": "/cli/commands/pam",+ "destination": "/cli/reference#pam"+ },+ {+ "source": "/cli/commands/profile",+ "destination": "/cli/reference#profile"+ },+ {+ "source": "/cli/commands/relay",+ "destination": "/cli/reference#relay"+ },+ {+ "source": "/cli/commands/reset",+ "destination": "/cli/reference#reset"+ },+ {+ "source": "/cli/commands/run",+ "destination": "/cli/reference#run"+ },+ {+ "source": "/cli/commands/scan-git-changes",+ "destination": "/cli/reference#scan-git-changes"+ },+ {+ "source": "/cli/commands/scan-install",+ "destination": "/cli/reference#scan-install"+ },+ {+ "source": "/cli/commands/scan",+ "destination": "/cli/reference#scan"+ },+ {+ "source": "/cli/commands/secrets",+ "destination": "/cli/reference#secrets"+ },+ {+ "source": "/cli/commands/service-token",+ "destination": "/cli/reference#service-token"+ },+ {+ "source": "/cli/commands/token",+ "destination": "/cli/reference#token"+ },+ {+ "source": "/cli/commands/user",+ "destination": "/cli/reference#user"+ },+ {+ "source": "/cli/commands/vault",+ "destination": "/cli/reference#vault"+ },{"source": "/api-reference/endpoints/agent-vault-memberships/list-users","destination": "/api-reference/endpoints/agent-vault-members/list"@@ -4866,7 +4968,7 @@},{"source": "/cli/commands/ssh",- "destination": "/cli/commands/pam"+ "destination": "/cli/reference#ssh"},{"source": "/documentation/platform/agent-sentinel",diff --git a/docs/documentation/getting-started/choose-a-product/secret-scanning.mdx b/docs/documentation/getting-started/choose-a-product/secret-scanning.mdxindex ed0db53f24..0aae49573b 100644--- a/docs/documentation/getting-started/choose-a-product/secret-scanning.mdx+++ b/docs/documentation/getting-started/choose-a-product/secret-scanning.mdx@@ -16,7 +16,7 @@ Infisical Secrets Scanning detects credentials that have been placed in location<Card title="Monitor connected repositories" icon="git-branch" href="/documentation/platform/secret-scanning/github">Continuously scan GitHub, GitLab, and Bitbucket repositories as new commits are added.</Card>- <Card title="Scan locally with the CLI" icon="terminal" href="/cli/commands/scan">+ <Card title="Scan locally with the CLI" icon="terminal" href="/cli/reference#scan">Scan a working directory, Git history, or staged changes before they're pushed to a shared branch.</Card><Card title="Manage findings across scans" icon="list-checks" href="/documentation/platform/secret-scanning/overview">@@ -39,6 +39,6 @@ Secrets scanning provides this automated process. Continuous scanning of connectInfisical Secrets Scanning runs in two environments.- **Connected repositories.** [GitHub](/documentation/platform/secret-scanning/github), [GitLab](/documentation/platform/secret-scanning/gitlab), and [Bitbucket](/documentation/platform/secret-scanning/bitbucket) repositories can be monitored continuously. Each new commit is scanned. When a credential is detected, Infisical records a finding that includes the file path, line number, commit hash, and the detection rule that matched.-- **Local environments.** The [`infisical scan`](/cli/commands/scan) CLI command scans a working directory, Git history, or staged changes in a CI pipeline before the changes are pushed to a shared branch.+- **Local environments.** The [`infisical scan`](/cli/reference#scan) CLI command scans a working directory, Git history, or staged changes in a CI pipeline before the changes are pushed to a shared branch.-The detection engine uses pattern matching, entropy analysis, and user-defined rules to identify credentials. Findings can be resolved, ignored, or marked as false positives, and each scan is recorded in an audit log. To reduce the number of false positives, users can define custom detection patterns, ignore rules through `infisical-scan:ignore` and `.infisicalignore`, adjust the entropy threshold, and exclude specific file paths from scanning.+The detection engine uses pattern matching, entropy analysis, and user-defined rules to identify credentials. Findings can be resolved, ignored, or marked as false positives, and each scan is recorded in an audit log. To reduce the number of false positives, users can define custom detection patterns, ignore rules through `betterleaks:allow` and `.infisicalignore`, adjust the entropy threshold, and exclude specific file paths from scanning.diff --git a/docs/documentation/guides/local-development.mdx b/docs/documentation/guides/local-development.mdxindex 572346fb6c..096053ebaf 100644--- a/docs/documentation/guides/local-development.mdx+++ b/docs/documentation/guides/local-development.mdx@@ -9,7 +9,7 @@ import LogIn from "/snippets/cli/local-development/log-in.mdx";import LinkProject from "/snippets/cli/local-development/link-project.mdx";import StartApplication from "/snippets/cli/local-development/start-application.mdx";-This guide shows you how to inject secrets from Infisical into your local application without using a `.env` file. You'll install the [Infisical CLI](/cli/overview), link your codebase to your Infisical project, and start your application through `infisical run`.+This guide shows you how to inject secrets from Infisical into your local application without using a `.env` file. You'll install the [Infisical CLI](/cli/install), link your codebase to your Infisical project, and start your application through `infisical run`.<Note>`infisical run` injects secrets as environment variables, so it works with any language or framework. To read secrets from inside your application code instead, use a [framework integration](/integrations/all?type=Framework).@@ -87,7 +87,7 @@ Your next `infisical run` uses the override, and your teammates keep receiving t## Export secrets to a file-Some tools read secrets from a file and offer no way to accept them from the environment. For those cases, write the secrets to a file with [`infisical export`](/cli/commands/export):+Some tools read secrets from a file and offer no way to accept them from the environment. For those cases, write the secrets to a file with [`infisical export`](/cli/reference#export):```bashinfisical export --env=dev --format=dotenv --output-file=./.env@@ -127,7 +127,7 @@ The hook stops the commit when it finds something that looks like a secret. Chec## Next steps<CardGroup cols={2}>- <Card title="CLI reference" icon="terminal" href="/cli/commands/run">+ <Card title="CLI reference" icon="terminal" href="/cli/reference#run">All available flags for `run`, `export`, `secrets`, and the rest of the CLI.</Card><Card title="Docker" icon="docker" iconType="brands" href="/integrations/platforms/docker">diff --git a/docs/documentation/guides/nextjs-vercel.mdx b/docs/documentation/guides/nextjs-vercel.mdxindex f02671950a..3d95f995b2 100644--- a/docs/documentation/guides/nextjs-vercel.mdx+++ b/docs/documentation/guides/nextjs-vercel.mdx@@ -177,7 +177,7 @@ If you open your browser console, **Hello, YOUR_NAME** should be printed out.Here, the CLI fetched the secret from Infisical and injected it into the Next.js app upon starting up. By default,the CLI fetches secrets from the development environment which has the slug `dev`; you can inject secrets from different-environments by modifying the `env` flag as per the [CLI documentation](/cli/usage).+environments by modifying the `env` flag as per the [CLI documentation](/cli/reference#run--flag-env).At this stage, you know how to use the Infisical CLI to inject secrets into your Next.js app for local development.diff --git a/docs/documentation/platform/agent-proxy/activity-logs.mdx b/docs/documentation/platform/agent-proxy/activity-logs.mdxindex b5ed64988b..3148f536f5 100644--- a/docs/documentation/platform/agent-proxy/activity-logs.mdx+++ b/docs/documentation/platform/agent-proxy/activity-logs.mdx@@ -88,7 +88,7 @@ To keep records long-term, forward that output with a collector such as Fluent B## Next steps<CardGroup cols={2}>- <Card title="agent-proxy CLI reference" icon="terminal" href="/cli/commands/agent-proxy">+ <Card title="agent-proxy CLI reference" icon="terminal" href="/cli/reference#secrets-agent-proxy">Every flag for `start` and `connect`, including the logging options.</Card><Card title="Audit Logs" icon="scroll" href="/documentation/platform/audit-logs">diff --git a/docs/documentation/platform/agent-proxy/local-agent-proxy.mdx b/docs/documentation/platform/agent-proxy/local-agent-proxy.mdxindex 7906c0c2b4..910496c0d7 100644--- a/docs/documentation/platform/agent-proxy/local-agent-proxy.mdx+++ b/docs/documentation/platform/agent-proxy/local-agent-proxy.mdx@@ -55,7 +55,7 @@ flowchart LR## Requirements-- The [Infisical CLI](/cli/overview) installed, and `infisical login` completed.+- The [Infisical CLI](/cli/install) installed, and `infisical login` completed.- At least one [proxied service](/documentation/platform/agent-proxy/proxied-services) in the folder you point `run` at. Brokering only happens for hosts a service matches; if you have none, everything simply passes through uncredentialed.- macOS, or Linux with [bubblewrap](https://github.com/containers/bubblewrap) installed. The sandbox comes from the operating system, so what you install depends on which one you're on:@@ -366,7 +366,7 @@ Brokering still works and the environment is still scrubbed, but the agent is un## Next steps<CardGroup cols={2}>- <Card title="agent-proxy CLI reference" icon="terminal" href="/cli/commands/agent-proxy">+ <Card title="agent-proxy CLI reference" icon="terminal" href="/cli/reference#secrets-agent-proxy-run">Every flag for `run`, `start`, and `connect`, with examples.</Card><Card title="Proxied Services" icon="arrow-right-left" href="/documentation/platform/agent-proxy/proxied-services">diff --git a/docs/documentation/platform/agent-proxy/quickstart/local-proxy.mdx b/docs/documentation/platform/agent-proxy/quickstart/local-proxy.mdxindex f567b050dd..156bf76891 100644--- a/docs/documentation/platform/agent-proxy/quickstart/local-proxy.mdx+++ b/docs/documentation/platform/agent-proxy/quickstart/local-proxy.mdx@@ -21,7 +21,7 @@ By the end of this page an agent on your machine makes authenticated GitHub call## Before you begin- [Set up credentials](/documentation/platform/agent-proxy/quickstart/credentials) finished, so you have a `GITHUB_PAT` secret and a `github` proxied service in `/coding-agent`.-- The [Infisical CLI](/cli/overview) installed.+- The [Infisical CLI](/cli/install) installed.- macOS, or Linux with [bubblewrap](https://github.com/containers/bubblewrap) installed.- Optional: [GitHub's `gh` CLI](https://cli.github.com/), used for the check at the end. A `curl` fallback is provided, so this isn't required.diff --git a/docs/documentation/platform/agent-proxy/quickstart/standalone-proxy.mdx b/docs/documentation/platform/agent-proxy/quickstart/standalone-proxy.mdxindex 0d2563dffd..2bc83b931c 100644--- a/docs/documentation/platform/agent-proxy/quickstart/standalone-proxy.mdx+++ b/docs/documentation/platform/agent-proxy/quickstart/standalone-proxy.mdx@@ -21,7 +21,7 @@ By the end of this page an agent on one host makes authenticated GitHub calls th- [Set up credentials](/documentation/platform/agent-proxy/quickstart/credentials) finished, so you have a `GITHUB_PAT` secret and a `github` proxied service in `/coding-agent`.- **Two hosts in the same private network**, one for the proxy and one for the agent, with the agent host able to reach the proxy on port `17322`.-- The [Infisical CLI](/cli/overview) installed on both hosts.+- The [Infisical CLI](/cli/install) installed on both hosts.- Optional: [GitHub's `gh` CLI](https://cli.github.com/), used for the check at the end. A `curl` fallback is provided, so this isn't required.## 1. Create the proxy identitydiff --git a/docs/documentation/platform/agent-proxy/standalone-agent-proxy.mdx b/docs/documentation/platform/agent-proxy/standalone-agent-proxy.mdxindex 1d3d010c98..cde933fddd 100644--- a/docs/documentation/platform/agent-proxy/standalone-agent-proxy.mdx+++ b/docs/documentation/platform/agent-proxy/standalone-agent-proxy.mdx@@ -77,7 +77,7 @@ Every option resolves from the same sources, in order: **the flag → an environThe proxy address is the one setting that can't come from `.infisical.json`. That file is usually committed to your repository, so a wrong or malicious value would silently route every agent's traffic through the wrong host. Pass it with `--proxy` or `INFISICAL_AGENT_PROXY_ADDRESS` instead.</Note>-See the [CLI reference](/cli/commands/agent-proxy) for every flag on both subcommands.+See the [CLI reference](/cli/reference#secrets-agent-proxy) for every flag on both subcommands.## Deployment@@ -85,7 +85,7 @@ Starting the proxy in a shell is fine while you're trying it out, but it dies wi<Tabs><Tab title="CLI (systemd, VM)">- Install the [CLI](/cli/overview) on the host and run `start` under a process supervisor so it restarts on failure:+ Install the [CLI](/cli/install) on the host and run `start` under a process supervisor so it restarts on failure:```bashexport INFISICAL_UNIVERSAL_AUTH_CLIENT_ID=<agent-proxy-client-id>@@ -234,7 +234,7 @@ Records go to **stderr**, so whatever supervises the proxy collects them, and `-<Card title="Proxied Services" icon="arrow-right-left" href="/documentation/platform/agent-proxy/proxied-services">Host patterns, header rewrites, and secret substitution in depth.</Card>- <Card title="agent-proxy CLI reference" icon="terminal" href="/cli/commands/agent-proxy">+ <Card title="agent-proxy CLI reference" icon="terminal" href="/cli/reference#secrets-agent-proxy">Every flag for `start` and `connect`, with examples.</Card></CardGroup>diff --git a/docs/documentation/platform/agent-vault/overview.mdx b/docs/documentation/platform/agent-vault/overview.mdxindex adcc8a835c..511aea78e4 100644--- a/docs/documentation/platform/agent-vault/overview.mdx+++ b/docs/documentation/platform/agent-vault/overview.mdx@@ -44,6 +44,6 @@ Infisical Agent Vault is an access layer for AI agents. It securely equips agent## Reference-<Card title="CLI reference" icon="terminal" href="/cli/commands/agent-vault">+<Card title="CLI reference" icon="terminal" href="/cli/reference#agent-vault">Every flag of `infisical agent-vault proxy` and `infisical agent-vault run`.</Card>\ No newline at end of filediff --git a/docs/documentation/platform/agent-vault/proxies.mdx b/docs/documentation/platform/agent-vault/proxies.mdxindex b102fd3e1c..c5377a1e52 100644--- a/docs/documentation/platform/agent-vault/proxies.mdx+++ b/docs/documentation/platform/agent-vault/proxies.mdx@@ -74,7 +74,7 @@ The commands look like this:### Command flags-Here's a list of available flags for the [`infisical agent-vault proxy`](/cli/commands/agent-vault#infisical-agent-vault-proxy) command:+Here's a list of available flags for the [`infisical agent-vault proxy`](/cli/reference#agent-vault-proxy) command:| Option | What it sets ||--------|--------------|diff --git a/docs/documentation/platform/agent-vault/sessions.mdx b/docs/documentation/platform/agent-vault/sessions.mdxindex 0343944bf8..7766b5142d 100644--- a/docs/documentation/platform/agent-vault/sessions.mdx+++ b/docs/documentation/platform/agent-vault/sessions.mdx@@ -42,7 +42,7 @@ Anyone granted at least one access bundle can create a session. Admins can creatinfisical agent-vault run --access-bundle <bundle-name> --proxy <proxy-address> -- <agent-command>```- Set the duration with [`--ttl`](/cli/commands/agent-vault#ttl), which takes a value like `30m`, `8h`, `7d`, or `never`.+ Set the duration with [`--ttl`](/cli/reference#agent-vault-run--flag-ttl), which takes a value like `30m`, `8h`, `7d`, or `never`.The CLI creates the session as your user by default, or as a machine identity when you pass `--client-id` and `--client-secret` (or their environment variables). It revokes the session when the agent exits unless you pass `--keep-session`.diff --git a/docs/documentation/platform/dynamic-secrets/ssh.mdx b/docs/documentation/platform/dynamic-secrets/ssh.mdxindex ac4c08517f..f70c1366b9 100644--- a/docs/documentation/platform/dynamic-secrets/ssh.mdx+++ b/docs/documentation/platform/dynamic-secrets/ssh.mdx@@ -158,7 +158,7 @@ infisical dynamic-secrets lease create <secret-name> \The `--principals` flag is required for SSH dynamic secrets and accepts a comma-separated list. The requested principals must be a subset of the allowed principals configured on the dynamic secret.-For more details, see the [CLI dynamic secrets documentation](/cli/commands/dynamic-secrets).+For more details, see the [CLI dynamic secrets documentation](/cli/reference#dynamic-secrets).## Audit or revoke leasesdiff --git a/docs/documentation/platform/gateways/gateway-deployment.mdx b/docs/documentation/platform/gateways/gateway-deployment.mdxindex 3b7908bc8f..eb64686aa0 100644--- a/docs/documentation/platform/gateways/gateway-deployment.mdx+++ b/docs/documentation/platform/gateways/gateway-deployment.mdx@@ -71,7 +71,7 @@ General use is the gateway acting as a network path to a private resource, such7. Copy the generated CLI command.</Step><Step title="Install the Infisical CLI">- Make sure the Infisical CLI is installed on the target machine. See the [CLI Installation Guide](/cli/overview) for instructions.+ Make sure the Infisical CLI is installed on the target machine. See the [CLI Installation Guide](/cli/install) for instructions.</Step><Step title="Configure network and firewall">What you open depends on the connection mode you chose.diff --git a/docs/documentation/platform/gateways/relay-deployment/overview.mdx b/docs/documentation/platform/gateways/relay-deployment/overview.mdxindex c3859cf039..47a7f6d2ee 100644--- a/docs/documentation/platform/gateways/relay-deployment/overview.mdx+++ b/docs/documentation/platform/gateways/relay-deployment/overview.mdx@@ -56,9 +56,9 @@ To successfully deploy an Infisical Relay for use, follow these steps in order.</Step><Step title="Install the Infisical CLI">- Make sure the Infisical CLI is installed on the target machine. See the [CLI Installation Guide](/cli/overview) for instructions.+ Make sure the Infisical CLI is installed on the target machine. See the [CLI Installation Guide](/cli/install) for instructions.- To view all available flags and equivalent environment variables for relay deployment, see the [Relay CLI Command Reference](/cli/commands/relay).+ To view all available flags and equivalent environment variables for relay deployment, see the [Relay CLI Command Reference](/cli/reference#relay-start).</Step><Step title="Configure Network & Firewall">diff --git a/docs/documentation/platform/gateways/relay-deployment/terraform.mdx b/docs/documentation/platform/gateways/relay-deployment/terraform.mdxindex 87b0993ecb..70a42bc2d3 100644--- a/docs/documentation/platform/gateways/relay-deployment/terraform.mdx+++ b/docs/documentation/platform/gateways/relay-deployment/terraform.mdx@@ -15,7 +15,7 @@ Before you start, make sure you have the following:- An AWS account with permissions to create EC2 instances, Security Groups, and Elastic IPs.- An existing VPC and Subnet ID in your desired AWS region.- The AMI ID for your chosen OS (this guide uses an Ubuntu 22.04 LTS AMI).-- Credentials for the Infisical Relay to authenticate with your Infisical instance. This guide uses a Machine Identity token, but other methods are available. You can find a full list of authentication options [here](/cli/commands/relay#available-authentication-methods).+- Credentials for the Infisical Relay to authenticate with your Infisical instance. This guide uses a Machine Identity token, but other methods are available. You can find a full list of authentication options [here](/cli/reference#relay-start).### Terraform configurationdiff --git a/docs/documentation/platform/kms/kmip.mdx b/docs/documentation/platform/kms/kmip.mdxindex 4e962477fd..65df9324d1 100644--- a/docs/documentation/platform/kms/kmip.mdx+++ b/docs/documentation/platform/kms/kmip.mdx@@ -77,7 +77,7 @@ A KMIP server is created as an organization-wide entity in Infisical and then en</Step><Step title="Install the Infisical CLI">- Make sure the Infisical CLI is installed on the target machine where you want to run the KMIP server. See the [CLI Installation Guide](/cli/overview) for instructions.+ Make sure the Infisical CLI is installed on the target machine where you want to run the KMIP server. See the [CLI Installation Guide](/cli/install) for instructions.You can run the KMIP server on any infrastructure that can reach the Infisical platform, such as a VM or container.</Step>diff --git a/docs/documentation/platform/pam/access-requests/overview.mdx b/docs/documentation/platform/pam/access-requests/overview.mdxindex a70bfcddf4..c5bcbf0da5 100644--- a/docs/documentation/platform/pam/access-requests/overview.mdx+++ b/docs/documentation/platform/pam/access-requests/overview.mdx@@ -170,7 +170,7 @@ The badge and the audit entry are permanent.## Requests from AI agents-An agent requests access on the same terms as a person, but from the [CLI](/cli/commands/pam-agentic) instead of the dashboard. A request from an agent running as a machine identity shows the identity's name in place of a requester's email; one from an agent you started yourself is filed under your own name.+An agent requests access on the same terms as a person, but from the [CLI](/cli/reference#pam-agentic-access) instead of the dashboard. A request from an agent running as a machine identity shows the identity's name in place of a requester's email; one from an agent you started yourself is filed under your own name.When an agent reaches for a gated account, the request is filed for it automatically, and the account starts working on the agent's next attempt after you approve.diff --git a/docs/documentation/platform/pam/accounts/overview.mdx b/docs/documentation/platform/pam/accounts/overview.mdxindex bf50b886f5..d0be1b4c5b 100644--- a/docs/documentation/platform/pam/accounts/overview.mdx+++ b/docs/documentation/platform/pam/accounts/overview.mdx@@ -86,7 +86,7 @@ Every other account type starts a local proxy and outputs the port to connect to| `--port` | Use a specific local port (otherwise one is assigned automatically) || `--reason` | Provide a reason (if required by the template) |-To let an [AI agent](/documentation/platform/pam/ai-agents/overview) reach an account, use [`infisical pam agentic access`](/cli/commands/pam-agentic) instead.+To let an [AI agent](/documentation/platform/pam/ai-agents/overview) reach an account, use [`infisical pam agentic access`](/cli/reference#pam-agentic-access) instead.### Viewing credentialsdiff --git a/docs/documentation/platform/pam/ai-agents/overview.mdx b/docs/documentation/platform/pam/ai-agents/overview.mdxindex 04a03b2c3c..876074c198 100644--- a/docs/documentation/platform/pam/ai-agents/overview.mdx+++ b/docs/documentation/platform/pam/ai-agents/overview.mdx@@ -46,7 +46,7 @@ flowchart LR## Prerequisites-- The [Infisical CLI](/cli/overview) installed, and either `infisical login` completed or a machine identity to authenticate as.+- The [Infisical CLI](/cli/install) installed, and either `infisical login` completed or a machine identity to authenticate as.- The Connector or Admin [role](/documentation/platform/pam/concepts/access-control) on the folders or accounts the agent should reach, held by whoever the run authenticates as.- macOS, or Linux with [bubblewrap](https://github.com/containers/bubblewrap) installed. The sandbox comes from the operating system, so where one is unavailable the command refuses to start unless you [turn the sandbox off](#turning-the-sandbox-off) yourself.@@ -198,7 +198,7 @@ This is also the strongest way to run an agent you don't fully trust, watched orUse the environment rather than `--client-secret` and friends. A secret on the command line lands in your shell history and is visible to anything that can list processes. The CLI also strips its own variables before the agent starts, so the agent never inherits the credentials the run was authenticated with.</Tip>-See the [CLI reference](/cli/commands/pam-agentic) for the other authentication methods and their variables.+See the [CLI reference](/cli/reference#pam-agentic-access) for the other authentication methods and their variables.For a sensitive workload, pair that with a **dedicated machine**: an isolated host or container holding nothing else worth taking, so even an agent that gets past every local defense finds only that one narrowly scoped identity. Its access is still bounded by role, duration, and [approval](/documentation/platform/pam/access-requests/overview), and everything it does is on record.@@ -241,7 +241,7 @@ Because every connection is a normal PAM session, reviewing an agent's work is t<Card title="Session Recording" icon="video" href="/documentation/platform/pam/sessions/session-recording">Review exactly what the agent ran.</Card>- <Card title="CLI Reference" icon="terminal" href="/cli/commands/pam-agentic">+ <Card title="CLI Reference" icon="terminal" href="/cli/reference#pam-agentic-access">Every flag for `pam agentic access`.</Card></CardGroup>diff --git a/docs/documentation/platform/pam/concepts/access-control.mdx b/docs/documentation/platform/pam/concepts/access-control.mdxindex 8a6c58a67d..0b13558b7f 100644--- a/docs/documentation/platform/pam/concepts/access-control.mdx+++ b/docs/documentation/platform/pam/concepts/access-control.mdx@@ -82,7 +82,7 @@ The picker only offers members of PAM, so a machine identity has to be added onTwo things stay with users and groups:-- **Web Access.** Connecting in the browser is for users. Machine identities connect through the [CLI](/cli/commands/pam-agentic).+- **Web Access.** Connecting in the browser is for users. Machine identities connect through the [CLI](/cli/reference#pam-agentic-access).- **Approving [access requests](/documentation/platform/pam/access-requests/overview).** A machine identity can file a request, but only users and groups can approve one.An account whose [template](/documentation/platform/pam/templates/overview) requires MFA also stays with people: a machine identity can never complete the challenge, and [agent runs](/documentation/platform/pam/ai-agents/overview) don't support it yet.diff --git a/docs/documentation/platform/secret-scanning/concepts/secret-scanning.mdx b/docs/documentation/platform/secret-scanning/concepts/secret-scanning.mdxindex 54630ca984..ab03cac7c5 100644--- a/docs/documentation/platform/secret-scanning/concepts/secret-scanning.mdx+++ b/docs/documentation/platform/secret-scanning/concepts/secret-scanning.mdx@@ -17,4 +17,4 @@ Infisical Secret Scanning continuously monitors your source code and connected sFindings are surfaced with detailed context — including file location, commit metadata, and rule match — and can be tracked through their lifecycle using status labels like `Resolved`, `False Positive`, or `Ignored`. Teams can configure rules, exclusions, and thresholds to reduce noise and tailor detection to their environment.-In addition to real-time monitoring, Infisical supports both full repository scans and lightweight diff scans, as well as local pre-commit scanning via the [Infisical CLI](/cli/commands/scan). This allows teams to prevent secret leaks before they ever reach production.+In addition to real-time monitoring, Infisical supports both full repository scans and lightweight diff scans, as well as local pre-commit scanning via the [Infisical CLI](/cli/reference#scan). This allows teams to prevent secret leaks before they ever reach production.diff --git a/docs/documentation/platform/secret-scanning/overview.mdx b/docs/documentation/platform/secret-scanning/overview.mdxindex 1cb2898dd7..ed1ea7ce14 100644--- a/docs/documentation/platform/secret-scanning/overview.mdx+++ b/docs/documentation/platform/secret-scanning/overview.mdx@@ -7,7 +7,7 @@ icon: "radar"Infisical Secret Scanning helps teams detect leaked credentials — such as API keys, database passwords, and tokens — across source code and developer systems. It allows organizations to proactively catch exposed secrets before they can be exploited, and respond quickly when incidents occur.-Secret Scanning works across both cloud-connected repositories and local developer environments. It integrates with data sources like [GitHub](/documentation/platform/secret-scanning/github), [GitLab](/documentation/platform/secret-scanning/gitlab), and [Bitbucket](/documentation/platform/secret-scanning/bitbucket) to monitor repositories for exposed secrets in real time, and provides a CLI ([`infisical scan`](/cli/commands/scan)) for scanning local directories, Git history, or CI pipelines before changes are pushed.+Secret Scanning works across both cloud-connected repositories and local developer environments. It integrates with data sources like [GitHub](/documentation/platform/secret-scanning/github), [GitLab](/documentation/platform/secret-scanning/gitlab), and [Bitbucket](/documentation/platform/secret-scanning/bitbucket) to monitor repositories for exposed secrets in real time, and provides a CLI ([`infisical scan`](/cli/reference#scan)) for scanning local directories, Git history, or CI pipelines before changes are pushed.Core capabilities include:@@ -15,4 +15,4 @@ Core capabilities include:- Detection Engine: Identify potential secrets using pattern matching, entropy analysis, and custom rules tailored to your codebase and workflows.- Flexible Scan Modes: Run full scans manually or configure automatic diff scans triggered by new commits. CLI scans support Git history, file directories, or staged changes in CI pipelines.- Findings and Lifecycle Management: Track detected secrets with context like file path, commit hash, and scanning rule. Findings can be resolved, ignored, or marked as false positives — with full visibility into scan results over time.-- Custom Configuration and Noise Reduction: Fine-tune scanning behavior with custom patterns, ignore rules (infisical-scan:ignore, .infisicalignore), entropy thresholds, and excluded paths to reduce false positives.+- Custom Configuration and Noise Reduction: Fine-tune scanning behavior with custom patterns, ignore rules (betterleaks:allow, .infisicalignore), entropy thresholds, and excluded paths to reduce false positives.diff --git a/docs/documentation/platform/secret-scanning/scan-locally.mdx b/docs/documentation/platform/secret-scanning/scan-locally.mdxnew file mode 100644index 0000000000..6b6bffab93--- /dev/null+++ b/docs/documentation/platform/secret-scanning/scan-locally.mdx@@ -0,0 +1,137 @@+---+title: "Scan code locally with the CLI"+sidebarTitle: "Scan locally with the CLI"+description: "Scan a repository, a directory, or your uncommitted changes for leaked secrets with infisical scan."+---++The [Infisical CLI](/cli/overview) includes a secret scanner, `infisical scan`, that finds leaked secrets in a Git repository's history, in a directory, or in changes you haven't committed yet. It uses the same rules and configuration format as scans of [connected repositories](/documentation/platform/secret-scanning/usage), but it runs on your machine or in a CI job and doesn't need an Infisical login. Its findings stay local: the CLI prints them, or writes them to a report file if you ask for one.++## Prerequisites++- The [Infisical CLI](/cli/install) installed+- Git installed, if you're scanning a Git repository++## Scan a repository or a directory++To scan the full history of the Git repository you're in, run:++```bash+infisical scan --verbose+```++The scan reads every commit on every branch. To scan a range of commits instead, pass [Git log](https://git-scm.com/docs/git-log) options with `--log-opts`, such as `--log-opts="--all commitA..commitB"`. To scan the current files without reading Git history, add `--no-git` and point `--source` at a directory or a file:++```bash+infisical scan --no-git --source ./config --verbose+```++If the scan finds a secret, the command exits with code `1`, which fails a CI job. To write the findings to a file, add `--report-path`, and pick a format with `--report-format`: `json` (the default), `csv`, `sarif`, or `junit`. The [`infisical scan` reference](/cli/reference#scan) lists every flag.++## Scan changes before you commit++`infisical scan git-changes` scans only the changes in your working tree, so you can catch a secret before it's in a commit. Add `--staged` to scan what your next commit will contain:++```bash+infisical scan git-changes --staged --verbose+```++### Install the pre-commit hook++To run that scan before every commit, run this command in your repository:++```bash+infisical scan install --pre-commit-hook+```++The CLI adds the hook to `.git/hooks/pre-commit`, and Git then blocks any commit the scan finds a secret in. To turn the hook off in a repository, run `git config hooks.infisical-scan false`.++### Use a Git hook manager++If a hook manager such as [Husky](https://typicode.github.io/husky/) runs your Git hooks, don't use `infisical scan install`. Hook managers point Git's `core.hooksPath` setting at their own folder, and the install command offers to change that setting back to `.git/hooks`, which stops the hook manager's hooks from running. Instead, add the scan to the hook manager's pre-commit script, such as `.husky/pre-commit`:++```bash+infisical scan git-changes --staged --verbose+```++## Ignore findings you've already reviewed++A scan can flag a value you've decided is safe to commit, such as a test credential. You can ignore one line, ignore specific findings, or ignore every finding that already exists in the repository.++### Ignore one line++To ignore a secret on one line of code, add a `betterleaks:allow` comment at the end of the line:++```js example.js+const testKey = "8dyfuiRyq=vVc3RRr_edRk-fK__JItpZ"; // betterleaks:allow+```++The scanner also accepts `gitleaks:allow`, so existing `gitleaks:allow` comments keep working.++### Ignore specific findings++Each finding has a fingerprint, which you can find in the `Fingerprint` field of a JSON report. To ignore findings, list their fingerprints in a `.infisicalignore` file, one per line, in the directory you scan (the `--source` directory, which is the current directory by default):++```text .infisicalignore+bea0ff6e05a4de73a5db625d4ae181a015b50855:frontend/components/utilities/attemptLogin.js:stripe-access-token:147+backend/src/json/integrations.json:generic-api-key:5+```++A fingerprint from a Git scan has the form `<commit>:<file>:<rule>:<line>`, and ignores the finding in that commit only. To ignore a finding in every commit, leave out the commit and write `<file>:<rule>:<line>`, which is also the form that scans without Git history report.++### Ignore every existing finding with a baseline++If you start scanning a repository that already has a long history, you can record every current finding in a baseline and have later scans report only new ones. First, write a JSON report of the current findings:++```bash+infisical scan --report-path baseline.json+```++Then pass that report to later scans with `--baseline-path`:++```bash+infisical scan --baseline-path baseline.json --report-path findings.json+```++`findings.json` then contains only the findings that aren't in `baseline.json`. The baseline must be a report in the default `json` format. `infisical scan git-changes` doesn't use a baseline.++## Customize the scan rules++By default, the scanner uses its built-in rules, which cover the credential formats of hundreds of services. To add your own rules or skip paths, create a configuration file named `.infisical-scan.toml` in the directory you scan. To use a file with a different name or location, pass it with `--config` or set `INFISICAL_SCAN_CONFIG`.++A configuration file replaces the built-in rules unless it extends them. Set `useDefault = true` in the `[extend]` table to keep the built-in rules and add yours to them:++```toml .infisical-scan.toml+title = "Scan configuration for this repository"++[extend]+useDefault = true+disabledRules = ["generic-api-key"]++[[rules]]+id = "internal-api-token"+description = "Internal API token"+regex = '''itk_[a-z0-9]{32}'''+keywords = ["itk_"]++[[allowlists]]+description = "Test fixtures"+paths = ['''(^|/)testdata/''']+```++- `[extend]`: `useDefault = true` keeps the built-in rules, `path` extends another configuration file instead (relative to the directory you run the CLI in), and `disabledRules` turns off built-in rules by ID+- `[[rules]]`: a detection rule with a unique `id`, a [Go regular expression](https://pkg.go.dev/regexp/syntax) in `regex`, and `keywords` that a line must contain before the regular expression runs on it+- `entropy` and `secretGroup` in a rule: the minimum randomness a match needs, and the regular expression group that holds the secret+- `[[allowlists]]`: matches to skip, by file `paths`, `regexes`, `stopwords` found in the secret, or `commits`++If a rule in your file has the same `id` as a built-in rule, the fields you set replace the built-in rule's fields. The built-in rules are in [the CLI's default configuration](https://github.com/Infisical/cli/blob/main/detect/config/betterleaks.toml), which is also a reference for every field a rule can use.++## Next steps++<CardGroup cols={2}>+ <Card title="Usage" icon="radar" href="/documentation/platform/secret-scanning/usage">+ Scan connected GitHub, GitLab, and Bitbucket repositories from Infisical.+ </Card>+ <Card title="infisical scan" icon="terminal" href="/cli/reference#scan">+ See every flag of the scan commands.+ </Card>+</CardGroup>diff --git a/docs/documentation/platform/secret-scanning/usage.mdx b/docs/documentation/platform/secret-scanning/usage.mdxindex 0c001d9604..d6f9f86316 100644--- a/docs/documentation/platform/secret-scanning/usage.mdx+++ b/docs/documentation/platform/secret-scanning/usage.mdx@@ -7,7 +7,7 @@ description: "Learn what is secret scanning and why it matters for building secuMonitor and detect exposed secrets across your data sources, including code repositories, with Infisical Secret Scanning.-For additional security, we recommend using our [CLI Secret Scanner](/cli/scanning-overview#automatically-scan-changes-before-you-commit) to check for exposed secrets before pushing your code changes.+For additional security, we recommend using our [CLI Secret Scanner](/documentation/platform/secret-scanning/scan-locally#install-the-pre-commit-hook) to check for exposed secrets before pushing your code changes.<Note>Secret Scanning is a paid feature. If you're using Infisical Cloud, then it is@@ -213,20 +213,20 @@ For detailed configuration options, expand the example configuration below.If you're intentionally committing a test secret that the secret scanner might flag, you can instruct Infisical to overlook that secret with the methods listed below.-### infisical-scan:ignore+### `betterleaks:allow`-To ignore a secret contained in line of code, simply add `infisical-scan:ignore ` at the end of the line as comment in the given programming.+To ignore a secret contained in line of code, simply add `betterleaks:allow` at the end of the line as comment in the given programming.```js example.jsfunction helloWorld() {- console.log("8dyfuiRyq=vVc3RRr_edRk-fK__JItpZ"); // infisical-scan:ignore+ console.log("8dyfuiRyq=vVc3RRr_edRk-fK__JItpZ"); // betterleaks:allow}```### .infisicalignoreAn alternative method to exclude specific findings involves creating a .infisicalignore file at your repository's root.-You can then add the fingerprints of the findings you wish to exclude. The [Infisical scan](/cli/scanning-overview) report provides a unique Fingerprint for each secret found.+You can then add the fingerprints of the findings you wish to exclude. The [Infisical scan](/documentation/platform/secret-scanning/scan-locally) report provides a unique Fingerprint for each secret found.By incorporating these Fingerprints into the .infisicalignore file, Infisical will skip the corresponding secret findings in subsequent scans.```.ignore .infisicalignorediff --git a/docs/documentation/platform/secrets-mgmt/concepts/secrets-delivery.mdx b/docs/documentation/platform/secrets-mgmt/concepts/secrets-delivery.mdxindex 1c7cce4954..62576e8465 100644--- a/docs/documentation/platform/secrets-mgmt/concepts/secrets-delivery.mdx+++ b/docs/documentation/platform/secrets-mgmt/concepts/secrets-delivery.mdx@@ -32,7 +32,7 @@ From here, you can explore the delivery method that best matches your environmenFor local development, one-off scripts, or basic automation, the [Infisical CLI](/cli/overview) is a quick and flexible option.-Instead of using a `.env` file, you can use [`infisical run`](/cli/commands/run) to inject secrets as environment variables directly into your development process. This provides a cleaner and more secure workflow. Because the CLI reads the current values each time your application starts, a developer joining the team never needs a copy of a teammate's `.env` file, and no one is left running a stale value after a credential changes. You can also use [`infisical secrets`](/cli/commands/secrets#infisical-secrets) to perform CRUD operations on secrets from the command line, which works well for debugging, local tooling, and lightweight scripting.+Instead of using a `.env` file, you can use [`infisical run`](/cli/reference#run) to inject secrets as environment variables directly into your development process. This provides a cleaner and more secure workflow. Because the CLI reads the current values each time your application starts, a developer joining the team never needs a copy of a teammate's `.env` file, and no one is left running a stale value after a credential changes. You can also use [`infisical secrets`](/cli/reference#secrets) to perform CRUD operations on secrets from the command line, which works well for debugging, local tooling, and lightweight scripting.To set this up on your own machine, see the [local development guide](/documentation/guides/local-development).diff --git a/docs/integrations/cicd/bitbucket.mdx b/docs/integrations/cicd/bitbucket.mdxindex d71af3f0b8..fa3d5895be 100644--- a/docs/integrations/cicd/bitbucket.mdx+++ b/docs/integrations/cicd/bitbucket.mdx@@ -45,7 +45,7 @@ Prerequisites:```<Tip>- Set the values of `projectId` and `env` flags in the `infisical run` command to your intended source path. For more options, refer to the CLI command reference [here](https://infisical.com/docs/cli/commands/run).+ Set the values of `projectId` and `env` flags in the `infisical run` command to your intended source path. For more options, refer to the CLI command reference [here](/cli/reference#run).</Tip></Step></Steps>diff --git a/docs/integrations/cicd/jenkins.mdx b/docs/integrations/cicd/jenkins.mdxindex cd95c6d993..1aed3a8dd0 100644--- a/docs/integrations/cicd/jenkins.mdx+++ b/docs/integrations/cicd/jenkins.mdx@@ -14,7 +14,7 @@ Prerequisites:- Set up and add secrets to [Infisical](https://app.infisical.com).- Create a [machine identity](/documentation/platform/identities/machine-identities) (Recommended), or a service token in Infisical.- You have a working Jenkins installation with the [credentials plugin](https://plugins.jenkins.io/credentials/) installed.-- You have the [Infisical CLI](/cli/overview) installed on your Jenkins executor nodes or container images.+- You have the [Infisical CLI](/cli/install) installed on your Jenkins executor nodes or container images.<Tabs>diff --git a/docs/integrations/frameworks/bun.mdx b/docs/integrations/frameworks/bun.mdxindex a5085920a3..e3356380c5 100644--- a/docs/integrations/frameworks/bun.mdx+++ b/docs/integrations/frameworks/bun.mdx@@ -6,7 +6,7 @@ description: "How to use Infisical to inject environment variables and secrets iPrerequisites:- Set up and add envars to [Infisical Cloud](https://app.infisical.com)-- [Install the CLI](/cli/overview)+- [Install the CLI](/cli/install)## Initialize Infisical for your [Bun](https://bun.sh)diff --git a/docs/integrations/frameworks/django.mdx b/docs/integrations/frameworks/django.mdxindex 2a62ea2f55..ffac35b495 100644--- a/docs/integrations/frameworks/django.mdx+++ b/docs/integrations/frameworks/django.mdx@@ -6,7 +6,7 @@ description: "How to use Infisical to inject environment variables and secrets iPrerequisites:- Set up and add envars to [Infisical Cloud](https://app.infisical.com)-- [Install the CLI](/cli/overview)+- [Install the CLI](/cli/install)## Initialize Infisical for your [Django](https://www.djangoproject.com) projectdiff --git a/docs/integrations/frameworks/dotnet.mdx b/docs/integrations/frameworks/dotnet.mdxindex 7496a9d132..118f4fb51c 100644--- a/docs/integrations/frameworks/dotnet.mdx+++ b/docs/integrations/frameworks/dotnet.mdx@@ -6,7 +6,7 @@ description: "How to use Infisical to inject environment variables and secrets iPrerequisites:- Set up and add envars to [Infisical Cloud](https://app.infisical.com)-- [Install the CLI](/cli/overview)+- [Install the CLI](/cli/install)## Initialize Infisical for your [.NET](https://dotnet.microsoft.com) appdiff --git a/docs/integrations/frameworks/express.mdx b/docs/integrations/frameworks/express.mdxindex f73dd68e03..715134aeeb 100644--- a/docs/integrations/frameworks/express.mdx+++ b/docs/integrations/frameworks/express.mdx@@ -6,7 +6,7 @@ description: "How to use Infisical to inject environment variables and secrets iPrerequisites:- Set up and add envars to [Infisical Cloud](https://app.infisical.com)-- [Install the CLI](/cli/overview)+- [Install the CLI](/cli/install)The steps apply to the following non-exhaustive list of frameworks:diff --git a/docs/integrations/frameworks/fiber.mdx b/docs/integrations/frameworks/fiber.mdxindex 896c015fb7..50ec99e508 100644--- a/docs/integrations/frameworks/fiber.mdx+++ b/docs/integrations/frameworks/fiber.mdx@@ -6,7 +6,7 @@ description: "How to use Infisical to inject environment variables and secrets iPrerequisites:- Set up and add envars to [Infisical Cloud](https://app.infisical.com)-- [Install the CLI](/cli/overview)+- [Install the CLI](/cli/install)## Initialize Infisical for your [Fiber](https://gofiber.io/) appdiff --git a/docs/integrations/frameworks/flask.mdx b/docs/integrations/frameworks/flask.mdxindex 70759b1bf4..d40d24df37 100644--- a/docs/integrations/frameworks/flask.mdx+++ b/docs/integrations/frameworks/flask.mdx@@ -6,7 +6,7 @@ description: "How to use Infisical to inject environment variables and secrets iPrerequisites:- Set up and add envars to [Infisical Cloud](https://app.infisical.com)-- [Install the CLI](/cli/overview)+- [Install the CLI](/cli/install)## Initialize Infisical for your [Flask](https://flask.palletsprojects.com/en/2.2.x) appdiff --git a/docs/integrations/frameworks/gatsby.mdx b/docs/integrations/frameworks/gatsby.mdxindex 87be9691b6..67c7dedcde 100644--- a/docs/integrations/frameworks/gatsby.mdx+++ b/docs/integrations/frameworks/gatsby.mdx@@ -6,7 +6,7 @@ description: "How to use Infisical to inject environment variables and secrets iPrerequisites:- Set up and add envars to [Infisical Cloud](https://app.infisical.com)-- [Install the CLI](/cli/overview)+- [Install the CLI](/cli/install)## Initialize Infisical for your [Gatsby](https://www.gatsbyjs.com) appdiff --git a/docs/integrations/frameworks/laravel.mdx b/docs/integrations/frameworks/laravel.mdxindex 037d9ff736..fe41e01b01 100644--- a/docs/integrations/frameworks/laravel.mdx+++ b/docs/integrations/frameworks/laravel.mdx@@ -6,7 +6,7 @@ description: "How to use Infisical to inject environment variables and secrets iPrerequisites:- Set up and add envars to [Infisical Cloud](https://app.infisical.com)-- [Install the CLI](/cli/overview)+- [Install the CLI](/cli/install)## Initialize Infisical for your [Laravel](https://laravel.com/) appdiff --git a/docs/integrations/frameworks/nestjs.mdx b/docs/integrations/frameworks/nestjs.mdxindex 5f1ce6f8fc..f9b7286ed9 100644--- a/docs/integrations/frameworks/nestjs.mdx+++ b/docs/integrations/frameworks/nestjs.mdx@@ -6,7 +6,7 @@ description: "How to use Infisical to inject environment variables and secrets iPrerequisites:- Set up and add envars to [Infisical Cloud](https://app.infisical.com)-- [Install the CLI](/cli/overview)+- [Install the CLI](/cli/install)## Initialize Infisical for your [NestJS](https://nestjs.com) appdiff --git a/docs/integrations/frameworks/nextjs.mdx b/docs/integrations/frameworks/nextjs.mdxindex f3f99f86de..40b171c4d4 100644--- a/docs/integrations/frameworks/nextjs.mdx+++ b/docs/integrations/frameworks/nextjs.mdx@@ -6,7 +6,7 @@ description: "How to use Infisical to inject environment variables and secrets iPrerequisites:- Set up and add envars to [Infisical Cloud](https://app.infisical.com)-- [Install the CLI](/cli/overview)+- [Install the CLI](/cli/install)## Initialize Infisical for your [Next.js](https://nextjs.org) appdiff --git a/docs/integrations/frameworks/nuxt.mdx b/docs/integrations/frameworks/nuxt.mdxindex 3267d65429..d651b51876 100644--- a/docs/integrations/frameworks/nuxt.mdx+++ b/docs/integrations/frameworks/nuxt.mdx@@ -6,7 +6,7 @@ description: "How to use Infisical to inject environment variables and secrets iPrerequisites:- Set up and add envars to [Infisical Cloud](https://app.infisical.com)-- [Install the CLI](/cli/overview)+- [Install the CLI](/cli/install)## Initialize Infisical for your [Nuxt](https://nuxtjs.org) appdiff --git a/docs/integrations/frameworks/rails.mdx b/docs/integrations/frameworks/rails.mdxindex 22dc471e35..bd9d9fa7d6 100644--- a/docs/integrations/frameworks/rails.mdx+++ b/docs/integrations/frameworks/rails.mdx@@ -6,7 +6,7 @@ description: "How to use Infisical to inject environment variables and secrets iPrerequisites:- Set up and add envars to [Infisical Cloud](https://app.infisical.com)-- [Install the CLI](/cli/overview)+- [Install the CLI](/cli/install)## Initialize Infisical for your [Rails](https://rubyonrails.org) appdiff --git a/docs/integrations/frameworks/react.mdx b/docs/integrations/frameworks/react.mdxindex ce50be1c82..dfa7f48495 100644--- a/docs/integrations/frameworks/react.mdx+++ b/docs/integrations/frameworks/react.mdx@@ -6,7 +6,7 @@ description: "How to use Infisical to inject environment variables and secrets iPrerequisites:- Set up and add envars to [Infisical Cloud](https://app.infisical.com)-- [Install the CLI](/cli/overview)+- [Install the CLI](/cli/install)## Initialize Infisical for your [Create React App](https://create-react-app.dev)diff --git a/docs/integrations/frameworks/remix.mdx b/docs/integrations/frameworks/remix.mdxindex d85844143e..9058b819b5 100644--- a/docs/integrations/frameworks/remix.mdx+++ b/docs/integrations/frameworks/remix.mdx@@ -6,7 +6,7 @@ description: "How to use Infisical to inject environment variables and secrets iPrerequisites:- Set up and add envars to [Infisical Cloud](https://app.infisical.com)-- [Install the CLI](/cli/overview)+- [Install the CLI](/cli/install)## Initialize Infisical for your [Remix](https://remix.run) appdiff --git a/docs/integrations/frameworks/spring-boot-maven.mdx b/docs/integrations/frameworks/spring-boot-maven.mdxindex f6f3fdc60a..bfc05603d6 100644--- a/docs/integrations/frameworks/spring-boot-maven.mdx+++ b/docs/integrations/frameworks/spring-boot-maven.mdx@@ -6,7 +6,7 @@ description: "How to use Infisical to inject environment variables into Java SprPrerequisites:- Set up and add your environment variables to [Infisical Cloud](https://app.infisical.com)-- [Install the CLI](/cli/overview)+- [Install the CLI](/cli/install)## Initialize InfisicalIn order for Infisical to know which secrets to fetch, you'll need to first initialize Infisical at the root of your project.diff --git a/docs/integrations/frameworks/sveltekit.mdx b/docs/integrations/frameworks/sveltekit.mdxindex 597749d43f..ec24e05e6e 100644--- a/docs/integrations/frameworks/sveltekit.mdx+++ b/docs/integrations/frameworks/sveltekit.mdx@@ -6,7 +6,7 @@ description: "How to use Infisical to inject environment variables and secrets iPrerequisites:- Set up and add envars to [Infisical Cloud](https://app.infisical.com)-- [Install the CLI](/cli/overview)+- [Install the CLI](/cli/install)## Initialize Infisical for your [SvelteKit](https://kit.svelte.dev) appdiff --git a/docs/integrations/frameworks/vite.mdx b/docs/integrations/frameworks/vite.mdxindex 62a4bb2f6f..5e80dbf896 100644--- a/docs/integrations/frameworks/vite.mdx+++ b/docs/integrations/frameworks/vite.mdx@@ -6,7 +6,7 @@ description: "How to use Infisical to inject environment variables and secrets iPrerequisites:- Set up and add envars to [Infisical Cloud](https://app.infisical.com)-- [Install the CLI](/cli/overview)+- [Install the CLI](/cli/install)## Initialize Infisical for your [Vite](https://vitejs.dev) appdiff --git a/docs/integrations/frameworks/vue.mdx b/docs/integrations/frameworks/vue.mdxindex 240e4ae4b9..d8dc2d28dd 100644--- a/docs/integrations/frameworks/vue.mdx+++ b/docs/integrations/frameworks/vue.mdx@@ -6,7 +6,7 @@ description: "How to use Infisical to inject environment variables and secrets iPrerequisites:- Set up and add envars to [Infisical Cloud](https://app.infisical.com)-- [Install the CLI](/cli/overview)+- [Install the CLI](/cli/install)## Initialize Infisical for your [Vue](https://vuejs.org) appdiff --git a/docs/integrations/platforms/aws/lambda.mdx b/docs/integrations/platforms/aws/lambda.mdxindex 8376e98c24..2923242393 100644--- a/docs/integrations/platforms/aws/lambda.mdx+++ b/docs/integrations/platforms/aws/lambda.mdx@@ -63,7 +63,7 @@ Attach a policy like the one below to the IAM user or role responsible for updatUse the Infisical CLI to export secrets as JSON and pass them to the AWS CLI.The example below targets a project by ID, but you can also use the `--project` and `--env` flags.-Learn more about `infisical export` [here](/cli/commands/export#infisical-export).+Learn more about `infisical export` [here](/cli/reference#export).```bashFUNCTION_NAME=infisical-env-test@@ -88,7 +88,7 @@ Verify the values in the Lambda console or by invoking the function.Automate this step in CI/CD. Run `infisical export` using an Infisical Tokenscoped to your project and environment, and trigger the sync as part of yourdeployment workflow. Learn more about the [Infisical- Token](/cli/commands/export#infisical-export:infisical-token).+ Token](/cli/reference#export--flag-token).</Tip><Note>diff --git a/docs/integrations/platforms/docker.mdx b/docs/integrations/platforms/docker.mdxindex 819a97c9e1..3b4b418c5c 100644--- a/docs/integrations/platforms/docker.mdx+++ b/docs/integrations/platforms/docker.mdx@@ -15,7 +15,7 @@ This guide walks you through injecting secrets from Infisical into a Dockerized- An Infisical account on [Infisical Cloud](https://app.infisical.com) or a [self-hosted instance](/self-hosting/overview)- A [project with secrets configured](/documentation/platform/secrets-mgmt/quick-starts/deliver-first-secret)- [Docker](https://docs.docker.com/get-started/get-docker/) installed-- The [Infisical CLI](/cli/overview) installed on the machine where you run Docker+- The [Infisical CLI](/cli/install) installed on the machine where you run Docker- An application or container image to run## Setup@@ -106,7 +106,7 @@ Choose how Docker should receive your application secrets:Pin the [Infisical CLI version](https://github.com/Infisical/cli/releases) in production images to keep builds reproducible.</Tip>- Next, wrap your application's start command with [`infisical run`](/cli/commands/run). Replace `<project-id>` with the project ID you copied earlier:+ Next, wrap your application's start command with [`infisical run`](/cli/reference#run). Replace `<project-id>` with the project ID you copied earlier:<CodeGroup>```dockerfile Node.js@@ -123,7 +123,7 @@ Choose how Docker should receive your application secrets:</CodeGroup><Accordion title="Run multiple startup commands">- Use the [`--command` option](/cli/commands/run#infisical-run:command) when your application needs to run multiple shell commands in sequence:+ Use the [`--command` option](/cli/reference#run--flag-command) when your application needs to run multiple shell commands in sequence:```dockerfileCMD ["infisical", "run", "--projectId=<project-id>", "--env=dev", "--command", "npm run migrate && npm start"]@@ -189,7 +189,7 @@ Choose how Docker should receive your application secrets:### Step 1: Authenticate with the CLI- Authenticate with Infisical by running [`infisical login`](/cli/commands/login):+ Authenticate with Infisical by running [`infisical login`](/cli/reference#login):```bashinfisical login@@ -199,7 +199,7 @@ Choose how Docker should receive your application secrets:### Step 2: Connect your project- In your application's directory, link it to the project you created by running [`infisical init`](/cli/commands/init):+ In your application's directory, link it to the project you created by running [`infisical init`](/cli/reference#init):```bashinfisical initdiff --git a/docs/integrations/platforms/infisical-agent.mdx b/docs/integrations/platforms/infisical-agent.mdxindex 35eb848663..8f0470d1d4 100644--- a/docs/integrations/platforms/infisical-agent.mdx+++ b/docs/integrations/platforms/infisical-agent.mdx@@ -483,7 +483,7 @@ The Infisical agent supports multiple authentication methods. Below are the avai## Quick start Infisical Agent-To install the Infisical agent, you must first install the [Infisical CLI](/cli/overview) in the desired environment where you'd like the agent to run. This is because the Infisical agent is a sub-command of the Infisical CLI.+To install the Infisical agent, you must first install the [Infisical CLI](/cli/install) in the desired environment where you'd like the agent to run. This is because the Infisical agent is a sub-command of the Infisical CLI.Once you have the CLI installed, you'll need to provision programmatic access for the agent via [Universal Auth](/documentation/platform/identities/universal-auth). To obtain a **Client ID** and a **Client Secret**, follow the step by step guide outlined [here](/documentation/platform/identities/universal-auth).diff --git a/docs/integrations/platforms/infisical-proxy.mdx b/docs/integrations/platforms/infisical-proxy.mdxindex c59653be66..8590450e23 100644--- a/docs/integrations/platforms/infisical-proxy.mdx+++ b/docs/integrations/platforms/infisical-proxy.mdx@@ -46,7 +46,7 @@ To keep cached data fresh, the proxy runs two background processes. The first pe## Install the Infisical Proxy-The Infisical Proxy is available through the Infisical CLI. Please refer to the [CLI installation documentation](/cli/overview) for more information on how to install the Infisical CLI.+The Infisical Proxy is available through the Infisical CLI. Please refer to the [CLI installation documentation](/cli/install) for more information on how to install the Infisical CLI.## Quick startStart the proxy with minimal configuration:diff --git a/docs/integrations/platforms/pm2.mdx b/docs/integrations/platforms/pm2.mdxindex e9b04bbb20..7cb147f637 100644--- a/docs/integrations/platforms/pm2.mdx+++ b/docs/integrations/platforms/pm2.mdx@@ -6,7 +6,7 @@ description: "How to use Infisical to inject environment variables and secrets wPrerequisites:- Set up and add envars to [Infisical Cloud](https://app.infisical.com)-- [Install the CLI](/cli/overview)+- [Install the CLI](/cli/install)## Initialize Infisical for your Node.js appdiff --git a/docs/self-hosting/guides/automated-bootstrapping.mdx b/docs/self-hosting/guides/automated-bootstrapping.mdxindex 51ed5f0401..da13eedc73 100644--- a/docs/self-hosting/guides/automated-bootstrapping.mdx+++ b/docs/self-hosting/guides/automated-bootstrapping.mdx@@ -78,7 +78,7 @@ You can bootstrap an Infisical instance using the API, CLI, or Helm chart.</Tab><Tab title="Using the CLI">- Use the [Infisical CLI](/cli/commands/bootstrap) to bootstrap the instance and extract the token for immediate use in automation:+ Use the [Infisical CLI](/cli/reference#bootstrap) to bootstrap the instance and extract the token for immediate use in automation:```bashinfisical bootstrap --domain="http://localhost:8080" --email="[email protected]" --password="your-secure-password" --organization="your-org-name" | jq ".identity.credentials.token"diff --git a/docs/snippets/CLIPage.jsx b/docs/snippets/CLIPage.jsxnew file mode 100644index 0000000000..012831906e--- /dev/null+++ b/docs/snippets/CLIPage.jsx@@ -0,0 +1,440 @@+export const CLIPage = ({ title, description, children }) => {+ const rootRef = useRef(null);++ useEffect(() => {+ const root = rootRef.current;+ if (!root) return undefined;++ const navbar = document.getElementById("navbar");+ const top = navbar ? navbar.getBoundingClientRect().height : 64;+ root.style.setProperty("--cli-top", `${Math.round(top)}px`);++ const sections = Array.from(root.querySelectorAll("[data-cli-command]"));++ // On a fresh load the page keeps growing after the first frame (subcommand lists fill in,+ // fonts and sticky headings settle), which pushes the target down. Keep realigning while the+ // page resizes, until the reader scrolls on their own or the layout has had time to settle.+ let stopAligning = () => {};+ const hash = decodeURIComponent(window.location.hash.slice(1));+ const target = hash ? document.getElementById(hash) : null;++ let pinned = target ? target.closest("[data-cli-command]") : null;+ const unpinEvents = ["wheel", "touchstart", "keydown", "mousedown"];+ const unpin = () => {+ pinned = null;+ unpinEvents.forEach((type) => window.removeEventListener(type, unpin));+ };+ if (pinned) unpinEvents.forEach((type) => window.addEventListener(type, unpin, { passive: true }));+ if (target) {+ let aligning = true;+ const block = target.classList.contains("cli-row") ? "center" : "start";+ const align = () => {+ if (aligning) target.scrollIntoView({ block });+ };+ const alignFrame = requestAnimationFrame(align);+ const resizes = new ResizeObserver(align);+ resizes.observe(root);+ if (document.fonts) document.fonts.ready.then(align);+ const userEvents = ["wheel", "touchstart", "keydown", "mousedown"];+ const stop = () => {+ aligning = false;+ cancelAnimationFrame(alignFrame);+ resizes.disconnect();+ clearTimeout(timeout);+ userEvents.forEach((type) => window.removeEventListener(type, stop));+ };+ const timeout = setTimeout(stop, 2000);+ userEvents.forEach((type) => window.addEventListener(type, stop, { passive: true }));+ stopAligning = stop;+ }++ // The URL follows the reader so a copied link lands on the command in view. replaceState+ // keeps scrolling out of the back-button history, and passing the router's own state+ // through stops Next from treating the change as a navigation.+ let frame = 0;+ let settle = 0;+ let current;+ const onScroll = () => {+ cancelAnimationFrame(frame);+ frame = requestAnimationFrame(() => {+ const line = top + 24;+ let reached = null;+ for (const el of sections) {+ const box = el.getBoundingClientRect();+ // Past the point where the divider meets the heading, the divider does the border's job.+ const head = el.firstElementChild ? el.firstElementChild.offsetHeight : 0;+ el.classList.toggle("cli-cmd--stuck", box.top < top && box.bottom > top + head + 1);+ if (box.top - line <= 0) reached = el.id;+ }+ const atBottom = window.innerHeight + window.scrollY >= document.body.scrollHeight - 2;+ if (atBottom && sections.length) reached = sections[sections.length - 1].id;+ if (pinned) reached = pinned.id;+ if (reached === current) return;+ // A smooth scroll to a flag passes through earlier commands on the way. Writing those+ // into the URL would replace the link the reader just chose, and lighting each one up+ // in the sidebar would flicker, so wait for the jump to settle and look again.+ const lockedFor = Number(document.documentElement.dataset.cliJumpUntil || 0) - Date.now();+ if (lockedFor > 0) {+ clearTimeout(settle);+ settle = setTimeout(onScroll, lockedFor + 50);+ return;+ }+ current = reached;+ const path = reached ? document.getElementById(reached).dataset.command : null;+ window.dispatchEvent(new CustomEvent("cli-reference:active", { detail: { id: reached, path } }));+ const hashNow = decodeURIComponent(window.location.hash.slice(1));+ if (!reached) {+ // Mintlify scrolls to whatever hash is in the URL, so the hero must not carry one.+ if (hashNow) window.history.replaceState(window.history.state, "", window.location.pathname);+ return;+ }+ if (hashNow !== reached && !hashNow.startsWith(`${reached}--`)) {+ window.history.replaceState(window.history.state, "", `#${reached}`);+ }+ });+ };+ onScroll();+ window.addEventListener("scroll", onScroll, { passive: true });+ return () => {+ stopAligning();+ unpin();+ cancelAnimationFrame(frame);+ clearTimeout(settle);+ window.removeEventListener("scroll", onScroll);+ window.dispatchEvent(new CustomEvent("cli-reference:active", { detail: { id: null } }));+ };+ }, []);++ return (+ <div className="cli-ref" ref={rootRef}>+ <header className="cli-ref__hero">+ <h1 className="cli-ref__title">{title}</h1>+ {description ? <div className="cli-ref__description">{description}</div> : null}+ </header>+ {children}+ </div>+ );+};++export const CLICommand = ({+ id,+ command,+ heading,+ usage,+ description,+ args = [],+ flags = [],+ inheritedFlags = [],+ env = [],+ examples = [],+ children+}) => {+ const [copied, setCopied] = useState(null);+ const [subcommands, setSubcommands] = useState([]);+ const sectionRef = useRef(null);+ const headingRef = useRef(null);++ // The sidebar lists only root commands, so each command lists its direct subcommands. They are+ // read from the rendered page, so a new block shows up in its parent's list with no extra edit.+ useEffect(() => {+ const section = sectionRef.current;+ if (!section) return;+ const page = section.closest(".cli-ref") || document;+ const depth = command.split(" ").length + 1;+ const found = Array.from(page.querySelectorAll("[data-cli-command]"))+ .filter((el) => {+ const path = el.dataset.command || "";+ return path.startsWith(`${command} `) && path.split(" ").length === depth;+ })+ .map((el) => ({ id: el.id, command: el.dataset.command }));+ setSubcommands(found);+ }, [command]);++ // Anchored rows and the sticky examples sit below the sticky heading, whose height depends+ // on how the signature wraps.+ useEffect(() => {+ const section = sectionRef.current;+ const heading = headingRef.current;+ if (!section || !heading) return undefined;+ const measure = () => section.style.setProperty("--cli-head", `${Math.round(heading.offsetHeight)}px`);+ measure();+ const observer = new ResizeObserver(measure);+ observer.observe(heading);+ return () => observer.disconnect();+ }, []);++ // Descriptions arrive as prop strings, which MDX does not parse, so backticks, **bold**+ // UI labels, and [text](href) links are rendered here. The CLI's help text marks commands as+ // [infisical ...], which renders as code.+ const inline = (text) => {+ if (!text) return null;+ const parts = [];+ const pattern = /`([^`]+)`|\[([^\]]+)\]\(([^)]+)\)|\[(infisical [^\]]+)\]|\*\*([^*]+)\*\*/g;+ let last = 0;+ let match;+ while ((match = pattern.exec(text))) {+ if (match.index > last) parts.push(text.slice(last, match.index));+ if (match[1]) parts.push(<code key={match.index}>{match[1]}</code>);+ else if (match[4]) parts.push(<code key={match.index}>{match[4]}</code>);+ else if (match[5]) parts.push(<strong key={match.index}>{match[5]}</strong>);+ else parts.push(<a key={match.index} href={match[3]}>{match[2]}</a>);+ last = pattern.lastIndex;+ }+ if (last < text.length) parts.push(text.slice(last));+ return parts;+ };++ const slug = (name) => name.replace(/^-+/, "").replace(/[^a-zA-Z0-9]+/g, "-").toLowerCase();+ const anchor = (kind, name) => `${id}--${kind}-${slug(name)}`;++ const jump = (event, target) => {+ const el = document.getElementById(target);+ if (!el) return;+ event.preventDefault();+ document.documentElement.dataset.cliJumpUntil = String(Date.now() + 1200);+ const isRow = el.classList.contains("cli-row");+ el.scrollIntoView({ behavior: "smooth", block: isRow ? "center" : "start" });+ window.history.replaceState(window.history.state, "", `#${target}`);+ if (!isRow) return;+ el.classList.remove("cli-row--flash");+ void el.offsetWidth;+ el.classList.add("cli-row--flash");+ };++ const copy = (index, code) => {+ navigator.clipboard.writeText(code);+ setCopied(index);+ setTimeout(() => setCopied(null), 1500);+ };++ const highlight = (code) =>+ code.split("\n").map((line, lineIndex) => {+ if (/^\s*#/.test(line)) {+ return (+ <span key={lineIndex} className="cli-code__line cli-code__comment">+ {line}+ {"\n"}+ </span>+ );+ }+ const tokens = line.split(/(\s+|"[^"]*"|'[^']*')/).filter((t) => t !== "");+ return (+ <span key={lineIndex} className="cli-code__line">+ {tokens.map((token, tokenIndex) => {+ let cls = null;+ if (token === "infisical") cls = "cli-code__bin";+ else if (/^--?[a-zA-Z]/.test(token)) cls = "cli-code__flag";+ else if (/^["']/.test(token)) cls = "cli-code__string";+ else if (tokenIndex === 0 && /^(export|eval)$/.test(token)) cls = "cli-code__muted";+ return cls ? (+ <span key={tokenIndex} className={cls}>+ {token}+ </span>+ ) : (+ token+ );+ })}+ {"\n"}+ </span>+ );+ });++ const renderRows = (kind, heading, rows, tableId = `${id}--${kind}s`) =>+ rows.length ? (+ <div className="cli-cmd__table" id={tableId}>+ <h3 className="cli-cmd__table-title">{heading}</h3>+ {rows.map((row) => (+ <div key={row.name} id={anchor(kind, row.name)} className="cli-row">+ <div className="cli-row__head">+ <a+ className="cli-row__name"+ href={`#${anchor(kind, row.name)}`}+ onClick={(event) => jump(event, anchor(kind, row.name))}+ >+ {row.short ? `${row.short}, ` : ""}+ {row.name}+ {row.value && row.value !== `<${row.type}>` ? (+ <span className="cli-row__value"> {row.value}</span>+ ) : null}+ </a>+ {row.type ? <span className="cli-row__meta">{row.type}</span> : null}+ {row.required ? <span className="cli-row__meta cli-row__meta--required">required</span> : null}+ {kind === "arg" && !row.required ? <span className="cli-row__meta">optional</span> : null}+ {row.repeatable ? <span className="cli-row__meta">repeatable</span> : null}+ {row.deprecated ? <span className="cli-row__meta cli-row__meta--deprecated">deprecated</span> : null}+ </div>+ <div className="cli-row__doc">{inline(row.description)}</div>+ {row.default !== undefined ? (+ <div className="cli-row__default">+ Default: <code>{String(row.default)}</code>+ </div>+ ) : null}+ </div>+ ))}+ </div>+ ) : null;++ // Past two flags the heading stops being scannable, so it links to the table instead.+ const listed = flags.filter((flag) => !flag.deprecated);+ const collapseFlags = listed.length >= 3;+ const flagCount = flags.length + inheritedFlags.length;+ const flagsTable = flags.length ? `${id}--flags` : `${id}--inherited-flags`;++ const usageTokens = usage ? usage.match(/\[[^\]]*\](?:\.\.\.)?|<[^>]*>(?:\.\.\.)?|\S+/g) || [] : [];+ const isFlagsPlaceholder = (token) => /^\[.*\bflags\b.*\]$/.test(token);+ const usageNamesFlags = usageTokens.some(isFlagsPlaceholder);+ const paragraphs = description+ ? description.split(/\n\s*\n/).map((paragraph) => paragraph.replace(/\s*\n\s*/g, " ").trim())+ : [];++ const signature = (+ <>+ <span className="cli-usage__bin">infisical</span>{" "}+ <a className="cli-usage__cmd" href={`#${id}`} onClick={(event) => jump(event, id)}>+ {command}+ </a>+ {usage ? null : args.map((arg) => (+ <span key={arg.name}>+ {" "}+ <a+ className="cli-usage__arg"+ href={`#${anchor("arg", arg.name)}`}+ onClick={(event) => jump(event, anchor("arg", arg.name))}+ >+ {arg.name}+ </a>+ </span>+ ))}+ {usageTokens.map((token, index) => {+ const arg = args.find((candidate) => candidate.usage === token);+ let content = <span className="cli-usage__arg">{token}</span>;+ if (isFlagsPlaceholder(token) && flagCount) {+ content = (+ <a className="cli-usage__flag" href={`#${flagsTable}`} onClick={(event) => jump(event, flagsTable)}>+ {token}+ </a>+ );+ } else if (arg) {+ content = (+ <a+ className="cli-usage__arg"+ href={`#${anchor("arg", arg.name)}`}+ onClick={(event) => jump(event, anchor("arg", arg.name))}+ >+ {token}+ </a>+ );+ }+ return (+ <span key={`usage-${index}`}>+ {" "}+ {content}+ </span>+ );+ })}+ {usageNamesFlags ? null : collapseFlags ? (+ <span>+ {" "}+ <a+ className="cli-usage__flag"+ href={`#${id}--flags`}+ onClick={(event) => jump(event, `${id}--flags`)}+ >+ [flags]+ </a>+ </span>+ ) : (+ listed.map((flag) => (+ <span key={flag.name}>+ {" "}+ <a+ className="cli-usage__flag"+ href={`#${anchor("flag", flag.name)}`}+ onClick={(event) => jump(event, anchor("flag", flag.name))}+ >+ {flag.required ? "" : "["}+ {flag.name}+ {flag.value ? `=${flag.value}` : ""}+ {flag.required ? "" : "]"}+ </a>+ </span>+ ))+ )}+ </>+ );++ return (+ <section+ ref={sectionRef}+ id={id}+ className="cli-cmd"+ data-cli-command=""+ data-command={command}+ >+ <h2 className={heading ? "cli-cmd__title cli-cmd__title--text" : "cli-cmd__title"} ref={headingRef}>+ {heading ? (+ <a className="cli-usage__cmd" href={`#${id}`} onClick={(event) => jump(event, id)}>+ {heading}+ </a>+ ) : (+ signature+ )}+ </h2>+ <div className="cli-cmd__body">+ <div className="cli-cmd__description">+ {paragraphs.map((paragraph, index) => (+ <p key={index}>{inline(paragraph)}</p>+ ))}+ {children}+ </div>+ {subcommands.length ? (+ <div className="cli-subs" id={`${id}--subcommands`}>+ <h3 className="cli-cmd__table-title">Subcommands</h3>+ <ul className="cli-subs__list">+ {subcommands.map((sub) => (+ <li key={sub.id}>+ <a href={`#${sub.id}`} onClick={(event) => jump(event, sub.id)}>+ infisical {sub.command}+ </a>+ </li>+ ))}+ </ul>+ </div>+ ) : null}+ {renderRows("arg", "Arguments", args)}+ {renderRows("flag", "Flags", flags)}+ {renderRows("flag", "Inherited flags", inheritedFlags, `${id}--inherited-flags`)}+ {renderRows("env", "Environment variables", env)}+ </div>+ {examples.length ? (+ <aside className="cli-cmd__examples" aria-label={`Examples for infisical ${command}`}>+ <div className="cli-cmd__examples-inner">+ {examples.map((example, index) => (+ <figure key={index} className="cli-example">+ <figcaption className="cli-example__title">+ <span>{example.title}</span>+ <button+ type="button"+ className="cli-example__copy"+ aria-label={`Copy: ${example.title}`}+ onClick={() => copy(index, example.code)}+ >+ {copied === index ? "Copied" : "Copy"}+ </button>+ </figcaption>+ <pre className="cli-code">+ <code>{highlight(example.code)}</code>+ </pre>+ {example.output ? (+ <pre className="cli-code cli-code--output">+ <code>{example.output}</code>+ </pre>+ ) : null}+ </figure>+ ))}+ </div>+ </aside>+ ) : null}+ </section>+ );+};diff --git a/docs/snippets/agent-vault/QuickstartBody.mdx b/docs/snippets/agent-vault/QuickstartBody.mdxindex 17c901e1eb..da4cfa2144 100644--- a/docs/snippets/agent-vault/QuickstartBody.mdx+++ b/docs/snippets/agent-vault/QuickstartBody.mdx@@ -15,7 +15,7 @@ This quickstart guide walks you through using Agent Vault to launch an agent tha<ul><li>An Infisical organization where you're an Agent Vault admin</li>- <li>The <a href="/cli/overview">Infisical CLI</a> installed on the host that will run the proxy and on the host that will run the agent. For this guide, both hosts can be the same machine</li>+ <li>The <a href="/cli/install">Infisical CLI</a> installed on the host that will run the proxy and on the host that will run the agent. For this guide, both hosts can be the same machine</li><AgentPrereqLine /><ServicePrereqLine /></ul>@@ -179,7 +179,7 @@ The CLI adds the proxy's certificate authority to the agent process' trusted CAs<Card title="Proxies" icon="route" href="/documentation/platform/agent-vault/proxies">Forward proxies that intercept an AI agent's requests and attach real credentials on the way out.</Card>- <Card title="CLI reference" icon="terminal" href="/cli/commands/agent-vault">+ <Card title="CLI reference" icon="terminal" href="/cli/reference#agent-vault">Every flag of `infisical agent-vault proxy` and `infisical agent-vault run`.</Card></CardGroup>diff --git a/docs/snippets/cli/local-development/log-in.mdx b/docs/snippets/cli/local-development/log-in.mdxindex 57f88f10e9..de4bb31ec0 100644--- a/docs/snippets/cli/local-development/log-in.mdx+++ b/docs/snippets/cli/local-development/log-in.mdx@@ -4,7 +4,7 @@ Authenticate the CLI with your Infisical account.infisical login```-The prompt asks which instance you want to use. Select **Infisical Cloud (US)**, **Infisical Cloud (EU)**, or **Self-hosted**, then finish signing in through your browser.+The prompt asks which instance you want to use. Select **Infisical Cloud (US Region)**, **Infisical Cloud (EU Region)**, or **Self-Hosting or Dedicated Instance**, then finish signing in through your browser.<Note>On a machine with no browser, such as a remote SSH session, WSL 2, or Codespaces, run `infisical login -i` to log in from the terminal instead.diff --git a/docs/snippets/cli/local-development/start-application.mdx b/docs/snippets/cli/local-development/start-application.mdxindex 07f8a00ace..bdc613c0e9 100644--- a/docs/snippets/cli/local-development/start-application.mdx+++ b/docs/snippets/cli/local-development/start-application.mdx@@ -69,4 +69,4 @@ The CLI fetches the secrets you have access to and passes them to your applicatiThe `--command` flag is also how you chain commands together, as in `--command="npm run migrate && npm run dev"`.</Accordion>-For every available option, see the [`infisical run`](/cli/commands/run) reference.+For every available option, see the [`infisical run`](/cli/reference#run) reference.diff --git a/docs/style.css b/docs/style.cssindex 9622f04959..9c8e67d2c6 100644--- a/docs/style.css+++ b/docs/style.css@@ -1981,3 +1981,439 @@ a.ifx-card__title:hover .ifx-card__chevron {.dark .ifx-avqs__reset:hover {color: #fef3c7;}++/* CLI reference page (snippets/CLIPage.jsx) */+.cli-ref {+ --cli-top: 64px;+ --cli-page: #ffffff;+ --cli-ink: #171718;+ --cli-text: #3f3f46;+ --cli-muted: #6f6f6f;+ --cli-line: #ebebeb;+ --cli-soft: #f7f7f6;+ --cli-accent: #dbf530;+ --cli-accent-ink: #5f7000;+ --cli-accent-soft: #fbfde9;+ --cli-mono: ui-monospace, SFMono-Regular, Menlo, monospace;+ width: 100%;+ max-width: 80rem;+ margin: 0 auto;+ padding: 0 2.5rem 6rem;+ container-type: inline-size;+}++@media (max-width: 767px) {+ .cli-ref {+ padding: 0 1rem 4rem;+ }+}++.dark .cli-ref {+ --cli-ink: #f4f4f4;+ --cli-text: #adaeb0;+ --cli-muted: #707174;+ --cli-line: #1e1f24;+ --cli-soft: #101114;+ --cli-accent-ink: #dbf530;+ --cli-accent-soft: #1b1d0d;+ --cli-page: #08090b;+}++.cli-ref__hero {+ padding: 3rem 0 2.5rem;+ border-bottom: 1px solid var(--cli-line);+}++.cli-ref__title {+ margin: 0;+ font-family: var(--font-family-headings-custom, inherit);+ font-size: 2.25rem;+ font-weight: 400;+ line-height: 1.15;+ letter-spacing: -0.015em;+ color: var(--cli-ink);+}++.cli-ref__description {+ margin-top: 0.75rem;+ max-width: 42rem;+ font-size: 1.0625rem;+ line-height: 1.6;+ color: var(--cli-muted);+}++.cli-cmd {+ --cli-head: 3.5rem;+ display: grid;+ grid-template-columns: minmax(0, 1fr);+ gap: 1rem 2rem;+ padding: 2rem 0 0;+ border-bottom: 1px solid var(--cli-line);+ scroll-margin-top: var(--cli-top);+}++@container (min-width: 720px) {+ .cli-cmd {+ grid-template-columns: minmax(0, 1fr) minmax(0, 21rem);+ column-gap: 2.5rem;+ }++ .cli-cmd__body,+ .cli-cmd__examples {+ padding-bottom: 3rem;+ }++ .cli-cmd__examples-inner {+ position: sticky;+ top: calc(var(--cli-top) + var(--cli-head) + 1.5rem);+ }+}++.cli-cmd__title {+ grid-column: 1 / -1;+ position: sticky;+ top: var(--cli-top);+ z-index: 2;+ margin: 0 -2.5rem;+ padding: 0.75rem 2.5rem;+ background-color: var(--cli-page);+ border-bottom: 1px solid transparent;+ transition: border-color 0.2s ease-in-out;+ font-family: var(--cli-mono);+ font-size: 1.125rem;+ font-weight: 400;+ line-height: 1.6;+ color: var(--cli-muted);+}++.cli-cmd__title {+ overflow-wrap: anywhere;+}++/* With room for two columns, keep each flag and argument on one line so "[--" never ends a+ line. On narrow screens a single token can be wider than the screen, so any break is allowed. */+@container (min-width: 720px) {+ .cli-ref .cli-cmd__title a {+ white-space: nowrap;+ }+}++.cli-cmd__title--text {+ font-family: var(--font-family-headings-custom, inherit);+ font-size: 1.125rem;+ font-weight: 600;+ color: var(--cli-ink);+}++.cli-cmd--stuck .cli-cmd__title {+ border-bottom-color: var(--cli-line);+}++@media (max-width: 767px) {+ .cli-cmd__title {+ margin: 0 -1rem;+ padding: 0.75rem 1rem;+ }+}++.cli-usage__bin {+ font-weight: 400;+ color: var(--cli-muted);+}++.cli-ref .cli-cmd__title a {+ text-decoration: none;+ border-bottom: 1px solid transparent;+ transition: color 0.2s, border-color 0.2s;+}++.cli-ref .cli-cmd__title a:hover {+ color: var(--cli-accent-ink);+ border-bottom-color: currentColor;+}++.cli-usage__cmd {+ font-weight: 600;+ color: var(--cli-ink);+}++.cli-usage__arg {+ font-weight: 400;+ color: var(--cli-ink);+}++.cli-usage__flag {+ font-weight: 400;+ color: var(--cli-text);+}++/* Mintlify raises its anchors with z-index: 10; isolating the columns keeps them under the+ sticky heading. The bottom spacing lives here rather than on .cli-cmd because a sticky+ heading stops at its section's padding edge, and it should ride down to the divider. */+.cli-cmd__body,+.cli-cmd__examples {+ position: relative;+ z-index: 1;+ min-width: 0;+}++/* Flag names and help text can hold long unbroken strings that are wider than a phone. */+.cli-cmd__body {+ overflow-wrap: anywhere;+}++.cli-cmd > :last-child {+ padding-bottom: 3rem;+}++.cli-cmd__description {+ font-size: 0.9375rem;+ line-height: 1.7;+ color: var(--cli-text);+}++.cli-cmd__description [data-as="p"],+.cli-cmd__description p {+ display: block;+ margin: 0;+}++.cli-cmd__description [data-as="p"] + [data-as="p"],+.cli-cmd__description p + p {+ margin-top: 0.875rem;+}++.cli-cmd__table {+ margin-top: 2rem;+ scroll-margin-top: calc(var(--cli-top) + var(--cli-head) + 1rem);+}++.cli-cmd__table-title {+ margin: 0 0 0.25rem;+ padding-bottom: 0.625rem;+ border-bottom: 1px solid var(--cli-line);+ font-size: 0.9375rem;+ font-weight: 600;+ color: var(--cli-ink);+}++.cli-subs {+ margin-top: 2rem;+ scroll-margin-top: calc(var(--cli-top) + var(--cli-head) + 1rem);+}++.cli-subs__list {+ margin: 0.75rem 0 0;+ padding-left: 1.25rem;+ list-style: disc;+ font-size: 0.9375rem;+ line-height: 1.7;+ color: var(--cli-muted);+}++.cli-row {+ padding: 0.875rem 0.75rem;+ margin: 0 -0.75rem;+ border-bottom: 1px solid var(--cli-line);+ scroll-margin-top: calc(var(--cli-top) + var(--cli-head) + 1rem);+}++.cli-row:last-child {+ border-bottom: 0;+}++.cli-row:target,+.cli-row--flash {+ animation: cli-row-flash 1.6s ease-in-out;+}++@keyframes cli-row-flash {+ 0%,+ 40% {+ background-color: var(--cli-accent-soft);+ box-shadow: inset 2px 0 0 var(--cli-accent);+ }++ 100% {+ background-color: transparent;+ box-shadow: inset 2px 0 0 transparent;+ }+}++.cli-row__head {+ display: flex;+ flex-wrap: wrap;+ align-items: baseline;+ gap: 0.5rem;+}++.cli-row__name {+ font-family: var(--cli-mono);+ font-size: 0.8125rem;+ font-weight: 600;+ color: var(--cli-ink);+ text-decoration: none;+}++.cli-row__name:hover {+ color: var(--cli-accent-ink);+}++.cli-row__value {+ font-weight: 400;+ color: var(--cli-muted);+}++.cli-row__meta {+ font-size: 0.75rem;+ color: var(--cli-muted);+}++.cli-row__meta--required {+ color: #dc2626;+}++.cli-row__meta--deprecated {+ color: #a16207;+}++.cli-row__doc,+.cli-row__default {+ margin-top: 0.25rem;+ font-size: 0.875rem;+ line-height: 1.6;+ color: var(--cli-text);+}++.cli-row__default {+ color: var(--cli-muted);+}++.cli-ref .cli-cmd code:not(.cli-code code) {+ padding: 0.0625rem 0.3125rem;+ font-family: var(--cli-mono);+ font-size: 0.85em;+ color: var(--cli-ink);+ background-color: var(--cli-soft);+ border: 1px solid var(--cli-line);+}++.cli-row__doc a,+.cli-cmd__description a,+.cli-subs__list a {+ color: var(--cli-ink);+ text-decoration: underline;+ text-underline-offset: 2px;+}++.cli-example {+ margin: 0;+ background-color: #101114;+ border: 1px solid #1e1f24;+}++.cli-example + .cli-example {+ margin-top: 1rem;+}++.cli-example__title {+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: 1rem;+ padding: 0.5rem 0.875rem;+ border-bottom: 1px solid #1e1f24;+ font-size: 0.75rem;+ color: #adaeb0;+}++.cli-example__copy {+ flex: none;+ padding: 0;+ border: 0;+ background: none;+ font-size: 0.75rem;+ color: #707174;+ cursor: pointer;+ transition: color 0.2s;+}++.cli-example__copy:hover {+ color: #dbf530;+}++.cli-code {+ margin: 0;+ padding: 0.875rem;+ overflow-x: auto;+ background: transparent;+ font-family: var(--cli-mono);+ font-size: 0.75rem;+ line-height: 1.7;+ color: #dfdfdf;+ white-space: pre;+}++.cli-code code {+ font: inherit;+ color: inherit;+ background: none;+ border: 0;+ padding: 0;+}++.cli-code--output {+ border-top: 1px dashed #26272b;+ color: #8b8c8f;+}++.cli-code__bin {+ color: #dbf530;+}++.cli-code__flag {+ color: #9ee067;+}++.cli-code__string {+ color: #f7c97e;+}++@container (min-width: 960px) {+ .cli-cmd {+ grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);+ column-gap: 3rem;+ }+}++.cli-code__comment,+.cli-code__muted {+ color: #707174;+}++/* CLI command stubs in the sidebar (cli-reference-nav.js) link to headings on /cli/reference.+ Mintlify marks them as external links; they are not. */+#sidebar-content a[href*="/cli/reference#"] > div > div + div {+ display: none;+}++#sidebar-content li > a.cli-nav-active {+ background-color: rgb(38 39 43 / 0.1);+ color: #26272b;+ text-shadow: -0.2px 0 0 currentColor, 0.2px 0 0 currentColor;+}++.dark #sidebar-content li > a.cli-nav-active {+ background-color: rgb(219 245 48 / 0.1);+ color: #dbf530;+}++html[data-cli-nav] #sidebar-content li > a[aria-current="page"] {+ background-color: transparent;+ color: #3f3f3f;+ text-shadow: none;+}++html.dark[data-cli-nav] #sidebar-content li > a[aria-current="page"] {+ color: #9f9f9f;+}