@nevaberry/opencodecommit 1.2.1 → 1.3.2
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/README.md +16 -118
- package/package.json +2 -5
package/README.md
CHANGED
|
@@ -1,124 +1,22 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @nevaberry/opencodecommit
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Compatibility package for OpenCodeCommit.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
[VSCodium Open VSX registry](https://open-vsx.org/extension/Nevaberry/opencodecommit)<br>
|
|
8
|
-
[VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=Nevaberry.opencodecommit) · [npm](https://www.npmjs.com/package/opencodecommit) · [scoped npm](https://www.npmjs.com/package/@nevaberry/opencodecommit) · [crates.io](https://crates.io/crates/opencodecommit) · [GitHub](https://github.com/Nevaberry/opencodecommit)
|
|
9
|
-
|
|
10
|
-
## Install
|
|
11
|
-
|
|
12
|
-
**Extension:** Search "OpenCodeCommit" in VSCodium / VS Code, or `ext install Nevaberry.opencodecommit`
|
|
13
|
-
|
|
14
|
-
**CLI:** `cargo install opencodecommit` or `npm i -g opencodecommit` (official unscoped alias: `@nevaberry/opencodecommit`)
|
|
15
|
-
|
|
16
|
-
**Prerequisite:** At least one CLI backend:
|
|
17
|
-
|
|
18
|
-
| Backend | Install |
|
|
19
|
-
|---------|---------|
|
|
20
|
-
| [Codex CLI](https://github.com/openai/codex) | `npm i -g @openai/codex` |
|
|
21
|
-
| [OpenCode](https://github.com/nicepkg/opencode) | `npm i -g opencode` |
|
|
22
|
-
| [Gemini CLI](https://github.com/google-gemini/gemini-cli) | `npm i -g @google/gemini-cli` |
|
|
23
|
-
| [Claude Code](https://docs.anthropic.com/en/docs/claude-code) | `npm i -g @anthropic-ai/claude-code` |
|
|
24
|
-
|
|
25
|
-
## VSCodium / VS Code Usage
|
|
26
|
-
|
|
27
|
-
1. Stage changes (or leave unstaged — auto-detected)
|
|
28
|
-
2. Click the **sparkle button** in Source Control
|
|
29
|
-
3. Commit message appears in the input box
|
|
30
|
-
|
|
31
|
-
Dropdown menu: mode-specific generation, refine, branch name generation, switch language, diagnose.
|
|
32
|
-
|
|
33
|
-
## CLI Usage
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
occ tui # launch the minimal interactive TUI
|
|
37
|
-
occ commit # generate message + commit
|
|
38
|
-
occ commit --dry-run # preview only, don't commit
|
|
39
|
-
occ commit --language Suomi # generate in Finnish
|
|
40
|
-
occ branch # generate branch name + checkout
|
|
41
|
-
occ branch --mode adaptive # match existing branch naming style
|
|
42
|
-
occ pr # generate PR title + body
|
|
43
|
-
occ changelog # generate changelog entry
|
|
44
|
-
|
|
45
|
-
# JSON output (default), or --text for human readable plain text
|
|
46
|
-
occ commit --text
|
|
47
|
-
occ commit --allow-sensitive # skip secret scanning
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
`occ tui` is a small launcher over the existing commands, not a full git dashboard. It lets you generate, shorten, and commit messages, plus preview branch / PR / changelog output from one screen.
|
|
51
|
-
|
|
52
|
-
`occ` is the short form. `opencodecommit` also works if `occ` clashes with something on your system.
|
|
53
|
-
|
|
54
|
-
Exit codes: 0 success, 1 no changes, 2 backend error, 3 config error, 5 sensitive content detected
|
|
55
|
-
|
|
56
|
-
## Transparent Git Guard
|
|
57
|
-
|
|
58
|
-
Use OpenCodeCommit as a background safety layer for normal `git commit` usage:
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
occ guard install --global # install a machine-wide commit guard
|
|
62
|
-
occ guard uninstall --global # remove the machine-wide guard
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
This installs a managed global hooks directory via `core.hooksPath`. `pre-commit` scans the staged diff for sensitive content, and other hook names are chained through so existing repo hooks still run.
|
|
66
|
-
|
|
67
|
-
## Sensitive Content Detection
|
|
68
|
-
|
|
69
|
-
Diffs are scanned locally before being sent to any AI backend. `occ commit` blocks with exit code 5, and the global guard blocks normal `git commit` before the commit is created.
|
|
70
|
-
|
|
71
|
-
Guard warnings include the file, line number when available, rule, and a redacted snippet preview. If a hook-mode block is an intentional false positive, bypass only OpenCodeCommit for that one command:
|
|
5
|
+
Install `opencodecommit` instead:
|
|
72
6
|
|
|
73
7
|
```bash
|
|
74
|
-
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
**Flagged file names:**
|
|
78
|
-
|
|
79
|
-
| Category | Patterns |
|
|
80
|
-
|----------|----------|
|
|
81
|
-
| Environment / secrets | `.env*`, `credentials.json`, `secret.*`, `secrets.*`, `.netrc`, `service-account*.json` |
|
|
82
|
-
| Source maps | `*.js.map`, `*.css.map`, `*.map` — [can expose full source code](https://arstechnica.com/ai/2026/03/entire-claude-code-cli-source-code-leaks-thanks-to-exposed-map-file/) |
|
|
83
|
-
| Private keys / certs | `*.pem`, `*.key`, `*.p12`, `*.pfx`, `*.keystore`, `*.jks` |
|
|
84
|
-
| SSH keys | `id_rsa`, `id_ed25519`, `id_ecdsa`, `id_dsa`, `.ssh/*` |
|
|
85
|
-
| Auth files | `.htpasswd` |
|
|
86
|
-
|
|
87
|
-
| Category | Patterns |
|
|
88
|
-
|----------|----------|
|
|
89
|
-
| Generic secrets | `API_KEY`, `SECRET_KEY`, `ACCESS_TOKEN`, `AUTH_TOKEN`, `PRIVATE_KEY`, `PASSWORD`, `DB_PASSWORD`, `DATABASE_URL`, `CLIENT_SECRET`, `CREDENTIALS` |
|
|
90
|
-
| Service-specific | `AWS_SECRET`, `GH_TOKEN`, `NPM_TOKEN`, `SLACK_TOKEN`, `STRIPE_SECRET`, `SENDGRID_KEY`, `TWILIO_AUTH` |
|
|
91
|
-
| Token patterns | `Bearer <20+ chars>`, `sk-<20+ chars>`, `ghp_<20+ chars>`, `AKIA<12+ chars>` |
|
|
92
|
-
|
|
93
|
-
## Configuration
|
|
94
|
-
|
|
95
|
-
All VSCodium / VS Code settings are prefixed with `opencodecommit.`. Key settings:
|
|
96
|
-
|
|
97
|
-
| Setting | Default | Description |
|
|
98
|
-
|---------|---------|-------------|
|
|
99
|
-
| `backendOrder` | `["codex","opencode","claude","gemini"]` | Backend fallback order |
|
|
100
|
-
| `commitMode` | `adaptive` | `adaptive`, `adaptive-oneliner`, `conventional`, `conventional-oneliner` |
|
|
101
|
-
| `branchMode` | `conventional` | `conventional` or `adaptive` (matches existing branch names) |
|
|
102
|
-
| `diffSource` | `auto` | `auto`, `staged`, or `all` |
|
|
103
|
-
| `languages` | English, Suomi | Array of language configs with custom prompt modules |
|
|
104
|
-
| `commitTemplate` | `{{type}}: {{message}}` | Supports `{{type}}`, `{{emoji}}`, `{{message}}` |
|
|
105
|
-
|
|
106
|
-
CLI config: `~/.config/opencodecommit/config.toml` (TOML with the same fields in kebab-case).
|
|
107
|
-
|
|
108
|
-
## Languages
|
|
109
|
-
|
|
110
|
-
Built-in: **English** (default), **Suomi** (Finnish), **Custom (example)** (template for your own).
|
|
111
|
-
|
|
112
|
-
Each language defines full prompt modules (base, adaptive, conventional, length, sensitive note). Missing modules fall back to English. CLI: `--language Suomi`. Extension: dropdown menu or `opencodecommit.activeLanguage` setting.
|
|
113
|
-
|
|
114
|
-
Add custom languages in config — only `label` and `instruction` are required:
|
|
115
|
-
|
|
116
|
-
```toml
|
|
117
|
-
[[languages]]
|
|
118
|
-
label = "Deutsch"
|
|
119
|
-
instruction = "Schreibe die Commit-Nachricht auf Deutsch."
|
|
8
|
+
npm i -g opencodecommit
|
|
120
9
|
```
|
|
121
10
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
11
|
+
The primary package provides:
|
|
12
|
+
- the `occ` CLI
|
|
13
|
+
- the TUI
|
|
14
|
+
- commit, branch, PR, and changelog generation
|
|
15
|
+
- local sensitive-content scanning and git guard support
|
|
16
|
+
|
|
17
|
+
Links:
|
|
18
|
+
- [Primary npm package](https://www.npmjs.com/package/opencodecommit)
|
|
19
|
+
- [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=Nevaberry.opencodecommit)
|
|
20
|
+
- [Open VSX](https://open-vsx.org/extension/Nevaberry/opencodecommit)
|
|
21
|
+
- [crates.io](https://crates.io/crates/opencodecommit)
|
|
22
|
+
- [GitHub](https://github.com/Nevaberry/opencodecommit)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nevaberry/opencodecommit",
|
|
3
|
-
"version": "1.2
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "Scoped alias for opencodecommit — install opencodecommit instead",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -15,9 +15,6 @@
|
|
|
15
15
|
"bin",
|
|
16
16
|
"index.js"
|
|
17
17
|
],
|
|
18
|
-
"scripts": {
|
|
19
|
-
"prepack": "cp ../../README.md . 2>/dev/null || true"
|
|
20
|
-
},
|
|
21
18
|
"keywords": [
|
|
22
19
|
"git",
|
|
23
20
|
"commit",
|
|
@@ -31,6 +28,6 @@
|
|
|
31
28
|
"node": ">=18"
|
|
32
29
|
},
|
|
33
30
|
"dependencies": {
|
|
34
|
-
"opencodecommit": "1.2
|
|
31
|
+
"opencodecommit": "1.3.2"
|
|
35
32
|
}
|
|
36
33
|
}
|