contribute-now 0.7.5 → 0.8.0-dev.0a7f557

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 +55 -8
  2. package/dist/cli.js +1853 -809
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -7,10 +7,11 @@
7
7
 
8
8
  It natively supports multiple workflow models and commit conventions, with AI-powered assistance throughout.
9
9
 
10
- [![License: GPL-3.0](https://img.shields.io/badge/License-GPL--3.0-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
11
- [![npm version](https://img.shields.io/npm/v/contribute-now.svg)](https://www.npmjs.com/package/contribute-now)
10
+ [![License: GPL-3.0](https://img.shields.io/badge/License-GPL--3.0-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) [![npm version](https://img.shields.io/npm/v/contribute-now.svg)](https://www.npmjs.com/package/contribute-now)
12
11
 
13
- ---
12
+ ## Demo
13
+
14
+ ![Demo GIF](.github/assets/demo.gif)
14
15
 
15
16
  ## Workflow Modes
16
17
 
@@ -87,7 +88,8 @@ cn setup # short alias — even shorter than git!
87
88
 
88
89
  - **[Git](https://git-scm.com/)** — required
89
90
  - **[GitHub CLI](https://cli.github.com)** (`gh`) — recommended; required for PR creation, role detection, and merge status checks
90
- - **[GitHub Copilot](https://github.com/features/copilot)** — optional; enables AI features
91
+ - **[GitHub Copilot](https://github.com/features/copilot)** — optional; one of the supported AI providers
92
+ - **[Ollama Cloud](https://ollama.com)** or **[OpenRouter](https://openrouter.ai)** API key — optional; alternative AI providers
91
93
 
92
94
  ---
93
95
 
@@ -105,7 +107,7 @@ Steps:
105
107
  1. Choose **workflow mode** — Clean Flow, GitHub Flow, or Git Flow
106
108
  2. Choose **commit convention** — Clean Commit, Conventional Commits, or None
107
109
  3. Choose whether **AI features** should be enabled for this repo
108
- 4. If using **Ollama Cloud**, pick from the available models returned by your API key, or enter one manually
110
+ 4. If using **Ollama Cloud** or **OpenRouter**, enter your API key; pick from the available models returned by your key, or enter one manually
109
111
  5. Detect remotes and auto-detect your **role** (maintainer or contributor)
110
112
  6. Confirm branch and remote names
111
113
  7. Write `.git/contribute-now/config.json` (or update `.contributerc.json` if that legacy file is still the active source)
@@ -126,7 +128,7 @@ cn config --json
126
128
  cn config --edit
127
129
  ```
128
130
 
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.
131
+ Use `--edit` to update workflow settings, branch names, commit convention, AI provider details, stored API keys (Ollama Cloud or OpenRouter), and to choose from the currently available models for the selected provider.
130
132
 
131
133
  ---
132
134
 
@@ -303,9 +305,44 @@ cn validate "added stuff" # exit 1
303
305
 
304
306
  ---
305
307
 
308
+ ### `cn label`
309
+
310
+ Apply existing labels to issues and pull requests, or get ranked label suggestions from content. All operations are non-interactive and automation-friendly.
311
+
312
+ ```bash
313
+ # Apply one or more labels to an issue
314
+ cn label add --issue 42 bug,enhancement
315
+
316
+ # Apply labels with spaces in their names (no quotes needed in most shells)
317
+ cn label add --issue 42 bug,good first issue
318
+
319
+ # Apply labels to a PR
320
+ cn label add --pr 7 enhancement,needs triage
321
+
322
+ # Get ranked label suggestions for an issue
323
+ cn label suggest --issue 42
324
+
325
+ # Get ranked label suggestions for a PR
326
+ cn label suggest --pr 7
327
+ ```
328
+
329
+ **Label source strategy:**
330
+ 1. Repository labels are fetched once and cached locally (`.git/contribute-now/labels.json`).
331
+ 2. If the repository labels are a 100% name-match against the [Clean Labels](https://github.com/wgtechlabs/clean-labels) dataset, Clean Labels (with canonical descriptions) are used as the source.
332
+ 3. Otherwise, repository-specific labels are used.
333
+ 4. The local cache is used by default — no repeated `gh` API calls.
334
+ 5. On label-not-found errors, the cache is automatically resynced and the operation is retried once.
335
+
336
+ **Label input format:**
337
+ - Commas are the separator between labels.
338
+ - Spaces are part of a label name (`good first issue` is one label, not three words).
339
+ - Unknown labels are reported with close-match suggestions.
340
+
341
+ ---
342
+
306
343
  ## AI Features
307
344
 
308
- All AI features are powered by **GitHub Copilot** via `@github/copilot-sdk` and are entirely **optional** — every command has a manual fallback.
345
+ All AI features are **optional** — every command has a manual fallback. Three providers are supported: **GitHub Copilot**, **Ollama Cloud**, and **OpenRouter**.
309
346
 
310
347
  | Command | AI Feature | Fallback |
311
348
  |---------|------------|----------|
@@ -315,7 +352,17 @@ All AI features are powered by **GitHub Copilot** via `@github/copilot-sdk` and
315
352
  | `update` | Conflict resolution guidance | Standard git instructions |
316
353
  | `submit` | Generate PR title and body | `gh pr create --fill` or manual |
317
354
 
318
- Pass `--no-ai` to any command to skip AI entirely. Use `--model <name>` to select a specific Copilot model (e.g., `gpt-4.1`, `claude-sonnet-4`).
355
+ Pass `--no-ai` to any command to skip AI entirely. Use `--model <name>` to select a specific model (e.g., `gpt-4.1`, `claude-sonnet-4`).
356
+
357
+ ### AI Providers
358
+
359
+ | Provider | Auth | How it works |
360
+ |----------|------|--------------|
361
+ | **GitHub Copilot** *(default)* | `gh auth login` | Uses your existing GitHub/Copilot auth via the `@github/copilot-sdk` |
362
+ | **Ollama Cloud** | API key (stored in local secrets) | OpenAI-compatible API; model list fetched from your key on setup |
363
+ | **OpenRouter** | API key (stored in local secrets) | Unified API that routes to many model providers (OpenAI, Anthropic, Google, etc.) |
364
+
365
+ Select your provider during `cn setup` or change it later with `cn config --edit`. API keys for Ollama Cloud and OpenRouter are stored as plain JSON in `~/.contribute-now/secrets/store.json` with file permissions restricted to the current user (mode 0600) — never in the plain config file.
319
366
 
320
367
  ---
321
368