contribute-now 0.7.3 → 0.7.4-dev.e1cbd66

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 (3) hide show
  1. package/README.md +67 -64
  2. package/dist/cli.js +470 -1738
  3. package/package.json +1 -3
package/README.md CHANGED
@@ -14,7 +14,7 @@ It natively supports multiple workflow models and commit conventions, with AI-po
14
14
 
15
15
  ## Workflow Modes
16
16
 
17
- Pick the model that matches your project during `contrib setup`. contribute-now adapts its commands to your chosen workflow automatically — no manual branch names to remember.
17
+ Pick the model that matches your project during `cn setup`. contribute-now adapts its commands to your chosen workflow automatically — no manual branch names to remember.
18
18
 
19
19
  | Mode | Branches | Strategy | Default |
20
20
  |------|----------|----------|:-------:|
@@ -44,12 +44,14 @@ Or install globally:
44
44
 
45
45
  ```bash
46
46
  bun install -g contribute-now
47
- contrib setup
47
+ contribute setup
48
48
  ```
49
49
 
50
50
  `contribute-now` now runs on Bun at runtime. Use `bunx` for one-off execution and `bun install -g` for a global install.
51
51
 
52
- > `contrib`, `contribute`, and `cn` all invoke the same binary — use whichever you prefer.
52
+ > `contribute` is the primary command; `cn` is the short alias for the same binary — use whichever you prefer.
53
+ >
54
+ > The older `contrib` alias is being phased out. Please switch to `contribute` or `cn`.
53
55
  >
54
56
  > **Fun fact:** `cn` is shorter than `git`. Yes, your workflow command is now faster to type than git itself. 🚀
55
57
 
@@ -72,14 +74,15 @@ npm install -g bun
72
74
  npm install -g contribute-now
73
75
  ```
74
76
 
75
- Once installed, you can use any of the three aliases:
77
+ Once installed, you can use either alias:
76
78
 
77
79
  ```bash
78
- contrib setup # classic
79
- contribute setup # spelled out
80
- cn setup # shortest — even shorter than git!
80
+ contribute setup # primary command — spelled out
81
+ cn setup # short alias — even shorter than git!
81
82
  ```
82
83
 
84
+ > The legacy `contrib` alias still works but is being phased out. Prefer `contribute` or `cn`.
85
+
83
86
  ## Prerequisites
84
87
 
85
88
  - **[Git](https://git-scm.com/)** — required
@@ -90,12 +93,12 @@ cn setup # shortest — even shorter than git!
90
93
 
91
94
  ## Commands
92
95
 
93
- ### `contrib setup`
96
+ ### `cn setup`
94
97
 
95
98
  Interactive setup wizard. Configures your repo's workflow mode, commit convention, your role, branch/remote names, and AI provider settings. Writes local config to `.git/contribute-now/config.json` by default.
96
99
 
97
100
  ```bash
98
- contrib setup
101
+ cn setup
99
102
  ```
100
103
 
101
104
  Steps:
@@ -107,33 +110,33 @@ Steps:
107
110
  6. Confirm branch and remote names
108
111
  7. Write `.git/contribute-now/config.json` (or update `.contributerc.json` if that legacy file is still the active source)
109
112
 
110
- If you want to disable AI completely for a repo, run `contrib setup` and turn AI off, or set `"aiEnabled": false` in the active config file. Per-command `--no-ai` flags still work as one-off overrides when AI is enabled globally.
113
+ If you want to disable AI completely for a repo, run `cn setup` and turn AI off, or set `"aiEnabled": false` in the active config file. Per-command `--no-ai` flags still work as one-off overrides when AI is enabled globally.
111
114
 
112
115
  If you want a cleaner output once you're familiar with the CLI, set `"showTips": false` in the active config file to hide the beginner quick guides and loading tips.
113
116
 
114
117
  ---
115
118
 
116
- ### `contrib config`
119
+ ### `cn config`
117
120
 
118
121
  Inspect the active repo config or edit it without rerunning the full setup flow.
119
122
 
120
123
  ```bash
121
- contrib config
122
- contrib config --json
123
- contrib config --edit
124
+ cn config
125
+ cn config --json
126
+ cn config --edit
124
127
  ```
125
128
 
126
129
  Use `--edit` to update workflow settings, branch names, commit convention, AI provider details, the stored Ollama Cloud API key, and to choose from the currently available Ollama Cloud models. Ollama Cloud uses the built-in default host and does not ask for a custom host URL.
127
130
 
128
131
  ---
129
132
 
130
- ### `contrib sync`
133
+ ### `cn sync`
131
134
 
132
135
  Pull the latest changes from the correct remote branch based on your workflow and role.
133
136
 
134
137
  ```bash
135
- contrib sync # with confirmation
136
- contrib sync --yes # skip confirmation
138
+ cn sync # with confirmation
139
+ cn sync --yes # skip confirmation
137
140
  ```
138
141
 
139
142
  | Role | Clean Flow / Git Flow | GitHub Flow |
@@ -143,94 +146,94 @@ contrib sync --yes # skip confirmation
143
146
 
144
147
  ---
145
148
 
146
- ### `contrib start`
149
+ ### `cn start`
147
150
 
148
151
  Create a new feature branch from the correct base branch, with optional AI-powered branch naming.
149
152
 
150
153
  ```bash
151
154
  # Direct branch name
152
- contrib start feature/user-auth
155
+ cn start feature/user-auth
153
156
 
154
157
  # Natural language — AI suggests the branch name
155
- contrib start "add user authentication"
158
+ cn start "add user authentication"
156
159
 
157
160
  # Skip AI
158
- contrib start "add user authentication" --no-ai
161
+ cn start "add user authentication" --no-ai
159
162
  ```
160
163
 
161
164
  ---
162
165
 
163
- ### `contrib commit`
166
+ ### `cn commit`
164
167
 
165
168
  Stage your changes and create a validated, AI-generated commit message matching your configured convention.
166
169
 
167
170
  ```bash
168
- contrib commit # AI-generated message
169
- contrib commit --no-ai # manual entry, still validated
170
- contrib commit --model gpt-4.1 # specific AI model
171
- contrib commit --group # AI groups changes into atomic commits
171
+ cn commit # AI-generated message
172
+ cn commit --no-ai # manual entry, still validated
173
+ cn commit --model gpt-4.1 # specific AI model
174
+ cn commit --group # AI groups changes into atomic commits
172
175
  ```
173
176
 
174
177
  After the AI generates a message, you can **accept**, **edit**, **regenerate**, or **write manually**. Messages are always validated against your convention — with a soft warning if they don't match (you can still commit).
175
178
 
176
179
  **Group commit mode** (`--group`): AI analyzes all staged and unstaged changes, groups related files into logical atomic commits, and generates a commit message for each group. Great for splitting a large set of changes into clean, reviewable commits.
177
180
 
178
- If `aiEnabled` is set to `false` in `.contributerc.json`, `contrib commit` stays manual and `--group` is unavailable.
181
+ If `aiEnabled` is set to `false` in `.contributerc.json`, `cn commit` stays manual and `--group` is unavailable.
179
182
 
180
183
  ---
181
184
 
182
- ### `contrib update`
185
+ ### `cn update`
183
186
 
184
187
  Rebase your current branch onto the latest base branch, with AI guidance if conflicts occur.
185
188
 
186
189
  ```bash
187
- contrib update
188
- contrib update --no-ai # skip AI conflict guidance
190
+ cn update
191
+ cn update --no-ai # skip AI conflict guidance
189
192
  ```
190
193
 
191
194
  ---
192
195
 
193
- ### `contrib submit`
196
+ ### `cn submit`
194
197
 
195
198
  Push your branch and open a pull request with an AI-generated title and description.
196
199
 
197
200
  ```bash
198
- contrib submit
199
- contrib submit --draft
200
- contrib submit --no-ai
201
- contrib submit --model gpt-4.1
201
+ cn submit
202
+ cn submit --draft
203
+ cn submit --no-ai
204
+ cn submit --model gpt-4.1
202
205
  ```
203
206
 
204
207
  ---
205
208
 
206
- ### `contrib clean`
209
+ ### `cn clean`
207
210
 
208
211
  Delete merged branches and prune stale remote refs.
209
212
 
210
213
  ```bash
211
- contrib clean # shows candidates, asks to confirm
212
- contrib clean --yes # skip confirmation
214
+ cn clean # shows candidates, asks to confirm
215
+ cn clean --yes # skip confirmation
213
216
  ```
214
217
 
215
218
  ---
216
219
 
217
- ### `contrib status`
220
+ ### `cn status`
218
221
 
219
222
  Show a sync status dashboard for your main, dev, and current branch.
220
223
 
221
224
  ```bash
222
- contrib status
225
+ cn status
223
226
  ```
224
227
 
225
228
  ---
226
229
 
227
- ### `contrib doctor`
230
+ ### `cn doctor`
228
231
 
229
232
  Diagnose the contribute-now CLI environment and configuration. Checks tools, dependencies, config, git state, fork setup, workflow, and environment.
230
233
 
231
234
  ```bash
232
- contrib doctor # pretty-printed report
233
- contrib doctor --json # machine-readable JSON output
235
+ cn doctor # pretty-printed report
236
+ cn doctor --json # machine-readable JSON output
234
237
  ```
235
238
 
236
239
  Checks include:
@@ -243,45 +246,45 @@ Checks include:
243
246
 
244
247
  ---
245
248
 
246
- ### `contrib log`
249
+ ### `cn log`
247
250
 
248
251
  Show a colorized, workflow-aware commit log. By default it shows only **local unpushed commits** — the changes you've made since the last push (or since branching off the base branch). Use flags to switch between different views.
249
252
 
250
253
  ```bash
251
- contrib log # local unpushed commits (default)
252
- contrib log --remote # commits on remote not yet pulled
253
- contrib log --full # full history for the current branch
254
- contrib log --all # commits across all branches
255
- contrib log -n 50 # change the commit limit (default: 20)
256
- contrib log -b feature/x # log for a specific branch
257
- contrib log --no-graph # flat view without graph lines
254
+ cn log # local unpushed commits (default)
255
+ cn log --remote # commits on remote not yet pulled
256
+ cn log --full # full history for the current branch
257
+ cn log --all # commits across all branches
258
+ cn log -n 50 # change the commit limit (default: 20)
259
+ cn log -b feature/x # log for a specific branch
260
+ cn log --no-graph # flat view without graph lines
258
261
  ```
259
262
 
260
263
  When no upstream tracking is set (branch hasn't been pushed yet), the command automatically compares against the base branch from your config (e.g., `origin/dev`). Protected branches are highlighted, and the current branch is color-coded for quick orientation.
261
264
 
262
265
  ---
263
266
 
264
- ### `contrib branch`
267
+ ### `cn branch`
265
268
 
266
269
  List branches with workflow-aware labels and tracking status.
267
270
 
268
271
  ```bash
269
- contrib branch # local branches
270
- contrib branch --all # local + remote branches
271
- contrib branch --remote # remote branches only
272
+ cn branch # local branches
273
+ cn branch --all # local + remote branches
274
+ cn branch --remote # remote branches only
272
275
  ```
273
276
 
274
277
  Branches are annotated with workflow labels (e.g., base, dev, feature) and tracking info (upstream, gone, no remote).
275
278
 
276
279
  ---
277
280
 
278
- ### `contrib hook`
281
+ ### `cn hook`
279
282
 
280
283
  Install or uninstall a `commit-msg` git hook that validates every commit against your configured convention — no Husky or lint-staged needed.
281
284
 
282
285
  ```bash
283
- contrib hook install # writes .git/hooks/commit-msg
284
- contrib hook uninstall # removes it
286
+ cn hook install # writes .git/hooks/commit-msg
287
+ cn hook uninstall # removes it
285
288
  ```
286
289
 
287
290
  - Automatically skips merge commits, fixup, squash, and amend commits
@@ -289,13 +292,13 @@ contrib hook uninstall # removes it
289
292
 
290
293
  ---
291
294
 
292
- ### `contrib validate`
295
+ ### `cn validate`
293
296
 
294
297
  Validate a commit message against your configured convention. Exits `0` if valid, `1` if not — useful in CI pipelines or custom hooks.
295
298
 
296
299
  ```bash
297
- contrib validate "📦 new: user auth module" # exit 0
298
- contrib validate "added stuff" # exit 1
300
+ cn validate "📦 new: user auth module" # exit 0
301
+ cn validate "added stuff" # exit 1
299
302
  ```
300
303
 
301
304
  ---
@@ -364,7 +367,7 @@ feat!: redesign authentication API
364
367
 
365
368
  ## Config File
366
369
 
367
- `contrib setup` writes `.git/contribute-now/config.json` by default. If a legacy `.contributerc.json` already exists, it remains the active source until you migrate or remove it:
370
+ `cn setup` writes `.git/contribute-now/config.json` by default. If a legacy `.contributerc.json` already exists, it remains the active source until you migrate or remove it:
368
371
 
369
372
  ```json
370
373
  {
@@ -379,7 +382,7 @@ feat!: redesign authentication API
379
382
  }
380
383
  ```
381
384
 
382
- Use `contrib config --edit` to change these values later without rerunning the full setup flow. If you are still on the legacy `.contributerc.json`, keep that file ignored until you migrate away from it.
385
+ Use `cn config --edit` to change these values later without rerunning the full setup flow. If you are still on the legacy `.contributerc.json`, keep that file ignored until you migrate away from it.
383
386
 
384
387
  ---
385
388
 
@@ -429,7 +432,7 @@ This project is licensed under [GNU General Public License v3.0](https://opensou
429
432
 
430
433
  This project is created by **[Waren Gonzaga](https://github.com/warengonzaga)**, with the help of awesome [contributors](https://github.com/warengonzaga/contribute-now/graphs/contributors).
431
434
 
432
- [![contributors](https://contrib.rocks/image?repo=warengonzaga/contribute-now)](https://github.com/warengonzaga/contribute-now/graphs/contributors)
435
+ [![contributors](https://cn.rocks/image?repo=warengonzaga/contribute-now)](https://github.com/warengonzaga/contribute-now/graphs/contributors)
433
436
 
434
437
  ---
435
438