You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+39-9Lines changed: 39 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,17 +73,35 @@ This installs dependencies, runs database migrations, and runs seed commands acc
73
73
|`--skip-db`| Skip database migrations and seed |
74
74
|`--dry-run`| Show what would run, without running |
75
75
76
-
### 3. Generate Docker Compose
76
+
### 3. Validate your config
77
+
78
+
Check that `.dev-env.yml` (and any `.env`) is well-formed without running setup or generate — handy for CI and pre-commit hooks:
79
+
80
+
```bash
81
+
envkit validate
82
+
```
83
+
84
+
It exits non-zero on a missing or invalid config. Add `--strict` to also fail on warnings (e.g. hardcoded passwords, port conflicts) and unresolved `${VAR}` references:
85
+
86
+
```bash
87
+
envkit validate --strict
88
+
```
89
+
90
+
### 4. Generate Docker Compose
77
91
78
92
When `docker.enabled` is set in your config, you can generate a Compose file from it:
79
93
80
94
```bash
81
95
envkit generate
82
96
```
83
97
84
-
Output goes to `docker-compose.yml` by default. Use `-o <file>` to write elsewhere, e.g. `envkit generate -o docker-compose.dev.yml`.
98
+
Output goes to `docker-compose.yml` by default. Use `-o <file>` to write elsewhere, e.g. `envkit generate -o docker-compose.dev.yml`. To preview the generated Compose without writing a file (e.g. to pipe or inspect it), use `--dry-run`:
85
99
86
-
### 4. Snapshots
100
+
```bash
101
+
envkit generate --dry-run
102
+
```
103
+
104
+
### 5. Snapshots
87
105
88
106
Save the current config as a named snapshot under `.devkit/snapshots/`:
89
107
@@ -97,13 +115,19 @@ If you omit the name, a timestamp-based name is used. List existing snapshots:
97
115
envkit snapshot list
98
116
```
99
117
100
-
Restore a snapshot (overwrites `.dev-env.yml`):
118
+
Restore a snapshot. This overwrites `.dev-env.yml`, but your current config is automatically backed up to a `pre-restore-<timestamp>` snapshot first, and you'll be asked to confirm in an interactive terminal (use `--yes` to skip the prompt in scripts):
101
119
102
120
```bash
103
121
envkit snapshot restore <name>
104
122
```
105
123
106
-
### 5. Share config (export / import)
124
+
Delete a snapshot you no longer need:
125
+
126
+
```bash
127
+
envkit snapshot delete <name>
128
+
```
129
+
130
+
### 6. Share config (export / import)
107
131
108
132
Export a safe-to-share copy of your config (passwords and secrets become placeholders like `${DB_PASSWORD}`):
109
133
@@ -119,7 +143,11 @@ Import a shared config file (it is validated and then written to `.dev-env.yml`
119
143
envkit share import path/to/dev-env.shared.yml
120
144
```
121
145
122
-
Use `-o <file>` to write to a different path (also relative to the current directory unless you pass an absolute path).
146
+
Use `-o <file>` to write to a different path (also relative to the current directory unless you pass an absolute path). To check a shared file is valid without writing anything (useful in CI), pass `--validate-only`:
|`envkit init`| Create `.dev-env.yml` interactively (wizard). Run from a project folder when you don’t have a config yet. |
138
166
|`envkit setup`| Install dependencies, run database migrations, and run seed commands from your config. Use `--skip-deps`, `--skip-db`, or `--dry-run` to limit what runs. |
139
-
|`envkit generate`| Generate `docker-compose.yml` from your config (requires `docker.enabled` in config). Use `-o <file>` to set the output path. |
167
+
|`envkit validate`| Validate `.dev-env.yml` (and `.env`) without running setup or generate. Add `--strict` to fail on warnings and unresolved `${VAR}` references. CI/pre-commit friendly. |
168
+
|`envkit generate`| Generate `docker-compose.yml` from your config (requires `docker.enabled` in config). Use `-o <file>` to set the output path, or `--dry-run` to print without writing. |
140
169
|`envkit snapshot create [name]`| Save the current `.dev-env.yml` as a snapshot under `.devkit/snapshots/`. Omit `name` to use a timestamp. |
141
170
|`envkit snapshot list`| List all saved snapshots. |
142
-
|`envkit snapshot restore <name>`| Restore a snapshot; overwrites `.dev-env.yml`. |
171
+
|`envkit snapshot restore <name>`| Restore a snapshot; overwrites `.dev-env.yml` (current config is backed up first). Use `--yes` to skip the confirmation prompt. |
172
+
|`envkit snapshot delete <name>`| Delete a saved snapshot. |
143
173
|`envkit share export`| Export a sanitized config (secrets → placeholders) to share safely. Default output: `dev-env.shared.yml`; use `-o <file>` to override. |
144
-
|`envkit share import <file>`| Import a shared config file; writes to `.dev-env.yml` by default. Use `-o <file>` to write elsewhere. |
174
+
|`envkit share import <file>`| Import a shared config file; writes to `.dev-env.yml` by default. Use `-o <file>` to write elsewhere, or `--validate-only` to validate without writing. |
145
175
|`envkit path-setup` or `envkit pathsetup`| Add the npm global bin folder to your PATH so `envkit` works from any directory. Use if the shell says “envkit” is not recognized after a global install. |
146
176
147
177
For more detail: `envkit --help` or `envkit <command> --help`.
0 commit comments