Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

docs(cli): match project config docs to shipped YAML keys

Claude4ea33d0a9e4d
diff --git a/docs/cli/project-config.mdx b/docs/cli/project-config.mdx
index 7101cf8f32..639b2382cf 100644
--- a/docs/cli/project-config.mdx
+++ b/docs/cli/project-config.mdx
@@ -49,7 +49,7 @@ If the directory already has `.infisical.yaml` or `.infisical.json`, `infisical
## 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#sm-run--flag-env). To use a different environment by default, set `environment.default` under `secrets-management` to the environment's slug (`defaultEnvironment` in `.infisical.json`):
+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#sm-run--flag-env). To use a different environment by default, set `environment` under `secrets-management` to the environment's slug (`defaultEnvironment` in `.infisical.json`):
<CodeGroup>
@@ -57,8 +57,7 @@ Without an environment setting, commands read secrets from your project's [`dev`
version: 1
secrets-management:
project-id: <project-id>
- environment:
- default: staging
+ environment: staging
```
```json .infisical.json
@@ -70,7 +69,7 @@ secrets-management:
</CodeGroup>
-To pick the environment from the Git branch you're on, list each branch and its environment slug under `environment.overrides.git-branch` (`gitBranchToEnvironmentMapping` in `.infisical.json`):
+To pick the environment from the Git branch you're on, list each branch and its environment slug under `overrides.git-branch` (`gitBranchToEnvironmentMapping` in `.infisical.json`):
<CodeGroup>
@@ -78,14 +77,13 @@ To pick the environment from the Git branch you're on, list each branch and its
version: 1
secrets-management:
project-id: <project-id>
- environment:
- default: dev
- overrides:
- git-branch:
- - branch: main
- environment: prod
- - branch: staging
- environment: staging
+ environment: dev
+ overrides:
+ git-branch:
+ - branch: main
+ environment: prod
+ - branch: staging
+ environment: staging
```
```json .infisical.json
@@ -104,7 +102,7 @@ secrets-management:
The CLI matches only the last part of a branch name, after the final `/`. For example, the branch `release/staging` matches `staging`. If your current branch has no match, or you aren't on a branch (such as when you check out a specific commit), the CLI falls back to the default environment.
<Note>
- If an older version of `infisical init` wrote your `.infisical.yaml`, the file may set `default-environment` and `mappings.git-branch-to-environment` instead. The CLI still reads both keys. If `environment.default` is set, the CLI ignores `default-environment`. If `environment.overrides.git-branch` has any entries, the CLI ignores `mappings.git-branch-to-environment`.
+ If an older version of `infisical init` wrote your `.infisical.yaml`, the file may set `default-environment` and `mappings.git-branch-to-environment` instead. The CLI still reads both keys. If `environment` is set, the CLI ignores `default-environment`. If `overrides.git-branch` has any entries, the CLI ignores `mappings.git-branch-to-environment`.
</Note>
The CLI picks the environment in this order:
@@ -112,12 +110,12 @@ The CLI picks the environment in this order:
1. The `--env` flag
2. The `INFISICAL_ENVIRONMENT` environment variable
3. The environment that matches your current Git branch
-4. The default environment (`environment.default` or `defaultEnvironment`)
+4. The default environment (`environment` or `defaultEnvironment`)
5. `dev`
## Set the folder
-Without a folder setting, commands read secrets from the root of the environment (`/`) unless you pass [`--path`](/cli/reference#sm-run--flag-path). To read from a different [folder](/documentation/platform/folder) by default, set `default-secret-path` under `secrets-management` (`defaultSecretPath` in `.infisical.json`):
+Without a folder setting, commands read secrets from the root of the environment (`/`) unless you pass [`--path`](/cli/reference#sm-run--flag-path). To read from a different [folder](/documentation/platform/folder) by default, set `secret-path` under `secrets-management` (`defaultSecretPath` in `.infisical.json`):
<CodeGroup>
@@ -125,7 +123,7 @@ Without a folder setting, commands read secrets from the root of the environment
version: 1
secrets-management:
project-id: <project-id>
- default-secret-path: /backend
+ secret-path: /backend
```
```json .infisical.json
@@ -141,9 +139,11 @@ The CLI picks the folder in this order:
1. The `--path` flag
2. The `INFISICAL_SECRET_PATH` environment variable
-3. `default-secret-path` or `defaultSecretPath`
+3. `secret-path` or `defaultSecretPath`
4. `/`
+The CLI still reads the older `default-secret-path` key in `.infisical.yaml`, but ignores it if `secret-path` is set.
+
The [`infisical sm secrets folders`](/cli/reference#sm-secrets-folders) commands don't read either setting, so pass `--path` to work in a folder other than `/`.
## Set the Infisical instance
@@ -227,15 +227,15 @@ The version of the `.infisical.yaml` format. `infisical init` sets it to `1`. `.
The ID of the project to read secrets from. Not used when you authenticate as a machine identity. In `.infisical.json`, the field is `workspaceId`.
</ResponseField>
-<ResponseField name="secrets-management.environment.default" type="string">
+<ResponseField name="secrets-management.environment" type="string">
The environment slug to use when `--env` and `INFISICAL_ENVIRONMENT` aren't set and no branch override matches. In `.infisical.json`, the field is `defaultEnvironment`.
</ResponseField>
-<ResponseField name="secrets-management.environment.overrides.git-branch" type="object[]">
+<ResponseField name="secrets-management.overrides.git-branch" type="object[]">
A list of branches, each with the environment slug to use on that branch, such as `branch: main` and `environment: prod`. The CLI compares each `branch` with only the last part of the current branch name, after the final `/`. In `.infisical.json`, the field is `gitBranchToEnvironmentMapping`, an object that maps branch names to environment slugs, such as `"main": "prod"`.
</ResponseField>
-<ResponseField name="secrets-management.default-secret-path" type="string">
+<ResponseField name="secrets-management.secret-path" type="string">
The folder to read secrets from when [`--path`](/cli/reference#sm-run--flag-path) and `INFISICAL_SECRET_PATH` aren't set. The `infisical sm` commands read it, except `infisical sm secrets folders`. In `.infisical.json`, the field is `defaultSecretPath`.
</ResponseField>
diff --git a/docs/cli/reference.mdx b/docs/cli/reference.mdx
index b0b1e3b913..dbf2b9ea5e 100644
--- a/docs/cli/reference.mdx
+++ b/docs/cli/reference.mdx
@@ -1180,9 +1180,9 @@ For an agent on your own computer, [infisical sm agent-proxy run](/cli/reference
{ 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.yaml` maps to your git branch, then its `environment.default`." },
+ { 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.yaml` maps to your git branch, then its `secrets-management.environment`." },
{ 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 `default-secret-path` in `.infisical.yaml`." },
+ { 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 `secrets-management.secret-path` in `.infisical.yaml`." },
{ 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.yaml`." },
{ 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.yaml`." },
{ 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`." },
@@ -1215,11 +1215,11 @@ The command exits with the agent's exit code.
{ 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.yaml` maps to your git branch, then its `environment.default`." },
+ { 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.yaml` maps to your git branch, then its `secrets-management.environment`." },
{ 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 `default-secret-path` in `.infisical.yaml`." },
+ { name: "--path", value: "<string>", type: "string", default: "/", description: "The folder to fetch proxied services from. Without it, the CLI reads `INFISICAL_SECRET_PATH`, then `secrets-management.secret-path` in `.infisical.yaml`." },
{ 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.yaml`." },
{ 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." },
diff --git a/docs/documentation/platform/agent-proxy/local-agent-proxy.mdx b/docs/documentation/platform/agent-proxy/local-agent-proxy.mdx
index cc1e5bd4bc..3dbe156902 100644
--- a/docs/documentation/platform/agent-proxy/local-agent-proxy.mdx
+++ b/docs/documentation/platform/agent-proxy/local-agent-proxy.mdx
@@ -102,8 +102,8 @@ Every option resolves the same way: **the flag → an environment variable → `
| Option | Flag | Environment variable | `.infisical.yaml` |
| --- | --- | --- | --- |
| Project | `--projectId` | `INFISICAL_PROJECT_ID` | `secrets-management.project-id` |
-| Environment slug | `--env` | `INFISICAL_ENVIRONMENT` | `secrets-management.environment.default` |
-| Secret path | `--path` | `INFISICAL_SECRET_PATH` | `secrets-management.default-secret-path` |
+| Environment slug | `--env` | `INFISICAL_ENVIRONMENT` | `secrets-management.environment` |
+| Secret path | `--path` | `INFISICAL_SECRET_PATH` | `secrets-management.secret-path` |
| Instance | `--domain` | `INFISICAL_DOMAIN` | `general.domain` |
| Sandbox | `--sandbox` / `--no-sandbox` | `INFISICAL_AGENT_PROXY_SANDBOX` | — |
diff --git a/docs/documentation/platform/agent-proxy/standalone-agent-proxy.mdx b/docs/documentation/platform/agent-proxy/standalone-agent-proxy.mdx
index aa75f56b9d..f62920afc5 100644
--- a/docs/documentation/platform/agent-proxy/standalone-agent-proxy.mdx
+++ b/docs/documentation/platform/agent-proxy/standalone-agent-proxy.mdx
@@ -69,8 +69,8 @@ Every option resolves from the same sources, in order: **the flag → an environ
| Auth | `--client-id` / `--client-secret` | `INFISICAL_UNIVERSAL_AUTH_CLIENT_ID` / `_SECRET` | — |
| Instance | `--domain` | `INFISICAL_DOMAIN` | `general.domain` |
| Project | `--projectId` | `INFISICAL_PROJECT_ID` | `secrets-management.project-id` |
-| Environment slug | `--env` | `INFISICAL_ENVIRONMENT` | `secrets-management.environment.default` |
-| Secret path | `--path` | `INFISICAL_SECRET_PATH` | `secrets-management.default-secret-path` |
+| Environment slug | `--env` | `INFISICAL_ENVIRONMENT` | `secrets-management.environment` |
+| Secret path | `--path` | `INFISICAL_SECRET_PATH` | `secrets-management.secret-path` |
| Proxy address | `--proxy` | `INFISICAL_AGENT_PROXY_ADDRESS` | — |
<Note>