환경 변수 관리자
Diff Mask Secrets.env 파일을 관리하고 편집합니다.
Options
Summary
Share-safe report
Diff
0 rows| Key | A | B | Status |
|---|
Masking strategy
Sensitive keys are detected by name (SECRET, TOKEN, KEY, PASSWORD, etc.) and by value heuristics (JWT-like, long random strings). You can disable masking to see raw values locally.
Parsing
- Supports
export KEY=VALUE - Supports quoted values (
"..."or'...') - Inline comments are stripped for unquoted values (
VALUE # comment)
Environment Variables Best Practices
Environment variables are a fundamental part of the "Twelve-Factor App" methodology, which advocates for a strict separation of configuration from code. By using environment variables, you can run the same code in different environments (development, staging, production) simply by changing the configuration values.
Best practices include using descriptive, uppercase names (e.g., DATABASE_URL), providing default values for non-critical settings, and never hardcoding sensitive information directly into your source control.
Secret Management
Secrets are a special category of environment variables that contain sensitive information like API keys, database passwords, and private certificates. Managing these securely is critical to preventing data breaches. You should use a dedicated secret management service (like AWS Secrets Manager, HashiCorp Vault, or Cloudflare Secrets) for production environments.
For local development, .env files are commonly used, but they should never be committed to your git repository. Always add *.env to your .gitignore file.
.env Security
When sharing .env files with teammates for debugging, there is a high risk of accidentally exposing production secrets. Our manager helps mitigate this risk by providing a "Mask sensitive values" feature. It uses heuristics to identify keys like SECRET, TOKEN, or PASSWORD and replaces their values with a masked version (e.g., ab...yz (32)).
This allows you to compare the structure and non-sensitive values of your environment files without leaking the actual secrets.
Pro Tips
- Use the "Swap" button to quickly reverse the comparison direction between Environment A and Environment B.
- Leverage the "Filter keys" input to focus on specific groups of variables, such as all keys starting with
AWS_orDB_. - Always include a
.env.examplefile in your repository with dummy values to show other developers which variables are required for the app to run. - Remember that environment variables are typically strings; if your app needs a boolean or a number, ensure you parse the value correctly in your code.