Skip to main content

What changed

The CLI is moving away from .infisical.json. It now reads project settings from .infisical.yaml. The CLI still reads .infisical.json for now, but a future release will stop reading it.

Who is affected

You’re affected if you use an .infisical.json file anywhere, including:
  • Repositories with a committed .infisical.json
  • Container images that copy .infisical.json into the image

Prerequisites

  • Infisical CLI 0.43.145 or later on every machine that reads the file, including developer machines, CI pipelines, and container images (upgrade the CLI)
Older versions of the CLI don’t read .infisical.yaml, so after you delete .infisical.json, those versions can’t find the project linked to the directory.

Migration steps

Convert the file with the infisical migrate-config command, or edit it by hand.
1
In the directory that holds .infisical.json, run:
The command copies every setting from .infisical.json into a new .infisical.yaml in the same directory, deletes .infisical.json, and prints the paths of both files:
2
Commit the new file and the deletion of the old one:
The command converts one file. If your repository has more than one .infisical.json, such as one per package in a monorepo, run the command in each directory that holds one.
If a Dockerfile or CI script refers to .infisical.json by name, such as in a COPY instruction, change it to .infisical.yaml.

Verify the migration

In the directory that holds .infisical.yaml, run a command that reads the file, such as:
Check that the command lists the secrets from the project and environment you expect. If it reports that the project ID is missing, compare the keys in .infisical.yaml with the field mapping.

FAQ

The CLI can read both .infisical.yaml and .infisical.json. But .infisical.yaml takes precedence
infisical init writes a new .infisical.yaml that holds only the project ID, so you lose the environment, branch mapping, folder, and instance settings from .infisical.json. To keep those settings, run infisical migrate-config.
Set the INFISICAL_DISABLE_WORKSPACE_CONFIG_MIGRATION_NOTICE environment variable to any value, such as true. The CLI prints the notice at most once a day and writes it to standard error, so the notice doesn’t change the output of commands like infisical export.