feat: dotenvx#11
Merged
Merged
Conversation
0xnigir1
reviewed
Jun 26, 2025
Comment on lines
+30
to
+49
| - Encrypt the `.env` file and get your `.env.keys` | ||
|
|
||
| ```bash | ||
| $ pnpm env:encrypt | ||
| ``` | ||
|
|
||
| Note that your `.env` file will be encrypted and tracked by git but the `.env.keys` won't. | ||
|
|
||
| To add a new env variable use the `pnpm env:set` command | ||
|
|
||
| ```bash | ||
| pnpm env:set <key> <value> | ||
| ``` | ||
|
|
||
| To get the value of an encrypted env variable, use the `pnpm env:get` command. | ||
|
|
||
| ```bash | ||
| pnpm env:get <key> | ||
| ``` | ||
|
|
Contributor
There was a problem hiding this comment.
so what we should share between teammates is the .env.keys that contains the private key for encrypt/decrypt right? i think i would add this so it's clear
Contributor
There was a problem hiding this comment.
ah just read the Notion guide, maybe when the dotenvx is in the handbook, we could add a reference here 💡
Comment on lines
+10
to
+19
| "env:decrypt": "npx @dotenvx/dotenvx decrypt", | ||
| "env:encrypt": "npx @dotenvx/dotenvx encrypt", | ||
| "env:get": "npx @dotenvx/dotenvx get", | ||
| "env:prebuild": "npx @dotenvx/dotenvx ext prebuild", | ||
| "env:set": "npx @dotenvx/dotenvx set", | ||
| "format": "prettier --check \"{src,test}/**/*.{js,ts,json}\"", | ||
| "format:fix": "prettier --write \"{src,test}/**/*.{js,ts,json}\"", | ||
| "lint": "eslint \"{src,test}/**/*.{js,ts,json}\"", | ||
| "lint:fix": "pnpm lint --fix", | ||
| "start": "node dist/index.js", | ||
| "start": "npx @dotenvx/dotenvx run -- node dist/index.js", |
Contributor
There was a problem hiding this comment.
do you know if this works, for example, when dockerizing an app?
Contributor
Author
There was a problem hiding this comment.
There is a Use dotenvx with docker doc
In general the strategy is to install the tool with curl and then using the dotenvx run command
0xnigir1
approved these changes
Jun 26, 2025
jahabeebs
approved these changes
Jun 26, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Linear
Closes SCR-31
Description
This PR implements a significant update to our environment configuration system, transitioning to
dotenvxand improving our environment management workflow.Changes
Documentation and Setup
.env.examplefor better developer onboardingEnvironment Configuration
env.tsenv:prebuildscript for environment setup.gitignoreto include.env.keysand streamlined env file patternsDependencies and Maintenance
Additional Notes
This PR represents a shift from traditional dotenv to dotenvx for improved environment variable management. All developers should review the updated README.md for new environment setup instructions.
Checklist before requesting a review