@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.
- package/.smartconfig.json +36 -11
- package/assets/templates/service/npmextra.json +8 -2
- package/assets/templates/smartconfig/_smartconfig.json +5 -1
- package/assets/templates/website/npmextra.json +8 -2
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/gitzone.cli.js +15 -1
- package/dist_ts/helpers.changelog.d.ts +16 -0
- package/dist_ts/helpers.changelog.js +114 -0
- package/dist_ts/helpers.smartconfigmigrations.d.ts +7 -0
- package/dist_ts/helpers.smartconfigmigrations.js +161 -0
- package/dist_ts/helpers.workflow.d.ts +97 -0
- package/dist_ts/helpers.workflow.js +258 -0
- package/dist_ts/mod_commit/index.js +190 -303
- package/dist_ts/mod_commit/mod.helpers.d.ts +23 -0
- package/dist_ts/mod_commit/mod.helpers.js +22 -15
- package/dist_ts/mod_commit/mod.ui.d.ts +1 -1
- package/dist_ts/mod_commit/mod.ui.js +7 -2
- package/dist_ts/mod_config/classes.commitconfig.d.ts +6 -0
- package/dist_ts/mod_config/classes.commitconfig.js +28 -4
- package/dist_ts/mod_config/classes.releaseconfig.js +13 -7
- package/dist_ts/mod_config/index.js +77 -29
- package/dist_ts/mod_format/formatters/smartconfig.formatter.js +3 -57
- package/dist_ts/mod_release/index.d.ts +3 -0
- package/dist_ts/mod_release/index.js +299 -0
- package/dist_ts/mod_release/mod.plugins.d.ts +3 -0
- package/dist_ts/mod_release/mod.plugins.js +4 -0
- package/dist_ts/mod_standard/index.js +29 -3
- package/dist_ts/mod_tools/classes.packagemanager.d.ts +27 -0
- package/dist_ts/mod_tools/classes.packagemanager.js +140 -0
- package/dist_ts/mod_tools/index.d.ts +4 -0
- package/dist_ts/mod_tools/index.js +290 -0
- package/dist_ts/mod_tools/mod.plugins.d.ts +1 -0
- package/dist_ts/mod_tools/mod.plugins.js +2 -0
- package/license +2 -2
- package/package.json +20 -30
- package/readme.hints.md +15 -17
- package/readme.md +251 -415
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/gitzone.cli.ts +16 -0
- package/ts/helpers.changelog.ts +165 -0
- package/ts/helpers.smartconfigmigrations.ts +192 -0
- package/ts/helpers.workflow.ts +387 -0
- package/ts/mod_commit/index.ts +233 -435
- package/ts/mod_commit/mod.helpers.ts +28 -16
- package/ts/mod_commit/mod.ui.ts +7 -2
- package/ts/mod_config/classes.commitconfig.ts +33 -3
- package/ts/mod_config/classes.releaseconfig.ts +14 -7
- package/ts/mod_config/index.ts +89 -28
- package/ts/mod_format/formatters/smartconfig.formatter.ts +2 -62
- package/ts/mod_release/index.ts +393 -0
- package/ts/mod_release/mod.plugins.ts +5 -0
- package/ts/mod_standard/index.ts +28 -2
- package/ts/mod_tools/classes.packagemanager.ts +176 -0
- package/ts/mod_tools/index.ts +359 -0
- 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
|
-
|
|
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
|
-
|
|
6
|
-
[](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
|
-
##
|
|
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
|
-
|
|
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
|
-
|
|
57
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
28
|
+
`gitzone release` handles release transactions.
|
|
92
29
|
|
|
93
|
-
|
|
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
|
-
|
|
32
|
+
## Quick Start
|
|
96
33
|
|
|
97
34
|
```bash
|
|
98
|
-
# Preview
|
|
35
|
+
# Preview project standardization work
|
|
99
36
|
gitzone format
|
|
100
37
|
|
|
101
|
-
#
|
|
102
|
-
gitzone format plan --json
|
|
103
|
-
|
|
104
|
-
# Apply changes
|
|
38
|
+
# Apply formatting changes
|
|
105
39
|
gitzone format --write
|
|
106
40
|
|
|
107
|
-
#
|
|
108
|
-
gitzone
|
|
41
|
+
# Create a semantic source commit
|
|
42
|
+
gitzone commit
|
|
109
43
|
|
|
110
|
-
#
|
|
111
|
-
gitzone
|
|
44
|
+
# Preview the configured release transaction
|
|
45
|
+
gitzone release --plan
|
|
112
46
|
|
|
113
|
-
#
|
|
114
|
-
gitzone
|
|
47
|
+
# Release pending changelog entries to configured targets
|
|
48
|
+
gitzone release
|
|
115
49
|
```
|
|
116
50
|
|
|
117
|
-
|
|
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
|
-
|
|
149
|
-
|
|
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
|
-
|
|
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
|
-
|
|
189
|
-
# List all registered projects
|
|
190
|
-
gitzone services list -g
|
|
71
|
+
## Toolchain Management
|
|
191
72
|
|
|
192
|
-
|
|
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
|
-
#
|
|
206
|
-
gitzone
|
|
76
|
+
# Check installed @git.zone tools and update outdated packages
|
|
77
|
+
gitzone tools update
|
|
207
78
|
|
|
208
|
-
#
|
|
209
|
-
gitzone
|
|
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
|
-
#
|
|
219
|
-
gitzone
|
|
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
|
-
|
|
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
|
-
|
|
88
|
+
## Commit Workflow
|
|
228
89
|
|
|
229
|
-
|
|
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
|
-
|
|
234
|
-
|
|
235
|
-
|
|
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
|
-
|
|
96
|
+
# Read-only AI recommendation
|
|
97
|
+
gitzone commit recommend --json
|
|
248
98
|
|
|
249
|
-
|
|
99
|
+
# Auto-accept safe recommendations
|
|
100
|
+
gitzone commit -y
|
|
250
101
|
|
|
251
|
-
|
|
102
|
+
# Auto-accept, test, build, and push
|
|
103
|
+
gitzone commit -ytbp
|
|
252
104
|
|
|
253
|
-
|
|
254
|
-
gitzone
|
|
105
|
+
# Show the resolved workflow without mutating anything
|
|
106
|
+
gitzone commit --plan
|
|
255
107
|
```
|
|
256
108
|
|
|
257
|
-
|
|
109
|
+
The commit flow:
|
|
258
110
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
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
|
-
|
|
117
|
+
Commit flags:
|
|
265
118
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
-
|
|
269
|
-
|
|
270
|
-
|
|
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
|
-
|
|
128
|
+
`-r` is intentionally not part of commit anymore. Use `gitzone release`.
|
|
273
129
|
|
|
274
|
-
|
|
130
|
+
## Release Workflow
|
|
275
131
|
|
|
276
|
-
|
|
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
|
-
|
|
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
|
-
|
|
284
|
-
|
|
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
|
-
|
|
287
|
-
gitzone meta remove [name]
|
|
288
|
-
```
|
|
144
|
+
Targets decide what happens after that:
|
|
289
145
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
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
|
-
#
|
|
296
|
-
gitzone
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
### 🔗 Quick CI/CD Access
|
|
153
|
+
# Preview the resolved release plan
|
|
154
|
+
gitzone release --plan
|
|
300
155
|
|
|
301
|
-
|
|
156
|
+
# Release to configured targets
|
|
157
|
+
gitzone release
|
|
302
158
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
gitzone open ci
|
|
159
|
+
# Release only to npm
|
|
160
|
+
gitzone release --target npm
|
|
306
161
|
|
|
307
|
-
#
|
|
308
|
-
gitzone
|
|
309
|
-
```
|
|
162
|
+
# Release only to git and Docker
|
|
163
|
+
gitzone release --target git,docker
|
|
310
164
|
|
|
311
|
-
|
|
165
|
+
# Skip package/container publishing and keep only git target
|
|
166
|
+
gitzone release --no-publish
|
|
312
167
|
|
|
313
|
-
|
|
168
|
+
# Override inferred semver level
|
|
169
|
+
gitzone release --minor
|
|
170
|
+
```
|
|
314
171
|
|
|
315
|
-
|
|
172
|
+
Release flags:
|
|
316
173
|
|
|
317
|
-
|
|
318
|
-
|
|
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
|
-
|
|
188
|
+
## Standard Changelog
|
|
322
189
|
|
|
323
|
-
|
|
190
|
+
The changelog is convention-based and intentionally not configured.
|
|
324
191
|
|
|
325
|
-
|
|
192
|
+
`gitzone commit` appends entries to:
|
|
326
193
|
|
|
327
|
-
```
|
|
328
|
-
|
|
194
|
+
```markdown
|
|
195
|
+
## Pending
|
|
329
196
|
```
|
|
330
197
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
### 🔧 Helper Utilities
|
|
198
|
+
`gitzone release` moves those pending entries into a dated version section:
|
|
334
199
|
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
gitzone helpers shortid
|
|
200
|
+
```markdown
|
|
201
|
+
## 2026-05-10 - 2.15.0
|
|
338
202
|
```
|
|
339
203
|
|
|
340
|
-
|
|
204
|
+
The standard buckets are `Breaking Changes`, `Features`, `Fixes`, `Documentation`, and `Maintenance`.
|
|
341
205
|
|
|
342
|
-
|
|
206
|
+
## Configuration
|
|
343
207
|
|
|
344
|
-
|
|
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
|
-
"
|
|
361
|
-
"
|
|
216
|
+
"confirmation": "prompt",
|
|
217
|
+
"steps": ["analyze", "test", "build", "changelog", "commit", "push"]
|
|
362
218
|
},
|
|
363
|
-
"
|
|
364
|
-
"
|
|
365
|
-
"
|
|
366
|
-
|
|
367
|
-
"
|
|
368
|
-
"
|
|
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
|
-
|
|
249
|
+
NPM registries belong only here:
|
|
376
250
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
## 🎯 Common Workflows
|
|
251
|
+
```text
|
|
252
|
+
@git.zone/cli.release.targets.npm.registries
|
|
253
|
+
```
|
|
382
254
|
|
|
383
|
-
|
|
255
|
+
Useful config commands:
|
|
384
256
|
|
|
385
257
|
```bash
|
|
386
|
-
#
|
|
387
|
-
gitzone
|
|
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
|
-
#
|
|
393
|
-
|
|
261
|
+
# Read the npm release target registries
|
|
262
|
+
gitzone config get release.targets.npm.registries
|
|
394
263
|
|
|
395
|
-
#
|
|
396
|
-
gitzone
|
|
264
|
+
# Add an npm release target registry
|
|
265
|
+
gitzone config add https://registry.npmjs.org
|
|
397
266
|
|
|
398
|
-
#
|
|
399
|
-
gitzone
|
|
400
|
-
gitzone format --write
|
|
267
|
+
# Set npm target access level
|
|
268
|
+
gitzone config access public
|
|
401
269
|
|
|
402
|
-
#
|
|
403
|
-
gitzone
|
|
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
|
-
|
|
274
|
+
## Formatting
|
|
410
275
|
|
|
411
|
-
|
|
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
|
-
#
|
|
420
|
-
gitzone
|
|
421
|
-
|
|
422
|
-
# Read-only commit recommendation
|
|
423
|
-
gitzone commit recommend --json
|
|
279
|
+
# Preview changes
|
|
280
|
+
gitzone format
|
|
424
281
|
|
|
425
|
-
#
|
|
282
|
+
# Emit a machine-readable plan
|
|
426
283
|
gitzone format plan --json
|
|
427
284
|
|
|
428
|
-
#
|
|
429
|
-
gitzone
|
|
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
|
-
#
|
|
445
|
-
gitzone
|
|
288
|
+
# Apply without prompt
|
|
289
|
+
gitzone format --write --yes
|
|
446
290
|
```
|
|
447
291
|
|
|
448
|
-
|
|
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
|
-
|
|
451
|
-
# 1. Preview changes (default)
|
|
452
|
-
gitzone format
|
|
294
|
+
## Development Services
|
|
453
295
|
|
|
454
|
-
|
|
455
|
-
gitzone format --save-plan format-changes.json
|
|
296
|
+
`gitzone services` manages local Docker-backed services for development projects.
|
|
456
297
|
|
|
457
|
-
|
|
458
|
-
gitzone format --from-plan format-changes.json --write
|
|
459
|
-
```
|
|
298
|
+
Supported services:
|
|
460
299
|
|
|
461
|
-
|
|
300
|
+
| Service | Aliases |
|
|
301
|
+
| --- | --- |
|
|
302
|
+
| MongoDB | `mongo`, `mongodb` |
|
|
303
|
+
| MinIO | `minio`, `s3` |
|
|
304
|
+
| Elasticsearch | `elasticsearch`, `es` |
|
|
462
305
|
|
|
463
306
|
```bash
|
|
464
|
-
#
|
|
307
|
+
# Start configured services
|
|
465
308
|
gitzone services start
|
|
466
309
|
|
|
467
|
-
#
|
|
468
|
-
gitzone services
|
|
310
|
+
# Enable specific services non-interactively
|
|
311
|
+
gitzone services set mongodb,minio
|
|
312
|
+
|
|
313
|
+
# Check status
|
|
314
|
+
gitzone services status
|
|
469
315
|
|
|
470
|
-
#
|
|
316
|
+
# Print MongoDB Compass connection string
|
|
471
317
|
gitzone services compass
|
|
472
318
|
|
|
473
|
-
#
|
|
474
|
-
gitzone services
|
|
319
|
+
# Show logs
|
|
320
|
+
gitzone services logs mongo 50
|
|
475
321
|
|
|
476
|
-
#
|
|
477
|
-
gitzone services
|
|
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
|
-
|
|
329
|
+
Service config is stored in `.nogit/env.json`. Data is stored below `.nogit/`, so it stays out of Git.
|
|
481
330
|
|
|
482
|
-
|
|
331
|
+
## Templates
|
|
483
332
|
|
|
484
|
-
|
|
485
|
-
- **GitHub Actions** — automated workflows
|
|
486
|
-
- **Docker** — container-based deployments
|
|
333
|
+
Start new projects with built-in scaffolds:
|
|
487
334
|
|
|
488
|
-
|
|
335
|
+
```bash
|
|
336
|
+
gitzone template npm
|
|
337
|
+
gitzone template service
|
|
338
|
+
gitzone template website
|
|
339
|
+
gitzone template wcc
|
|
340
|
+
```
|
|
489
341
|
|
|
490
|
-
|
|
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
|
-
|
|
344
|
+
## Meta Repositories
|
|
499
345
|
|
|
500
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
357
|
+
```bash
|
|
358
|
+
# Docker cleanup
|
|
359
|
+
gitzone docker prune
|
|
517
360
|
|
|
518
|
-
|
|
361
|
+
# Open GitLab CI settings or pipelines for the current repo
|
|
362
|
+
gitzone open ci
|
|
363
|
+
gitzone open pipelines
|
|
519
364
|
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
- Use `--verbose` for detailed output
|
|
365
|
+
# Deprecate an old npm package interactively
|
|
366
|
+
gitzone deprecate
|
|
523
367
|
|
|
524
|
-
|
|
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
|
-
|
|
377
|
+
Format only previews changes:
|
|
527
378
|
|
|
528
379
|
```bash
|
|
529
|
-
|
|
380
|
+
gitzone format --write
|
|
530
381
|
```
|
|
531
382
|
|
|
532
|
-
|
|
383
|
+
Release says there is nothing to release:
|
|
533
384
|
|
|
534
385
|
```bash
|
|
535
|
-
#
|
|
536
|
-
|
|
386
|
+
# Make sure commits have populated the Pending changelog section
|
|
387
|
+
gitzone commit
|
|
388
|
+
```
|
|
537
389
|
|
|
538
|
-
|
|
539
|
-
docker ps
|
|
390
|
+
Docker services fail to start:
|
|
540
391
|
|
|
541
|
-
|
|
392
|
+
```bash
|
|
393
|
+
docker info
|
|
394
|
+
gitzone services status
|
|
542
395
|
gitzone services reconfigure
|
|
543
396
|
```
|
|
544
397
|
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
Verify pnpm/npm is properly configured:
|
|
398
|
+
Config looks outdated:
|
|
548
399
|
|
|
549
400
|
```bash
|
|
550
|
-
|
|
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](./
|
|
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
|
|