- Make your Environment’s variables available via locally mounted
.envfiles, without writing your credentials to disk. - Validate your locally mounted
.envfile setup in supported agents and IDEs with the 1Password agent hook. - Programmatically read your environment variables from 1Password in your terminal or in your Go, JavaScript, or Python integrations.
- Securely sync your environment variables to AWS Secrets Manager.
- Share Environments with your team members for easier collaboration and onboarding.
- Connect an integration to your 1Password Business account, so your team can access their secrets in their machine workflows.
.env files, or by manually adding key-value pairs for each variable.
Requirements
Before you can use Environments, you’ll need to:- Sign up for 1Password.
- Install and sign in to 1Password for Mac, Windows, or Linux.
- Have an Owner or Administrator turn the Environments policy on from the 1Password admin console.
New to 1Password developer tools?
Follow the developer quickstart to set up the CLI, create your first Environment, and add biometric SSH signing in one guide.
Create an Environment
- In the 1Password desktop app, go to Developer > View Environments.
- Select New environment.
- Enter a name for the new environment, then select Save. If you have multiple 1Password accounts, you can select which account to save the environment to.
Add variables to an Environment
After you create an Environment, you can add your project secrets as variables. 1Password Environment variables map to conventional environment variables . Each variable is a key-value pair that includes a name (for example,DB_HOST, DB_USER, or API_KEY) and a value that holds the corresponding secret.
To add variables to an Environment, open and unlock the 1Password desktop app, navigate to Developer > View Environments, then select the Environment you want to update.
You can add variables in two ways:
- If you have an existing
.envfile for your project, select Import .env file. 1Password will automatically import your environment variables. - To manually add environment variables, select New variable. Enter the environment variable name in the Name field and its secret in the Value field. Repeat this process for each environment variable you want to add.
Values are hidden by default, which means they’ll be masked in the output of CLI and SDK operations. To change this, select the verticle ellipsis next to the variable, then select Show value by default.
Use your Environments in your workflows
In the 1Password desktop app, you can configure each Environment to fit your workflow:- Local
.envfile: Create a locally mounted.envfile to make your environment variables available during local development without writing plaintext secrets to disk. - Agent hook: Use 1Password’s hook to validate your locally mounted
.envfiles with supported IDEs and agents like Cursor and GitHub Copilot. - Programmatically read Environments: Read environments then pass environment variables to applications and scripts using 1Password CLI or 1Password SDKs.
- AWS Secrets Manager: Sync secrets from 1Password to AWS Secrets Manager.
Manage your Environments
Values are hidden by default, but you can toggle the visibility on or off in the Actions column. You can also delete variables from this column. Select Edit within the environment to add, edit, or delete variables at a later time.Rename or remove an Environment
If you want to rename or remove an Environment:- In the 1Password desktop app, go to Developer > View Environments.
- Select the Environment you want to manage, then select Manage Environment.
- Choose Rename environment or Delete environment.
Share an Environment
If you’re using a shared account, such as for a team or business, you can share Environments with your team members. Each Environment remains independent, allowing you to work across multiple environments in different accounts while keeping environment variables separate. Access must be granted for each Environment. To share an Environment:- In the 1Password desktop app, go to Developer > View Environments.
- Select the Environment you want to share, then select Manage environment > Manage access. You’ll be redirected to the Admin Console.
- Select Manage, then search for and select the team members or groups you want to add to your Environment.
- To adjust permissions for team members or groups added to your Environment, select the People or Groups tab in the “Environment access” screen. Next to the team member or group name, select the ellipsis and choose to allow viewing, allow editing, or allow managing.
Sort and search Environments
You can curate your Environments view to surface information you need in the way that best supports your work. From the Environments page in the 1Password desktop app (Developer > View Environments), select the arrow next to the Name column to organize Environments alphabetically or reverse-alphabetically. Search for Environments from anywhere in the 1Password app using the top-level search bar to navigate to your Environments directly. Enter the name of an Environment in the search, then select it to go directly to that Environment’s details page. You can also sort or search for specific variables within Environments. Within an Environment’s details page, select the arrow next to the variables Name column to organize variables alphabetically or reverse-alphabetically. To search variables, select + Add variable then enter a variable name in the Search variables bar.Turn the Environments policy on or off
Owners and Administrators can turn Environments on or off from the 1Password Admin Console. This controls whether all users in an account have access to the Environments feature. If Environments are turned off, any previously created Environments and integrations will become inaccessible to users until the policy is re-enabled. No data is deleted when the policy is turned off. Full access to all previously created Environments will be restored if the policy is turned back on. If a user tries to access previously available Environments after the policy is turned off, they’ll see a message that the policy has been turned off with instructions to contact an Administrator if they need access. To turn the Environments policy on or off:- Sign in to 1Password.com with your administrator or owner account.
- From the sidebar, go to Policies then select Sharing and permissions.
- Select Developer permissions.
- Scroll to the Environments toggle, then turn it on or off.
- Follow the confirmation steps, then scroll to the bottom of the page and select Save.
Learn more
- Access secrets from 1Password through local
.envfiles - Use 1Password’s agent hook to validate local .env files from 1Password Environments
- Sync secrets between 1Password and AWS Secrets Manager (beta)
- Programmatically read Environments with 1Password CLI or 1Password SDKs
- 1Password Developer Watchtower
- Workflow: Secure your developer secrets
- Workflow: Secure local development
- Workflow: Secure your deployments