Tutorials

Adding Teammates

Run dotenv-vault open

Open terminal, enter your project's root directory (where your .env.vault file is), and run dotenv-vault open.

$ npx dotenv-vault open
FYI: Not a developer? You can navigate to this page by visiting ui.dotenv.org.

Click Team Dropdown

Click the 'Team' dropdown button and then click 'Manage access'.

Click Add Teammate

On the next page, click 'Add Teammate'.

Enter Teammate's Email Address

Enter your teammate's email address and click 'Add teammate'.

Tell Your Teammate to Check Their Email

They will receive an email with instructions to run dotenv-vault pull. They can also choose to log in.

Teammate: Run dotenv-vault login

Your teammate visits their terminal, enters the project directory (which they've already git-cloned via a service like GitHub or GitLab), and runs dotenv-vault login.

$ npx dotenv-vault login

Teammate: Click Login

On the next screen, your teammate should follow the login process and click 'Log in'.

Teammate: View .env.me file (optional)

Your teammate now has their own .env.me file (on their machine only) in the root of the project. The .env.me file uniquely authorizes them to access the project's shared .env file. Think of it like a unique SSH key at GitHub.

Run ls -al to view it.

$ ls -al
Jul 28 17:54 .
Jul 27 13:46 ..
Jul 28 18:11 .env.me
Jul 28 18:09 .env.vault
Jul 28 17:54 .gitignore
Jul 27 14:49 index.js
...

Teammate: Run dotenv-vault pull

Your teammate returns to their terminal and runs dotenv-vault pull.

$ npx dotenv-vault pull

remote:   Securely pulling... done
remote:   Securely pulled development (.env)

Teammate: Run dotenv-vault push (optional)

Your teammate can edit the .env file and push changes with dotenv-vault push.

$ npx dotenv-vault push

remote:   Securely pushing (.env)... done
remote:   Securely pulled development (.env)

You: Run dotenv-vault pull (optional)

Pull the changes your teammate made with dotenv-vault pull.

$ npx dotenv-vault pull

remote:   Securely pulling... done
remote:   Securely pulled development (.env)

That's it! Thanks for using dotenv-vault with your teammates and friends.