@git.zone/cli 2.14.3 → 2.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/.smartconfig.json +36 -11
  2. package/assets/templates/service/npmextra.json +8 -2
  3. package/assets/templates/smartconfig/_smartconfig.json +5 -1
  4. package/assets/templates/website/npmextra.json +8 -2
  5. package/dist_ts/00_commitinfo_data.js +1 -1
  6. package/dist_ts/gitzone.cli.js +8 -1
  7. package/dist_ts/helpers.changelog.d.ts +16 -0
  8. package/dist_ts/helpers.changelog.js +114 -0
  9. package/dist_ts/helpers.smartconfigmigrations.d.ts +7 -0
  10. package/dist_ts/helpers.smartconfigmigrations.js +161 -0
  11. package/dist_ts/helpers.workflow.d.ts +97 -0
  12. package/dist_ts/helpers.workflow.js +258 -0
  13. package/dist_ts/mod_commit/index.js +190 -303
  14. package/dist_ts/mod_commit/mod.helpers.d.ts +23 -0
  15. package/dist_ts/mod_commit/mod.helpers.js +22 -15
  16. package/dist_ts/mod_commit/mod.ui.d.ts +1 -1
  17. package/dist_ts/mod_commit/mod.ui.js +7 -2
  18. package/dist_ts/mod_config/classes.commitconfig.d.ts +6 -0
  19. package/dist_ts/mod_config/classes.commitconfig.js +28 -4
  20. package/dist_ts/mod_config/classes.releaseconfig.js +13 -7
  21. package/dist_ts/mod_config/index.js +77 -29
  22. package/dist_ts/mod_format/formatters/smartconfig.formatter.js +3 -57
  23. package/dist_ts/mod_release/index.d.ts +3 -0
  24. package/dist_ts/mod_release/index.js +299 -0
  25. package/dist_ts/mod_release/mod.plugins.d.ts +3 -0
  26. package/dist_ts/mod_release/mod.plugins.js +4 -0
  27. package/dist_ts/mod_standard/index.js +16 -3
  28. package/license +2 -2
  29. package/package.json +20 -30
  30. package/readme.hints.md +15 -17
  31. package/readme.md +239 -421
  32. package/ts/00_commitinfo_data.ts +1 -1
  33. package/ts/gitzone.cli.ts +8 -0
  34. package/ts/helpers.changelog.ts +165 -0
  35. package/ts/helpers.smartconfigmigrations.ts +192 -0
  36. package/ts/helpers.workflow.ts +387 -0
  37. package/ts/mod_commit/index.ts +233 -435
  38. package/ts/mod_commit/mod.helpers.ts +28 -16
  39. package/ts/mod_commit/mod.ui.ts +7 -2
  40. package/ts/mod_config/classes.commitconfig.ts +33 -3
  41. package/ts/mod_config/classes.releaseconfig.ts +14 -7
  42. package/ts/mod_config/index.ts +89 -28
  43. package/ts/mod_format/formatters/smartconfig.formatter.ts +2 -62
  44. package/ts/mod_release/index.ts +393 -0
  45. package/ts/mod_release/mod.plugins.ts +5 -0
  46. package/ts/mod_standard/index.ts +15 -2
package/readme.md CHANGED
@@ -1,574 +1,392 @@
1
1
  # @git.zone/cli 🚀
2
2
 
3
- **The ultimate CLI toolbelt for modern TypeScript development workflows**
3
+ `@git.zone/cli` is the development workflow CLI behind the `gitzone` and `gzone` commands. It helps TypeScript-heavy teams keep projects tidy, create semantic source commits, manage local Docker-backed services, scaffold new modules, and release software through explicit, target-based release configuration.
4
4
 
5
- [![npm version](https://img.shields.io/npm/v/@git.zone/cli.svg)](https://www.npmjs.com/package/@git.zone/cli)
6
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
-
8
- ## 🎯 What is gitzone?
9
-
10
- gitzone is a powerful command-line interface that supercharges your development workflow with automated project management, intelligent code formatting, seamless version control, and development service orchestration. Whether you're bootstrapping a new TypeScript project, maintaining code quality, managing complex multi-repository setups, or spinning up local development databases, gitzone has got you covered.
5
+ It is opinionated where that saves time: source commits and releases are separate, changelog entries flow through a standard `Pending` section, project config lives in `.smartconfig.json`, and release targets make side effects visible before they happen.
11
6
 
12
7
  ## Issue Reporting and Security
13
8
 
14
9
  For reporting bugs, issues, or security vulnerabilities, please visit [community.foss.global/](https://community.foss.global/). This is the central community hub for all issue reporting. Developers who sign and comply with our contribution agreement and go through identification can also get a [code.foss.global/](https://code.foss.global/) account to submit Pull Requests directly.
15
10
 
16
- ## 🏃‍♂️ Quick Start
17
-
18
- ### Installation
11
+ ## Install
19
12
 
20
13
  ```bash
21
- # Install globally via pnpm (recommended)
22
14
  pnpm add -g @git.zone/cli
23
-
24
- # Or with npm
25
- npm install -g @git.zone/cli
26
15
  ```
27
16
 
28
- Once installed, you can use either `gitzone` or the shorter `gzone` command from anywhere in your terminal.
29
-
30
- ### Your First Commands
17
+ After installation, both binaries point to the same CLI:
31
18
 
32
19
  ```bash
33
- # Create a new TypeScript npm package
34
- gitzone template npm
35
-
36
- # Format your entire codebase (dry-run by default)
37
- gitzone format
38
-
39
- # Apply formatting changes
40
- gitzone format --write
41
-
42
- # Start local MongoDB and MinIO services
43
- gitzone services start
44
-
45
- # Create a semantic commit with AI-powered suggestions
46
- gitzone commit
20
+ gitzone --help
21
+ gzone --help
47
22
  ```
48
23
 
49
- ## 🛠️ Core Features
24
+ ## The Big Idea
50
25
 
51
- ### 🔀 Semantic Commits & Versioning
26
+ `gitzone commit` handles source history.
52
27
 
53
- Create standardized commits with AI-powered suggestions that automatically handle versioning:
28
+ `gitzone release` handles release transactions.
54
29
 
55
- ```bash
56
- # Interactive commit with AI recommendations
57
- gitzone commit
30
+ That split is intentional. A commit should not unexpectedly publish npm packages, push Docker images, or trigger remote release pipelines. A release should clearly show which targets it will publish to.
58
31
 
59
- # Read-only recommendation for agents and scripts
60
- gitzone commit recommend --json
61
-
62
- # Auto-accept AI recommendations (skipped for BREAKING CHANGEs)
63
- gitzone commit -y
64
-
65
- # Auto-accept, push, build, and release
66
- gitzone commit -ypbr
67
- ```
68
-
69
- **Flags:**
70
-
71
- | Flag | Long Form | Description |
72
- | ---- | ----------- | ---------------------------------------- |
73
- | `-y` | `--yes` | Auto-accept AI recommendations |
74
- | `-p` | `--push` | Push to remote after commit |
75
- | `-t` | `--test` | Run tests before committing |
76
- | `-b` | `--build` | Build after commit, verify clean tree |
77
- | `-r` | `--release` | Publish to configured npm registries |
78
- | | `--format` | Run format before committing |
79
- | | `--json` | Emit JSON for `gitzone commit recommend` |
80
-
81
- **Workflow steps:**
82
-
83
- 1. 🤖 **AI-powered analysis** — analyzes your changes and suggests commit type, scope, and message
84
- 2. 📝 Interactive commit message builder (type: `fix`/`feat`/`BREAKING CHANGE`, scope, description)
85
- 3. 📜 Automatic changelog generation
86
- 4. 🏷️ Automatic version bumping (major/minor/patch) with git tag creation
87
- 5. 🔨 Optional build & verification
88
- 6. 🚀 Optional push to origin
89
- 7. 📦 Optional publish to npm registries
90
-
91
- Supports both npm (`package.json`) and Deno (`deno.json`) projects, including dual-type projects.
92
-
93
- ### 🎨 Intelligent Code Formatting
94
-
95
- Automatically format and standardize your entire codebase. **Dry-run by default** — nothing changes until you explicitly use `--write`:
32
+ ## Quick Start
96
33
 
97
34
  ```bash
98
- # Preview what would change (default behavior)
35
+ # Preview project standardization work
99
36
  gitzone format
100
37
 
101
- # Emit a machine-readable plan
102
- gitzone format plan --json
103
-
104
- # Apply changes
38
+ # Apply formatting changes
105
39
  gitzone format --write
106
40
 
107
- # Auto-approve without prompts
108
- gitzone format --yes --write
41
+ # Create a semantic source commit
42
+ gitzone commit
109
43
 
110
- # Show detailed diffs
111
- gitzone format --diff
44
+ # Preview the configured release transaction
45
+ gitzone release --plan
112
46
 
113
- # Enable verbose logging
114
- gitzone format --verbose
47
+ # Release pending changelog entries to configured targets
48
+ gitzone release
115
49
  ```
116
50
 
117
- **Flags:**
118
-
119
- | Flag | Description |
120
- | -------------------- | --------------------------------------------- |
121
- | `--write` / `-w` | Apply changes (default is dry-run) |
122
- | `--yes` | Auto-approve without interactive confirmation |
123
- | `--plan-only` | Only show what would be done |
124
- | `--save-plan <file>` | Save the format plan to a file |
125
- | `--from-plan <file>` | Load and execute a saved plan |
126
- | `--detailed` | Show detailed stats and save report |
127
- | `--verbose` | Enable verbose logging |
128
- | `--diff` | Show file diffs |
129
- | `--json` | Emit a read-only format plan as JSON |
130
-
131
- **Formatters (executed in order):**
132
-
133
- 1. 🧹 **Cleanup** — removes obsolete files (yarn.lock, package-lock.json, tslint.json, etc.)
134
- 2. ⚙️ **Smartconfig** — formats and standardizes `.smartconfig.json`
135
- 3. 📜 **License** — ensures proper licensing and checks dependency licenses
136
- 4. 📦 **Package.json** — standardizes package configuration
137
- 5. 📋 **Templates** — applies project template updates
138
- 6. 🙈 **Gitignore** — updates repository ignore rules
139
- 7. 🔧 **Tsconfig** — optimizes TypeScript configuration
140
- 8. ✨ **Prettier** — applies code formatting
141
- 9. 📖 **Readme** — ensures readme files exist
142
- 10. 📂 **Copy** — copies configured files
143
-
144
- ### 🐳 Development Services Management
145
-
146
- Effortlessly manage local development services (MongoDB, MinIO S3, Elasticsearch) with Docker:
51
+ ## Commands
147
52
 
148
- ```bash
149
- gitzone services [command]
150
- ```
53
+ | Command | Purpose |
54
+ | --- | --- |
55
+ | `commit` | Analyze changes and create one semantic source commit |
56
+ | `release` | Turn pending changelog entries into a versioned release and publish targets |
57
+ | `format` | Plan or apply project formatting and standardization |
58
+ | `config` | Inspect, update, and migrate `.smartconfig.json` |
59
+ | `services` | Manage local MongoDB, MinIO, and Elasticsearch containers |
60
+ | `template` | Scaffold projects from built-in templates |
61
+ | `meta` | Manage multi-repository workspaces |
62
+ | `open` | Open repository assets like CI pages |
63
+ | `docker` | Run Docker maintenance tasks |
64
+ | `deprecate` | Deprecate npm packages across registries |
65
+ | `start` | Prepare an existing project for local work |
66
+ | `helpers` | Run small helper utilities |
151
67
 
152
- **Commands:**
153
-
154
- | Command | Description |
155
- | ------------------------ | ------------------------------------------------------ |
156
- | `start [service]` | Start services (`mongo`\|`s3`\|`elasticsearch`\|`all`) |
157
- | `stop [service]` | Stop services |
158
- | `restart [service]` | Restart services |
159
- | `status` | Show current service status |
160
- | `config` | Display configuration details |
161
- | `set <csv>` | Set enabled services without prompts |
162
- | `enable <service...>` | Enable one or more services |
163
- | `disable <service...>` | Disable one or more services |
164
- | `compass` | Get MongoDB Compass connection string with network IP |
165
- | `logs [service] [lines]` | View service logs (default: 20 lines) |
166
- | `reconfigure` | Reassign ports and restart all services |
167
- | `remove` | Remove containers (preserves data) |
168
- | `clean` | Remove containers AND data (⚠️ destructive) |
169
-
170
- **Service aliases:**
171
-
172
- - `mongo` / `mongodb` — MongoDB
173
- - `minio` / `s3` — MinIO (S3-compatible storage)
174
- - `elasticsearch` / `es` — Elasticsearch
175
- - `all` — All services (default)
176
-
177
- **Key features:**
178
-
179
- - 🎲 **Smart port assignment** — automatically assigns random ports (20000–30000) to avoid conflicts
180
- - 📦 **Project isolation** — each project gets its own containers with unique names
181
- - 💾 **Data persistence** — data stored in `.nogit/` survives container restarts
182
- - 🔗 **MongoDB Compass support** — instantly get connection strings for GUI access
183
- - 🌐 **Network IP detection** — detects your local network IP for remote connections
184
- - ⚙️ **Auto-configuration** — creates `.nogit/env.json` with smart defaults
185
-
186
- **Global operations (`-g` flag):**
187
-
188
- ```bash
189
- # List all registered projects
190
- gitzone services list -g
68
+ Global flags include `--help`, `--json`, `--plain`, `--agent`, `--no-interactive`, and `--no-check-updates`.
191
69
 
192
- # Show status across all projects
193
- gitzone services status -g
70
+ ## Commit Workflow
194
71
 
195
- # Stop all containers across all projects
196
- gitzone services stop -g
197
-
198
- # Remove stale registry entries
199
- gitzone services cleanup -g
200
- ```
201
-
202
- **Example workflow:**
72
+ `gitzone commit` creates one semantic source commit. It does not bump versions, create tags, publish packages, or push Docker images.
203
73
 
204
74
  ```bash
205
- # Start all services for your project
206
- gitzone services start
207
-
208
- # Configure enabled services without prompts
209
- gitzone services set mongodb,minio
210
-
211
- # Check what's running
212
- gitzone services status
213
-
214
- # Get MongoDB Compass connection string
215
- gitzone services compass
216
- # Output: mongodb://defaultadmin:defaultpass@192.168.1.100:27018/myproject?authSource=admin
217
-
218
- # View MongoDB logs
219
- gitzone services logs mongo 50
75
+ # Interactive semantic commit
76
+ gitzone commit
220
77
 
221
- # Stop services when done
222
- gitzone services stop
223
- ```
78
+ # Read-only AI recommendation
79
+ gitzone commit recommend --json
224
80
 
225
- ### ⚙️ Release & Commit Configuration
81
+ # Auto-accept safe recommendations
82
+ gitzone commit -y
226
83
 
227
- Manage release registries and commit settings:
84
+ # Auto-accept, test, build, and push
85
+ gitzone commit -ytbp
228
86
 
229
- ```bash
230
- gitzone config [subcommand]
87
+ # Show the resolved workflow without mutating anything
88
+ gitzone commit --plan
231
89
  ```
232
90
 
233
- | Command | Description |
234
- | ---------------------------------- | ---------------------------------------------------------- |
235
- | `show` | Display current release config (registries, access level) |
236
- | `get <path>` | Read a single value from `@git.zone/cli` |
237
- | `set <path> <value>` | Write a single value to `@git.zone/cli` |
238
- | `unset <path>` | Remove a single value from `@git.zone/cli` |
239
- | `add [url]` | Add a registry URL (default: `https://registry.npmjs.org`) |
240
- | `remove [url]` | Remove a registry URL (interactive selection if no URL) |
241
- | `clear` | Clear all registries (with confirmation) |
242
- | `access [public\|private]` | Set npm access level for publishing |
243
- | `commit alwaysTest [true\|false]` | Always run tests before commit |
244
- | `commit alwaysBuild [true\|false]` | Always build after commit |
245
- | `services` | Configure which services are enabled |
91
+ The commit flow:
246
92
 
247
- Configuration is stored in `.smartconfig.json` under the `@git.zone/cli` key.
93
+ 1. Analyze the working tree.
94
+ 2. Suggest commit type, scope, and message.
95
+ 3. Write a human-readable entry into `changelog.md` under `## Pending`.
96
+ 4. Stage and create one semantic source commit.
97
+ 5. Optionally run formatting, tests, build, and push based on flags or config.
248
98
 
249
- ### 📦 Project Templates
99
+ Commit flags:
250
100
 
251
- Instantly scaffold production-ready projects with best practices built-in:
101
+ | Flag | Meaning |
102
+ | --- | --- |
103
+ | `-y`, `--yes` | Auto-accept safe recommendations |
104
+ | `-t`, `--test` | Add test step |
105
+ | `-b`, `--build` | Add build step |
106
+ | `-p`, `--push` | Push after the source commit |
107
+ | `-f`, `--format` | Run `gitzone format --write` before commit |
108
+ | `--plan` | Show resolved workflow only |
252
109
 
253
- ```bash
254
- gitzone template [template-name]
255
- ```
110
+ `-r` is intentionally not part of commit anymore. Use `gitzone release`.
256
111
 
257
- **Interactive templates:**
112
+ ## Release Workflow
258
113
 
259
- - **`npm`** TypeScript npm package with testing, CI/CD, and full tooling
260
- - **`service`** — Microservice architecture with Docker support
261
- - **`website`** — Modern web application with LitElement and service workers
262
- - **`wcc`** — Web Component Collection for reusable UI components
114
+ `gitzone release` performs the release core once, then publishes to configured targets.
263
115
 
264
- Each template comes pre-configured with:
116
+ The release core is not configurable plumbing. It always follows the same professional release transaction:
265
117
 
266
- - TypeScript with modern configurations
267
- - Automated testing setup with `@git.zone/tstest`
268
- - CI/CD pipelines (GitLab/GitHub)
269
- - Code formatting and linting
270
- - Documentation structure
118
+ 1. Run configured preflight checks.
119
+ 2. Read `changelog.md` `## Pending` entries.
120
+ 3. Infer or accept a semver bump.
121
+ 4. Update version files and baked commit info.
122
+ 5. Move pending changelog entries into the new version section.
123
+ 6. Create the local release commit.
124
+ 7. Create the local release tag.
271
125
 
272
- ### 🏗️ Meta Repository Management
126
+ Targets decide what happens after that:
273
127
 
274
- Manage multiple related repositories as a cohesive unit:
128
+ | Target | What it does |
129
+ | --- | --- |
130
+ | `git` | Pushes the release commit and tags, often triggering remote CI release builds |
131
+ | `npm` | Publishes the package to configured npm registries |
132
+ | `docker` | Builds and pushes configured Docker images |
275
133
 
276
134
  ```bash
277
- # Initialize a meta repository
278
- gitzone meta init
135
+ # Preview the resolved release plan
136
+ gitzone release --plan
279
137
 
280
- # Add a sub-project
281
- gitzone meta add [name] [git-url]
138
+ # Release to configured targets
139
+ gitzone release
282
140
 
283
- # Update all sub-projects (clone missing, clean superfluous)
284
- gitzone meta update
285
-
286
- # Remove a sub-project
287
- gitzone meta remove [name]
288
- ```
141
+ # Release only to npm
142
+ gitzone release --target npm
289
143
 
290
- ### 🐳 Docker Management
144
+ # Release only to git and Docker
145
+ gitzone release --target git,docker
291
146
 
292
- Streamline your Docker workflow:
147
+ # Skip package/container publishing and keep only git target
148
+ gitzone release --no-publish
293
149
 
294
- ```bash
295
- # Clean up all Docker resources (containers, images, volumes, networks)
296
- gitzone docker prune
150
+ # Override inferred semver level
151
+ gitzone release --minor
297
152
  ```
298
153
 
299
- ### 🔗 Quick CI/CD Access
154
+ Release flags:
300
155
 
301
- Jump directly to your CI/CD configurations:
156
+ | Flag | Meaning |
157
+ | --- | --- |
158
+ | `-y`, `--yes` | Run without interactive confirmation |
159
+ | `-t`, `--test` | Enable preflight tests |
160
+ | `-b`, `--build` | Enable preflight build |
161
+ | `-p`, `--push` | Enable the `git` target |
162
+ | `--target <csv>` | Use only selected targets, e.g. `git,npm` |
163
+ | `--npm` | Enable the `npm` target |
164
+ | `--docker` | Enable the `docker` target |
165
+ | `--no-publish` | Keep release core and `git` target only |
166
+ | `--no-build` | Disable preflight build for this run |
167
+ | `--major`, `--minor`, `--patch` | Override inferred semver level |
168
+ | `--plan` | Show resolved workflow only |
302
169
 
303
- ```bash
304
- # Open CI/CD settings
305
- gitzone open ci
170
+ ## Standard Changelog
306
171
 
307
- # Open pipelines view
308
- gitzone open pipelines
309
- ```
310
-
311
- Works with GitLab repositories to provide instant access to your deployment configurations.
312
-
313
- ### 📝 Package Deprecation
172
+ The changelog is convention-based and intentionally not configured.
314
173
 
315
- Smoothly transition users from old to new packages:
174
+ `gitzone commit` appends entries to:
316
175
 
317
- ```bash
318
- gitzone deprecate
176
+ ```markdown
177
+ ## Pending
319
178
  ```
320
179
 
321
- Interactive wizard that prompts for registry URLs, old package name, and new package name — then runs `npm deprecate` across all specified registries.
180
+ `gitzone release` moves those pending entries into a dated version section:
322
181
 
323
- ### 🚦 Project Initialization
324
-
325
- Prepare existing projects for development:
326
-
327
- ```bash
328
- gitzone start
182
+ ```markdown
183
+ ## 2026-05-10 - 2.15.0
329
184
  ```
330
185
 
331
- Automatically checks out master, pulls latest changes, and installs dependencies.
186
+ The standard buckets are `Breaking Changes`, `Features`, `Fixes`, `Documentation`, and `Maintenance`.
332
187
 
333
- ### 🔧 Helper Utilities
188
+ ## Configuration
334
189
 
335
- ```bash
336
- # Generate a unique short ID
337
- gitzone helpers shortid
338
- ```
339
-
340
- ## 📋 Configuration
341
-
342
- ### .smartconfig.json
343
-
344
- Customize gitzone behavior through `.smartconfig.json`:
190
+ All CLI config lives under `@git.zone/cli` in `.smartconfig.json`.
345
191
 
346
192
  ```json
347
193
  {
348
194
  "@git.zone/cli": {
195
+ "schemaVersion": 2,
349
196
  "projectType": "npm",
350
- "cli": {
351
- "interactive": true,
352
- "output": "human",
353
- "checkUpdates": true
354
- },
355
- "release": {
356
- "registries": ["https://registry.npmjs.org"],
357
- "accessLevel": "public"
358
- },
359
197
  "commit": {
360
- "alwaysTest": false,
361
- "alwaysBuild": false
198
+ "confirmation": "prompt",
199
+ "steps": ["analyze", "test", "build", "changelog", "commit", "push"]
362
200
  },
363
- "format": {
364
- "interactive": true,
365
- "showStats": true,
366
- "modules": {
367
- "skip": ["prettier"],
368
- "only": []
201
+ "release": {
202
+ "confirmation": "prompt",
203
+ "preflight": {
204
+ "requireCleanTree": true,
205
+ "test": false,
206
+ "build": true
207
+ },
208
+ "targets": {
209
+ "git": {
210
+ "enabled": true,
211
+ "remote": "origin",
212
+ "pushBranch": true,
213
+ "pushTags": true
214
+ },
215
+ "npm": {
216
+ "enabled": true,
217
+ "registries": ["https://registry.npmjs.org"],
218
+ "accessLevel": "public",
219
+ "alreadyPublished": "success"
220
+ },
221
+ "docker": {
222
+ "enabled": false,
223
+ "images": []
224
+ }
369
225
  }
370
226
  }
371
227
  }
372
228
  }
373
229
  ```
374
230
 
375
- ### Environment Variables
231
+ NPM registries belong only here:
376
232
 
377
- - `CI` — Detect CI environment for automated workflows
378
- - `DEBUG` — Enable debug output
379
- - `GITZONE_FORMAT_PARALLEL` — Control parallel formatting
380
-
381
- ## 🎯 Common Workflows
233
+ ```text
234
+ @git.zone/cli.release.targets.npm.registries
235
+ ```
382
236
 
383
- ### Full-Stack Development Cycle
237
+ Useful config commands:
384
238
 
385
239
  ```bash
386
- # 1. Start fresh
387
- gitzone start
388
-
389
- # 2. Spin up databases and services
390
- gitzone services start
240
+ # Show current @git.zone/cli config
241
+ gitzone config show --json
391
242
 
392
- # 3. Make changes
393
- # ... your development work ...
243
+ # Read the npm release target registries
244
+ gitzone config get release.targets.npm.registries
394
245
 
395
- # 4. Check service logs if needed
396
- gitzone services logs mongo
246
+ # Add an npm release target registry
247
+ gitzone config add https://registry.npmjs.org
397
248
 
398
- # 5. Preview format changes, then apply
399
- gitzone format
400
- gitzone format --write
401
-
402
- # 6. Commit with semantic versioning
403
- gitzone commit
249
+ # Set npm target access level
250
+ gitzone config access public
404
251
 
405
- # 7. Stop services when done
406
- gitzone services stop
252
+ # Run schema migration to v2
253
+ gitzone config migrate 2
407
254
  ```
408
255
 
409
- ### Automated CI/CD Commit
256
+ ## Formatting
410
257
 
411
- ```bash
412
- # Auto-accept, test, build, push, and release in one command
413
- gitzone commit -ytbpr
414
- ```
415
-
416
- ### Agent-Friendly Inspection
258
+ `gitzone format` is dry-run by default. That makes it safe to run in any repo.
417
259
 
418
260
  ```bash
419
- # Top-level machine-readable help
420
- gitzone help config --json
421
-
422
- # Read-only commit recommendation
423
- gitzone commit recommend --json
261
+ # Preview changes
262
+ gitzone format
424
263
 
425
- # Read-only format plan
264
+ # Emit a machine-readable plan
426
265
  gitzone format plan --json
427
266
 
428
- # Read or change config without prompts
429
- gitzone config get release.accessLevel
430
- gitzone config set cli.interactive false
431
- ```
432
-
433
- ### Multi-Repository Management
434
-
435
- ```bash
436
- # 1. Set up meta repository
437
- gitzone meta init
438
-
439
- # 2. Add all related projects
440
- gitzone meta add frontend https://github.com/org/frontend.git
441
- gitzone meta add backend https://github.com/org/backend.git
442
- gitzone meta add shared https://github.com/org/shared.git
267
+ # Apply changes
268
+ gitzone format --write
443
269
 
444
- # 3. Synchronize updates
445
- gitzone meta update
270
+ # Apply without prompt
271
+ gitzone format --write --yes
446
272
  ```
447
273
 
448
- ### Safe Formatting with Plan Review
274
+ Formatters include cleanup, smartconfig normalization, dependency license checks, package metadata normalization, template updates, `.gitignore`, TypeScript config, Prettier, README existence checks, and configured copy operations.
449
275
 
450
- ```bash
451
- # 1. Preview changes (default)
452
- gitzone format
276
+ ## Development Services
453
277
 
454
- # 2. Save plan for review
455
- gitzone format --save-plan format-changes.json
278
+ `gitzone services` manages local Docker-backed services for development projects.
456
279
 
457
- # 3. Apply from saved plan
458
- gitzone format --from-plan format-changes.json --write
459
- ```
280
+ Supported services:
460
281
 
461
- ### Database-Driven Development
282
+ | Service | Aliases |
283
+ | --- | --- |
284
+ | MongoDB | `mongo`, `mongodb` |
285
+ | MinIO | `minio`, `s3` |
286
+ | Elasticsearch | `elasticsearch`, `es` |
462
287
 
463
288
  ```bash
464
- # 1. Start MongoDB, MinIO, and Elasticsearch
289
+ # Start configured services
465
290
  gitzone services start
466
291
 
467
- # 2. Get connection details
468
- gitzone services config
292
+ # Enable specific services non-interactively
293
+ gitzone services set mongodb,minio
469
294
 
470
- # 3. Connect with MongoDB Compass
295
+ # Check status
296
+ gitzone services status
297
+
298
+ # Print MongoDB Compass connection string
471
299
  gitzone services compass
472
300
 
473
- # 4. Monitor services
474
- gitzone services status
301
+ # Show logs
302
+ gitzone services logs mongo 50
303
+
304
+ # Stop containers but keep data
305
+ gitzone services stop
475
306
 
476
- # 5. Clean everything when done
477
- gitzone services clean # ⚠️ Warning: deletes data
307
+ # Remove containers and data
308
+ gitzone services clean
478
309
  ```
479
310
 
480
- ## 🔌 Integrations
311
+ Service config is stored in `.nogit/env.json`. Data is stored below `.nogit/`, so it stays out of Git.
481
312
 
482
- ### CI/CD Platforms
313
+ ## Templates
483
314
 
484
- - **GitLab CI** full pipeline support with templates
485
- - **GitHub Actions** — automated workflows
486
- - **Docker** — container-based deployments
315
+ Start new projects with built-in scaffolds:
487
316
 
488
- ### Development Tools
317
+ ```bash
318
+ gitzone template npm
319
+ gitzone template service
320
+ gitzone template website
321
+ gitzone template wcc
322
+ ```
489
323
 
490
- - **TypeScript** first-class support
491
- - **Prettier** — code formatting
492
- - **pnpm** — package management
493
- - **MongoDB** — local database service
494
- - **MinIO** — S3-compatible object storage
495
- - **Elasticsearch** — search and analytics
496
- - **MongoDB Compass** — database GUI integration
324
+ Templates are rendered through SmartScaf and then can be normalized with `gitzone format`.
497
325
 
498
- ### Version Control
326
+ ## Meta Repositories
499
327
 
500
- - **Git** deep integration
501
- - **Semantic Versioning** — automatic version bumping
502
- - **Conventional Commits** — standardized commit messages
503
- - **AI-Powered Analysis** — intelligent commit suggestions via `@git.zone/tsdoc`
328
+ Use `gitzone meta` when one workspace coordinates multiple repositories.
504
329
 
505
- ## 💡 Pro Tips
330
+ ```bash
331
+ gitzone meta init
332
+ gitzone meta add frontend https://example.com/org/frontend.git
333
+ gitzone meta update
334
+ gitzone meta remove frontend
335
+ ```
336
+
337
+ ## Other Utilities
338
+
339
+ ```bash
340
+ # Docker cleanup
341
+ gitzone docker prune
506
342
 
507
- 1. **Use aliases**: Add `alias gz='gitzone'` to your shell profile
508
- 2. **Combine flags**: `gitzone commit -ypbr` for the full auto workflow
509
- 3. **Leverage templates**: Start projects right with proven structures
510
- 4. **Enable caching**: Dramatically speeds up formatting operations
511
- 5. **Save format plans**: Review changes before applying
512
- 6. **Port management**: Let services auto-assign ports to avoid conflicts
513
- 7. **Use MongoDB Compass**: `gitzone services compass` for visual DB management
514
- 8. **Global service management**: `gitzone services status -g` to see all projects' services at once
343
+ # Open GitLab CI settings or pipelines for the current repo
344
+ gitzone open ci
345
+ gitzone open pipelines
515
346
 
516
- ## 🐛 Troubleshooting
347
+ # Deprecate an old npm package interactively
348
+ gitzone deprecate
517
349
 
518
- ### Format Command Shows "Cancelled"
350
+ # Prepare a project for local work
351
+ gitzone start
519
352
 
520
- - Check your `npmextra.json` configuration
521
- - Try with `--yes --write` flags
522
- - Use `--verbose` for detailed output
353
+ # Generate a short unique ID
354
+ gitzone helpers shortid
355
+ ```
523
356
 
524
- ### Docker Commands Fail
357
+ ## Troubleshooting
525
358
 
526
- Ensure Docker daemon is running:
359
+ Format only previews changes:
527
360
 
528
361
  ```bash
529
- docker info
362
+ gitzone format --write
530
363
  ```
531
364
 
532
- ### Services Won't Start
365
+ Release says there is nothing to release:
533
366
 
534
367
  ```bash
535
- # Services auto-assign ports, but you can check the config
536
- cat .nogit/env.json
368
+ # Make sure commits have populated the Pending changelog section
369
+ gitzone commit
370
+ ```
537
371
 
538
- # Verify Docker is running
539
- docker ps
372
+ Docker services fail to start:
540
373
 
541
- # Reassign ports if there are conflicts
374
+ ```bash
375
+ docker info
376
+ gitzone services status
542
377
  gitzone services reconfigure
543
378
  ```
544
379
 
545
- ### Template Creation Issues
546
-
547
- Verify pnpm/npm is properly configured:
380
+ Config looks outdated:
548
381
 
549
382
  ```bash
550
- npm config get registry
383
+ gitzone config migrate 2
384
+ gitzone config show --json
551
385
  ```
552
386
 
553
- ### MongoDB Connection Issues
554
-
555
- - Ensure services are running: `gitzone services status`
556
- - Check firewall settings for the assigned ports
557
- - Use `gitzone services compass` for the correct connection string
558
-
559
- ## 📈 Performance
560
-
561
- gitzone is optimized for speed:
562
-
563
- - ⚡ **Parallel processing** for format operations
564
- - 🧠 **Smart caching** to avoid redundant work
565
- - 📊 **Incremental updates** for meta repositories
566
- - 🐳 **Isolated services** prevent resource conflicts
567
- - 🎲 **Auto port assignment** eliminates manual configuration
568
-
569
387
  ## License and Legal Information
570
388
 
571
- This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the [LICENSE](./LICENSE) file.
389
+ This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the [LICENSE](./license) file.
572
390
 
573
391
  **Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
574
392