.env file.
Prerequisites:
- An Infisical account on Infisical Cloud or a self-hosted instance
- The Infisical CLI installed for your platform
- An application or script you run locally
Step 1: Configure in Infisical
Create a project
In Infisical, a project holds all secrets for one application or service. To create a project:1
Log in to Infisical.
2
Select Secrets Management > + Add New Project.
3
In the Project Name field, enter a name for the project (e.g.,
orders-service).4
Select Create Project.

Within a project, secrets are organized across environments. Every new project starts with three environments: Development, Staging, and Production.
Add your secrets
You have two options for adding secrets to your project:- Create secrets manually
- Import secrets from an existing file
To create a new secret from scratch:
1
Select + Add a New Secret.
2
In the Key and Value fields, enter a key-value pair. For example:

3
Select Create Secret.
4
Repeat these steps for each key-value pair you want to add.
Step 2: Connect your app to Infisical
Now that you’ve set up a project that holds your secrets in Infisical, you can connect your application and give it access to those secrets at runtime.Authenticate with the CLI
Authenticate with the Infisical CLI by runninginfisical login:
In a containerized environment such as WSL 2 or Codespaces, run
infisical login -i to avoid browser-based login.Connect your project
Next, connect your application to your Infisical project:1
In your application’s directory, link it to the Infisical project you created by running
infisical init:2
Follow the prompts to select the organization/project where you created your secrets earlier. This writes a
.infisical.json file to your project with local project settings:.infisical.json
.infisical.json files contain no secrets and are safe to commit to version control systems like git.Step 3: Inject secrets into your app
Now that your Infisical project is configured within your application, Infisical can provide the secrets. Start your application by wrapping its start command withinfisical run:
You can now manage your application’s secrets through Infisical without needing a
.env file.Next Steps
Core Concepts
Understand how projects, environments, folders, and secrets fit together.
Secrets Delivery
Deliver secrets to production with SDKs, agents, Kubernetes, and CI/CD.
Local Development Guide
Set up a secure local development workflow for your whole team.
Access Control
Scope who can access which environments and paths.
