Skip to content

Commit 264daa2

Browse files
docs: bump to 1.3.0 and document new commands/flags
- README: validate section, dry-run, snapshot restore safety + delete, share validate-only, updated command table - STATUS.md + DEVELOPMENT.md: new commands - AUDIT.md: mark v1.3.0 improvements done, correct outdated healthcheck note - .dev-env.example.yml: seed path + generic service healthcheck (test) example - package.json: 1.2.0 -> 1.3.0
1 parent 9d8da21 commit 264daa2

3 files changed

Lines changed: 48 additions & 10 deletions

File tree

.dev-env.example.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ databases:
2626
command: npm run migrate
2727
seed:
2828
command: npm run seed
29+
path: . # optional: directory to run the seed command in (default ".")
2930

3031
# - type: redis
3132
# version: "7"
@@ -53,6 +54,13 @@ health_checks:
5354
# - name: redis
5455
# type: redis
5556
# url: redis://localhost:6379
57+
# Generic (non-database) services can define a raw healthcheck command with `test`:
58+
# - name: rabbitmq_1 # matches the generated service name, or use type
59+
# type: rabbitmq
60+
# test: rabbitmq-diagnostics -q ping
61+
# interval: 30s
62+
# timeout: 10s
63+
# retries: 5
5664

5765
# Snapshot configuration
5866
snapshot:

README.md

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,35 @@ This installs dependencies, runs database migrations, and runs seed commands acc
7373
| `--skip-db` | Skip database migrations and seed |
7474
| `--dry-run` | Show what would run, without running |
7575

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
7791

7892
When `docker.enabled` is set in your config, you can generate a Compose file from it:
7993

8094
```bash
8195
envkit generate
8296
```
8397

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`:
8599

86-
### 4. Snapshots
100+
```bash
101+
envkit generate --dry-run
102+
```
103+
104+
### 5. Snapshots
87105

88106
Save the current config as a named snapshot under `.devkit/snapshots/`:
89107

@@ -97,13 +115,19 @@ If you omit the name, a timestamp-based name is used. List existing snapshots:
97115
envkit snapshot list
98116
```
99117

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):
101119

102120
```bash
103121
envkit snapshot restore <name>
104122
```
105123

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)
107131

108132
Export a safe-to-share copy of your config (passwords and secrets become placeholders like `${DB_PASSWORD}`):
109133

@@ -119,7 +143,11 @@ Import a shared config file (it is validated and then written to `.dev-env.yml`
119143
envkit share import path/to/dev-env.shared.yml
120144
```
121145

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`:
147+
148+
```bash
149+
envkit share import path/to/dev-env.shared.yml --validate-only
150+
```
123151

124152
### Global options
125153

@@ -136,12 +164,14 @@ Example: `envkit -q setup`
136164
|--------|-------------|
137165
| `envkit init` | Create `.dev-env.yml` interactively (wizard). Run from a project folder when you don’t have a config yet. |
138166
| `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. |
140169
| `envkit snapshot create [name]` | Save the current `.dev-env.yml` as a snapshot under `.devkit/snapshots/`. Omit `name` to use a timestamp. |
141170
| `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. |
143173
| `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. |
145175
| `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. |
146176

147177
For more detail: `envkit --help` or `envkit <command> --help`.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dev-env-kit",
3-
"version": "1.2.0",
3+
"version": "1.3.0",
44
"description": "One-command project setup, environment snapshots, and Docker Compose generation for local development",
55
"main": "dist/cli/index.js",
66
"bin": {

0 commit comments

Comments
 (0)