Ops 📡
Basics
Learn the basics of dotenvx-ops in just a few minutes.
- Sync
- Observe
- Audit
Sync
Sync .env files.
Go to /new/project and create your project.
On the next screen you'll see a copy of your .env.x file.
Add it to your project's root.
.env.x
# motdotla/your-project/.env.x
DOTENVX_PROJECT_ID=prj_664c683dddf155a6480d524aa7a5e42d
# 1. Add this .env.x file to your project's root
# 2. Commit it safely to code
# 3. Sync with dotenvx-ops sync
The
DOTENVX_PROJECT_IDuniquely identifies your project and lives inside your.env.xfile.
Also add a .env file – if you haven't already.
.env
# .env
HELLO=World
Finally, run dotenvx-ops sync.
$ dotenvx-ops sync
✔ synced [motdotla/your-project]
That's it! Your project's .env files have been synced.
Observe
Auto-observe environment variables.
Given your app – or an example app like the following:
// index.js
console.log(`Hello ${process.env.HELLO}`)
Run dotenvx like this:
$ dotenvx run -- node index.js
[[email protected]] 📡 radar active
[[email protected]] injecting env (1) from .env
Hello World
That's it! Your environment variables are auto-observed at runtime.
Audit
Audit changes.
Make a change to your .env file's HELLO variable.
.env
HELLO="Darkness, my old friend"
Run sync.
$ dotenvx-ops sync
✔ synced [motdotla/your-project]
In the UI, navigate to DB -> HELLO key.
You get a complete breakdown of where, when, and for which values HELLO has been seen. Handy!