@git.zone/cli 2.14.3 → 2.16.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 (55) 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 +15 -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 +29 -3
  28. package/dist_ts/mod_tools/classes.packagemanager.d.ts +27 -0
  29. package/dist_ts/mod_tools/classes.packagemanager.js +140 -0
  30. package/dist_ts/mod_tools/index.d.ts +4 -0
  31. package/dist_ts/mod_tools/index.js +290 -0
  32. package/dist_ts/mod_tools/mod.plugins.d.ts +1 -0
  33. package/dist_ts/mod_tools/mod.plugins.js +2 -0
  34. package/license +2 -2
  35. package/package.json +20 -30
  36. package/readme.hints.md +15 -17
  37. package/readme.md +251 -415
  38. package/ts/00_commitinfo_data.ts +1 -1
  39. package/ts/gitzone.cli.ts +16 -0
  40. package/ts/helpers.changelog.ts +165 -0
  41. package/ts/helpers.smartconfigmigrations.ts +192 -0
  42. package/ts/helpers.workflow.ts +387 -0
  43. package/ts/mod_commit/index.ts +233 -435
  44. package/ts/mod_commit/mod.helpers.ts +28 -16
  45. package/ts/mod_commit/mod.ui.ts +7 -2
  46. package/ts/mod_config/classes.commitconfig.ts +33 -3
  47. package/ts/mod_config/classes.releaseconfig.ts +14 -7
  48. package/ts/mod_config/index.ts +89 -28
  49. package/ts/mod_format/formatters/smartconfig.formatter.ts +2 -62
  50. package/ts/mod_release/index.ts +393 -0
  51. package/ts/mod_release/mod.plugins.ts +5 -0
  52. package/ts/mod_standard/index.ts +28 -2
  53. package/ts/mod_tools/classes.packagemanager.ts +176 -0
  54. package/ts/mod_tools/index.ts +359 -0
  55. package/ts/mod_tools/mod.plugins.ts +1 -0
package/readme.md CHANGED
@@ -1,574 +1,410 @@
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
- ```
27
-
28
- Once installed, you can use either `gitzone` or the shorter `gzone` command from anywhere in your terminal.
29
-
30
- ### Your First Commands
31
-
32
- ```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
47
15
  ```
48
16
 
49
- ## 🛠️ Core Features
50
-
51
- ### 🔀 Semantic Commits & Versioning
52
-
53
- Create standardized commits with AI-powered suggestions that automatically handle versioning:
17
+ After installation, both binaries point to the same CLI:
54
18
 
55
19
  ```bash
56
- # Interactive commit with AI recommendations
57
- gitzone commit
58
-
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
20
+ gitzone --help
21
+ gzone --help
67
22
  ```
68
23
 
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:**
24
+ ## The Big Idea
82
25
 
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
26
+ `gitzone commit` handles source history.
90
27
 
91
- Supports both npm (`package.json`) and Deno (`deno.json`) projects, including dual-type projects.
28
+ `gitzone release` handles release transactions.
92
29
 
93
- ### 🎨 Intelligent Code Formatting
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.
94
31
 
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
+ | `tools` | Manage the global `@git.zone` toolchain |
61
+ | `template` | Scaffold projects from built-in templates |
62
+ | `meta` | Manage multi-repository workspaces |
63
+ | `open` | Open repository assets like CI pages |
64
+ | `docker` | Run Docker maintenance tasks |
65
+ | `deprecate` | Deprecate npm packages across registries |
66
+ | `start` | Prepare an existing project for local work |
67
+ | `helpers` | Run small helper utilities |
151
68
 
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):**
69
+ Global flags include `--help`, `--json`, `--plain`, `--agent`, `--no-interactive`, and `--no-check-updates`.
187
70
 
188
- ```bash
189
- # List all registered projects
190
- gitzone services list -g
71
+ ## Toolchain Management
191
72
 
192
- # Show status across all projects
193
- gitzone services status -g
194
-
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:**
73
+ `gitzone tools` replaces the former `gtools` command from `@git.zone/tools`. It manages globally installed `@git.zone` development tools through pnpm.
203
74
 
204
75
  ```bash
205
- # Start all services for your project
206
- gitzone services start
76
+ # Check installed @git.zone tools and update outdated packages
77
+ gitzone tools update
207
78
 
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
79
+ # Update without prompts
80
+ gitzone tools update -y
217
81
 
218
- # View MongoDB logs
219
- gitzone services logs mongo 50
220
-
221
- # Stop services when done
222
- gitzone services stop
82
+ # Install missing managed @git.zone tools
83
+ gitzone tools install
223
84
  ```
224
85
 
225
- ### ⚙️ Release & Commit Configuration
86
+ `gitzone tools update` checks `@git.zone/cli` first. If the CLI itself needs an update, it updates `@git.zone/cli` and asks you to rerun the command before updating the rest of the toolchain.
226
87
 
227
- Manage release registries and commit settings:
88
+ ## Commit Workflow
228
89
 
229
- ```bash
230
- gitzone config [subcommand]
231
- ```
90
+ `gitzone commit` creates one semantic source commit. It does not bump versions, create tags, publish packages, or push Docker images.
232
91
 
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 |
92
+ ```bash
93
+ # Interactive semantic commit
94
+ gitzone commit
246
95
 
247
- Configuration is stored in `.smartconfig.json` under the `@git.zone/cli` key.
96
+ # Read-only AI recommendation
97
+ gitzone commit recommend --json
248
98
 
249
- ### 📦 Project Templates
99
+ # Auto-accept safe recommendations
100
+ gitzone commit -y
250
101
 
251
- Instantly scaffold production-ready projects with best practices built-in:
102
+ # Auto-accept, test, build, and push
103
+ gitzone commit -ytbp
252
104
 
253
- ```bash
254
- gitzone template [template-name]
105
+ # Show the resolved workflow without mutating anything
106
+ gitzone commit --plan
255
107
  ```
256
108
 
257
- **Interactive templates:**
109
+ The commit flow:
258
110
 
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
111
+ 1. Analyze the working tree.
112
+ 2. Suggest commit type, scope, and message.
113
+ 3. Write a human-readable entry into `changelog.md` under `## Pending`.
114
+ 4. Stage and create one semantic source commit.
115
+ 5. Optionally run formatting, tests, build, and push based on flags or config.
263
116
 
264
- Each template comes pre-configured with:
117
+ Commit flags:
265
118
 
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
119
+ | Flag | Meaning |
120
+ | --- | --- |
121
+ | `-y`, `--yes` | Auto-accept safe recommendations |
122
+ | `-t`, `--test` | Add test step |
123
+ | `-b`, `--build` | Add build step |
124
+ | `-p`, `--push` | Push after the source commit |
125
+ | `-f`, `--format` | Run `gitzone format --write` before commit |
126
+ | `--plan` | Show resolved workflow only |
271
127
 
272
- ### 🏗️ Meta Repository Management
128
+ `-r` is intentionally not part of commit anymore. Use `gitzone release`.
273
129
 
274
- Manage multiple related repositories as a cohesive unit:
130
+ ## Release Workflow
275
131
 
276
- ```bash
277
- # Initialize a meta repository
278
- gitzone meta init
132
+ `gitzone release` performs the release core once, then publishes to configured targets.
279
133
 
280
- # Add a sub-project
281
- gitzone meta add [name] [git-url]
134
+ The release core is not configurable plumbing. It always follows the same professional release transaction:
282
135
 
283
- # Update all sub-projects (clone missing, clean superfluous)
284
- gitzone meta update
136
+ 1. Run configured preflight checks.
137
+ 2. Read `changelog.md` `## Pending` entries.
138
+ 3. Infer or accept a semver bump.
139
+ 4. Update version files and baked commit info.
140
+ 5. Move pending changelog entries into the new version section.
141
+ 6. Create the local release commit.
142
+ 7. Create the local release tag.
285
143
 
286
- # Remove a sub-project
287
- gitzone meta remove [name]
288
- ```
144
+ Targets decide what happens after that:
289
145
 
290
- ### 🐳 Docker Management
291
-
292
- Streamline your Docker workflow:
146
+ | Target | What it does |
147
+ | --- | --- |
148
+ | `git` | Pushes the release commit and tags, often triggering remote CI release builds |
149
+ | `npm` | Publishes the package to configured npm registries |
150
+ | `docker` | Builds and pushes configured Docker images |
293
151
 
294
152
  ```bash
295
- # Clean up all Docker resources (containers, images, volumes, networks)
296
- gitzone docker prune
297
- ```
298
-
299
- ### 🔗 Quick CI/CD Access
153
+ # Preview the resolved release plan
154
+ gitzone release --plan
300
155
 
301
- Jump directly to your CI/CD configurations:
156
+ # Release to configured targets
157
+ gitzone release
302
158
 
303
- ```bash
304
- # Open CI/CD settings
305
- gitzone open ci
159
+ # Release only to npm
160
+ gitzone release --target npm
306
161
 
307
- # Open pipelines view
308
- gitzone open pipelines
309
- ```
162
+ # Release only to git and Docker
163
+ gitzone release --target git,docker
310
164
 
311
- Works with GitLab repositories to provide instant access to your deployment configurations.
165
+ # Skip package/container publishing and keep only git target
166
+ gitzone release --no-publish
312
167
 
313
- ### 📝 Package Deprecation
168
+ # Override inferred semver level
169
+ gitzone release --minor
170
+ ```
314
171
 
315
- Smoothly transition users from old to new packages:
172
+ Release flags:
316
173
 
317
- ```bash
318
- gitzone deprecate
319
- ```
174
+ | Flag | Meaning |
175
+ | --- | --- |
176
+ | `-y`, `--yes` | Run without interactive confirmation |
177
+ | `-t`, `--test` | Enable preflight tests |
178
+ | `-b`, `--build` | Enable preflight build |
179
+ | `-p`, `--push` | Enable the `git` target |
180
+ | `--target <csv>` | Use only selected targets, e.g. `git,npm` |
181
+ | `--npm` | Enable the `npm` target |
182
+ | `--docker` | Enable the `docker` target |
183
+ | `--no-publish` | Keep release core and `git` target only |
184
+ | `--no-build` | Disable preflight build for this run |
185
+ | `--major`, `--minor`, `--patch` | Override inferred semver level |
186
+ | `--plan` | Show resolved workflow only |
320
187
 
321
- Interactive wizard that prompts for registry URLs, old package name, and new package name — then runs `npm deprecate` across all specified registries.
188
+ ## Standard Changelog
322
189
 
323
- ### 🚦 Project Initialization
190
+ The changelog is convention-based and intentionally not configured.
324
191
 
325
- Prepare existing projects for development:
192
+ `gitzone commit` appends entries to:
326
193
 
327
- ```bash
328
- gitzone start
194
+ ```markdown
195
+ ## Pending
329
196
  ```
330
197
 
331
- Automatically checks out master, pulls latest changes, and installs dependencies.
332
-
333
- ### 🔧 Helper Utilities
198
+ `gitzone release` moves those pending entries into a dated version section:
334
199
 
335
- ```bash
336
- # Generate a unique short ID
337
- gitzone helpers shortid
200
+ ```markdown
201
+ ## 2026-05-10 - 2.15.0
338
202
  ```
339
203
 
340
- ## 📋 Configuration
204
+ The standard buckets are `Breaking Changes`, `Features`, `Fixes`, `Documentation`, and `Maintenance`.
341
205
 
342
- ### .smartconfig.json
206
+ ## Configuration
343
207
 
344
- Customize gitzone behavior through `.smartconfig.json`:
208
+ All CLI config lives under `@git.zone/cli` in `.smartconfig.json`.
345
209
 
346
210
  ```json
347
211
  {
348
212
  "@git.zone/cli": {
213
+ "schemaVersion": 2,
349
214
  "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
215
  "commit": {
360
- "alwaysTest": false,
361
- "alwaysBuild": false
216
+ "confirmation": "prompt",
217
+ "steps": ["analyze", "test", "build", "changelog", "commit", "push"]
362
218
  },
363
- "format": {
364
- "interactive": true,
365
- "showStats": true,
366
- "modules": {
367
- "skip": ["prettier"],
368
- "only": []
219
+ "release": {
220
+ "confirmation": "prompt",
221
+ "preflight": {
222
+ "requireCleanTree": true,
223
+ "test": false,
224
+ "build": true
225
+ },
226
+ "targets": {
227
+ "git": {
228
+ "enabled": true,
229
+ "remote": "origin",
230
+ "pushBranch": true,
231
+ "pushTags": true
232
+ },
233
+ "npm": {
234
+ "enabled": true,
235
+ "registries": ["https://registry.npmjs.org"],
236
+ "accessLevel": "public",
237
+ "alreadyPublished": "success"
238
+ },
239
+ "docker": {
240
+ "enabled": false,
241
+ "images": []
242
+ }
369
243
  }
370
244
  }
371
245
  }
372
246
  }
373
247
  ```
374
248
 
375
- ### Environment Variables
249
+ NPM registries belong only here:
376
250
 
377
- - `CI` — Detect CI environment for automated workflows
378
- - `DEBUG` — Enable debug output
379
- - `GITZONE_FORMAT_PARALLEL` — Control parallel formatting
380
-
381
- ## 🎯 Common Workflows
251
+ ```text
252
+ @git.zone/cli.release.targets.npm.registries
253
+ ```
382
254
 
383
- ### Full-Stack Development Cycle
255
+ Useful config commands:
384
256
 
385
257
  ```bash
386
- # 1. Start fresh
387
- gitzone start
388
-
389
- # 2. Spin up databases and services
390
- gitzone services start
258
+ # Show current @git.zone/cli config
259
+ gitzone config show --json
391
260
 
392
- # 3. Make changes
393
- # ... your development work ...
261
+ # Read the npm release target registries
262
+ gitzone config get release.targets.npm.registries
394
263
 
395
- # 4. Check service logs if needed
396
- gitzone services logs mongo
264
+ # Add an npm release target registry
265
+ gitzone config add https://registry.npmjs.org
397
266
 
398
- # 5. Preview format changes, then apply
399
- gitzone format
400
- gitzone format --write
267
+ # Set npm target access level
268
+ gitzone config access public
401
269
 
402
- # 6. Commit with semantic versioning
403
- gitzone commit
404
-
405
- # 7. Stop services when done
406
- gitzone services stop
270
+ # Run schema migration to v2
271
+ gitzone config migrate 2
407
272
  ```
408
273
 
409
- ### Automated CI/CD Commit
274
+ ## Formatting
410
275
 
411
- ```bash
412
- # Auto-accept, test, build, push, and release in one command
413
- gitzone commit -ytbpr
414
- ```
415
-
416
- ### Agent-Friendly Inspection
276
+ `gitzone format` is dry-run by default. That makes it safe to run in any repo.
417
277
 
418
278
  ```bash
419
- # Top-level machine-readable help
420
- gitzone help config --json
421
-
422
- # Read-only commit recommendation
423
- gitzone commit recommend --json
279
+ # Preview changes
280
+ gitzone format
424
281
 
425
- # Read-only format plan
282
+ # Emit a machine-readable plan
426
283
  gitzone format plan --json
427
284
 
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
285
+ # Apply changes
286
+ gitzone format --write
443
287
 
444
- # 3. Synchronize updates
445
- gitzone meta update
288
+ # Apply without prompt
289
+ gitzone format --write --yes
446
290
  ```
447
291
 
448
- ### Safe Formatting with Plan Review
292
+ 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
293
 
450
- ```bash
451
- # 1. Preview changes (default)
452
- gitzone format
294
+ ## Development Services
453
295
 
454
- # 2. Save plan for review
455
- gitzone format --save-plan format-changes.json
296
+ `gitzone services` manages local Docker-backed services for development projects.
456
297
 
457
- # 3. Apply from saved plan
458
- gitzone format --from-plan format-changes.json --write
459
- ```
298
+ Supported services:
460
299
 
461
- ### Database-Driven Development
300
+ | Service | Aliases |
301
+ | --- | --- |
302
+ | MongoDB | `mongo`, `mongodb` |
303
+ | MinIO | `minio`, `s3` |
304
+ | Elasticsearch | `elasticsearch`, `es` |
462
305
 
463
306
  ```bash
464
- # 1. Start MongoDB, MinIO, and Elasticsearch
307
+ # Start configured services
465
308
  gitzone services start
466
309
 
467
- # 2. Get connection details
468
- gitzone services config
310
+ # Enable specific services non-interactively
311
+ gitzone services set mongodb,minio
312
+
313
+ # Check status
314
+ gitzone services status
469
315
 
470
- # 3. Connect with MongoDB Compass
316
+ # Print MongoDB Compass connection string
471
317
  gitzone services compass
472
318
 
473
- # 4. Monitor services
474
- gitzone services status
319
+ # Show logs
320
+ gitzone services logs mongo 50
475
321
 
476
- # 5. Clean everything when done
477
- gitzone services clean # ⚠️ Warning: deletes data
322
+ # Stop containers but keep data
323
+ gitzone services stop
324
+
325
+ # Remove containers and data
326
+ gitzone services clean
478
327
  ```
479
328
 
480
- ## 🔌 Integrations
329
+ Service config is stored in `.nogit/env.json`. Data is stored below `.nogit/`, so it stays out of Git.
481
330
 
482
- ### CI/CD Platforms
331
+ ## Templates
483
332
 
484
- - **GitLab CI** full pipeline support with templates
485
- - **GitHub Actions** — automated workflows
486
- - **Docker** — container-based deployments
333
+ Start new projects with built-in scaffolds:
487
334
 
488
- ### Development Tools
335
+ ```bash
336
+ gitzone template npm
337
+ gitzone template service
338
+ gitzone template website
339
+ gitzone template wcc
340
+ ```
489
341
 
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
342
+ Templates are rendered through SmartScaf and then can be normalized with `gitzone format`.
497
343
 
498
- ### Version Control
344
+ ## Meta Repositories
499
345
 
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`
346
+ Use `gitzone meta` when one workspace coordinates multiple repositories.
504
347
 
505
- ## 💡 Pro Tips
348
+ ```bash
349
+ gitzone meta init
350
+ gitzone meta add frontend https://example.com/org/frontend.git
351
+ gitzone meta update
352
+ gitzone meta remove frontend
353
+ ```
506
354
 
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
355
+ ## Other Utilities
515
356
 
516
- ## 🐛 Troubleshooting
357
+ ```bash
358
+ # Docker cleanup
359
+ gitzone docker prune
517
360
 
518
- ### Format Command Shows "Cancelled"
361
+ # Open GitLab CI settings or pipelines for the current repo
362
+ gitzone open ci
363
+ gitzone open pipelines
519
364
 
520
- - Check your `npmextra.json` configuration
521
- - Try with `--yes --write` flags
522
- - Use `--verbose` for detailed output
365
+ # Deprecate an old npm package interactively
366
+ gitzone deprecate
523
367
 
524
- ### Docker Commands Fail
368
+ # Prepare a project for local work
369
+ gitzone start
370
+
371
+ # Generate a short unique ID
372
+ gitzone helpers shortid
373
+ ```
374
+
375
+ ## Troubleshooting
525
376
 
526
- Ensure Docker daemon is running:
377
+ Format only previews changes:
527
378
 
528
379
  ```bash
529
- docker info
380
+ gitzone format --write
530
381
  ```
531
382
 
532
- ### Services Won't Start
383
+ Release says there is nothing to release:
533
384
 
534
385
  ```bash
535
- # Services auto-assign ports, but you can check the config
536
- cat .nogit/env.json
386
+ # Make sure commits have populated the Pending changelog section
387
+ gitzone commit
388
+ ```
537
389
 
538
- # Verify Docker is running
539
- docker ps
390
+ Docker services fail to start:
540
391
 
541
- # Reassign ports if there are conflicts
392
+ ```bash
393
+ docker info
394
+ gitzone services status
542
395
  gitzone services reconfigure
543
396
  ```
544
397
 
545
- ### Template Creation Issues
546
-
547
- Verify pnpm/npm is properly configured:
398
+ Config looks outdated:
548
399
 
549
400
  ```bash
550
- npm config get registry
401
+ gitzone config migrate 2
402
+ gitzone config show --json
551
403
  ```
552
404
 
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
405
  ## License and Legal Information
570
406
 
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.
407
+ 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
408
 
573
409
  **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
410