Skip to content

Commit 5c21e53

Browse files
committed
chore: workspace
1 parent ea79592 commit 5c21e53

3 files changed

Lines changed: 149 additions & 172 deletions

File tree

README.md

Lines changed: 1 addition & 148 deletions
Original file line numberDiff line numberDiff line change
@@ -1,148 +1 @@
1-
# dotenv-diff
2-
3-
Scan your codebase to detect every environment variable reference. It helps you catch missing, unused, duplicated, and misused variables early, before they cause runtime errors.
4-
5-
First-class support for SvelteKit and Next.js. Also works well in modern JavaScript/TypeScript projects and frameworks like Node.js, Nuxt, and Vue — or any other setup where you want reliable .env file comparison.
6-
7-
[![Coverage Status](https://codecov.io/gh/Chrilleweb/dotenv-diff/branch/main/graph/badge.svg)](https://codecov.io/gh/Chrilleweb/dotenv-diff)
8-
[![npm version](https://img.shields.io/npm/v/dotenv-diff.svg)](https://www.npmjs.com/package/dotenv-diff)
9-
[![npm downloads](https://img.shields.io/npm/dt/dotenv-diff.svg)](https://www.npmjs.com/package/dotenv-diff)
10-
11-
---
12-
13-
### Warnings & errors detection
14-
![Demo](./docs/assets/demo.gif)
15-
16-
### Clean / successful scan
17-
![Successful Scan](./docs/assets/success.png)
18-
19-
---
20-
21-
## Why dotenv-diff?
22-
23-
- Ensure all required environment variables are defined before deploying
24-
- Catch missing or misconfigured variables early in development
25-
- Improve collaboration by keeping teams aligned on required variables
26-
- Reduce the risk of committing sensitive data
27-
- Scale easily for monorepos and multi-environment setups
28-
29-
---
30-
31-
## How It Works
32-
33-
→ See [Capabilities Documentation](./docs/capabilities.md) for details on what the scanner checks for and how it works.
34-
35-
---
36-
37-
## Configuration (`--init`)
38-
39-
Generate a default configuration file:
40-
41-
```bash
42-
dotenv-diff --init
43-
```
44-
45-
→ See [Configuration Documentation](./docs/configuration_and_flags.md#configuration-file) for more details.
46-
47-
---
48-
49-
## Git hooks and CI/CD Integration
50-
51-
Easily integrate dotenv-diff into your Git hooks or CI/CD pipelines to enforce environment variable consistency.
52-
53-
→ See [Git Hooks Documentation](./docs/git_hooks_ci.md) for more details.
54-
55-
## Framework-Specific Warnings
56-
57-
In SvelteKit and Next.js projects, dotenv-diff detects framework-specific
58-
environment variable misuses.
59-
60-
Example warning:
61-
62-
```bash
63-
Framework issues (Sveltekit):
64-
- PUBLIC_URL (src/routes/+page.ts:1)
65-
→ Variables accessed through import.meta.env must start with "VITE_"
66-
```
67-
68-
→ See [Framework Documentation](./docs/frameworks/index.md) for more details.
69-
70-
## Ignore Comments
71-
72-
You can ignore specific environment variable warnings by adding comments in your code. For example:
73-
74-
```javascript
75-
const apiKey = process.env.API_KEY; // dotenv-diff-ignore
76-
```
77-
78-
This is helpful when you know a specific warning is safe in your source code.
79-
80-
→ See [Ignore Comments Documentation](./docs/ignore_comments.md) for more details.
81-
82-
---
83-
84-
## Expiration Warnings
85-
86-
Add expiration metadata to your environment variables to get warnings when they are about to expire. For example, in your `.env` file:
87-
88-
```bash
89-
# @expire 2025-12-31
90-
API_TOKEN=
91-
```
92-
93-
→ See [Expiration Documentation](./docs/expiration_warnings.md) for more details.
94-
95-
---
96-
97-
## Monorepo support
98-
99-
In monorepos with multiple apps and packages, you can include shared folders:
100-
101-
```json
102-
{
103-
"scripts": {
104-
"dotenv-diff": "dotenv-diff --example .env.example --include-files '../../packages/**/*' --ignore VITE_MODE"
105-
}
106-
}
107-
```
108-
109-
→ See [Monorepo Documentation](./docs/monorepo_support.md) for more details.
110-
111-
This will:
112-
- Scan the current app
113-
- Include shared packages
114-
- Ignore variables used only in specific environments
115-
116-
---
117-
118-
## Exit Codes
119-
120-
- `0` → No errors
121-
- `1` → Errors found (or warnings in strict mode)
122-
123-
---
124-
125-
## Documentation
126-
127-
→ See [dotenv-diff Documentation](./docs/index.md) for full documentation
128-
129-
---
130-
131-
## Contributing
132-
133-
Issues and pull requests are welcome.
134-
→ See [CONTRIBUTING](CONTRIBUTING.md) for details.
135-
136-
Thanks to these amazing people for contributing to this project:
137-
138-
<a href="https://github.com/Chrilleweb/dotenv-diff/graphs/contributors">
139-
<img src="https://contrib.rocks/image?repo=Chrilleweb/dotenv-diff" />
140-
</a>
141-
142-
---
143-
144-
## License
145-
146-
Licensed under the [MIT](LICENSE) license.
147-
148-
Created by [chrilleweb](https://github.com/chrilleweb)
1+
packages/cli/README.md

packages/cli/LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

packages/cli/README.md

Lines changed: 148 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,151 @@
11
# dotenv-diff
22

3-
> This is the cli package for [dotenv-diff](https://www.npmjs.com/package/dotenv-diff)
3+
Scan your codebase to detect every environment variable reference. It helps you catch missing, unused, duplicated, and misused variables early, before they cause runtime errors.
44

5-
[![npm package](https://img.shields.io/npm/v/dotenv-diff)](https://www.npmjs.com/package/dotenv-diff)
6-
[![npm downloads](https://img.shields.io/npm/dt/dotenv-diff)](https://www.npmjs.com/package/dotenv-diff)
5+
First-class support for SvelteKit and Next.js. Also works well in modern JavaScript/TypeScript projects and frameworks like Node.js, Nuxt, and Vue — or any other setup where you want reliable .env file comparison.
6+
7+
[![Coverage Status](https://codecov.io/gh/Chrilleweb/dotenv-diff/branch/main/graph/badge.svg)](https://codecov.io/gh/Chrilleweb/dotenv-diff)
8+
[![npm version](https://img.shields.io/npm/v/dotenv-diff.svg)](https://www.npmjs.com/package/dotenv-diff)
9+
[![npm downloads](https://img.shields.io/npm/dt/dotenv-diff.svg)](https://www.npmjs.com/package/dotenv-diff)
10+
11+
---
12+
13+
### Warnings & errors detection
14+
15+
![Demo](./docs/assets/demo.gif)
16+
17+
### Clean / successful scan
18+
19+
![Successful Scan](./docs/assets/success.png)
20+
21+
---
22+
23+
## Why dotenv-diff?
24+
25+
- Ensure all required environment variables are defined before deploying
26+
- Catch missing or misconfigured variables early in development
27+
- Improve collaboration by keeping teams aligned on required variables
28+
- Reduce the risk of committing sensitive data
29+
- Scale easily for monorepos and multi-environment setups
30+
31+
---
32+
33+
## How It Works
34+
35+
→ See [Capabilities Documentation](./docs/capabilities.md) for details on what the scanner checks for and how it works.
36+
37+
---
38+
39+
## Configuration (`--init`)
40+
41+
Generate a default configuration file:
42+
43+
```bash
44+
dotenv-diff --init
45+
```
46+
47+
→ See [Configuration Documentation](./docs/configuration_and_flags.md#configuration-file) for more details.
48+
49+
---
50+
51+
## Git hooks and CI/CD Integration
52+
53+
Easily integrate dotenv-diff into your Git hooks or CI/CD pipelines to enforce environment variable consistency.
54+
55+
→ See [Git Hooks Documentation](./docs/git_hooks_ci.md) for more details.
56+
57+
## Framework-Specific Warnings
58+
59+
In SvelteKit and Next.js projects, dotenv-diff detects framework-specific
60+
environment variable misuses.
61+
62+
Example warning:
63+
64+
```bash
65+
Framework issues (Sveltekit):
66+
- PUBLIC_URL (src/routes/+page.ts:1)
67+
→ Variables accessed through import.meta.env must start with "VITE_"
68+
```
69+
70+
→ See [Framework Documentation](./docs/frameworks/index.md) for more details.
71+
72+
## Ignore Comments
73+
74+
You can ignore specific environment variable warnings by adding comments in your code. For example:
75+
76+
```javascript
77+
const apiKey = process.env.API_KEY; // dotenv-diff-ignore
78+
```
79+
80+
This is helpful when you know a specific warning is safe in your source code.
81+
82+
→ See [Ignore Comments Documentation](./docs/ignore_comments.md) for more details.
83+
84+
---
85+
86+
## Expiration Warnings
87+
88+
Add expiration metadata to your environment variables to get warnings when they are about to expire. For example, in your `.env` file:
89+
90+
```bash
91+
# @expire 2025-12-31
92+
API_TOKEN=
93+
```
94+
95+
→ See [Expiration Documentation](./docs/expiration_warnings.md) for more details.
96+
97+
---
98+
99+
## Monorepo support
100+
101+
In monorepos with multiple apps and packages, you can include shared folders:
102+
103+
```json
104+
{
105+
"scripts": {
106+
"dotenv-diff": "dotenv-diff --example .env.example --include-files '../../packages/**/*' --ignore VITE_MODE"
107+
}
108+
}
109+
```
110+
111+
→ See [Monorepo Documentation](./docs/monorepo_support.md) for more details.
112+
113+
This will:
114+
115+
- Scan the current app
116+
- Include shared packages
117+
- Ignore variables used only in specific environments
118+
119+
---
120+
121+
## Exit Codes
122+
123+
- `0` → No errors
124+
- `1` → Errors found (or warnings in strict mode)
125+
126+
---
127+
128+
## Documentation
129+
130+
→ See [dotenv-diff Documentation](./docs/index.md) for full documentation
131+
132+
---
133+
134+
## Contributing
135+
136+
Issues and pull requests are welcome.
137+
→ See [CONTRIBUTING](CONTRIBUTING.md) for details.
138+
139+
Thanks to these amazing people for contributing to this project:
140+
141+
<a href="https://github.com/Chrilleweb/dotenv-diff/graphs/contributors">
142+
<img src="https://contrib.rocks/image?repo=Chrilleweb/dotenv-diff" />
143+
</a>
144+
145+
---
146+
147+
## License
148+
149+
Licensed under the [MIT](LICENSE) license.
150+
151+
Created by [chrilleweb](https://github.com/chrilleweb)

0 commit comments

Comments
 (0)