opencodecommit 1.3.1 → 1.4.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/README.md +66 -133
- package/package.json +3 -2
- package/platforms/darwin-arm64/occ +0 -0
- package/platforms/darwin-x64/occ +0 -0
- package/platforms/linux-arm64/occ +0 -0
- package/platforms/linux-x64/occ +0 -0
- package/platforms/win32-x64/occ.exe +0 -0
- package/scripts/sync-readme.js +29 -0
package/README.md
CHANGED
|
@@ -1,163 +1,96 @@
|
|
|
1
1
|
# OpenCodeCommit
|
|
2
2
|
|
|
3
|
-
AI commit
|
|
4
|
-
asdf
|
|
3
|
+
AI commit, branch, PR, and changelog generation through terminal AI CLIs.
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
OpenCodeCommit works as:
|
|
6
|
+
- a Rust / npm CLI (`occ`)
|
|
7
|
+
- a terminal TUI (`occ tui`)
|
|
8
|
+
- a VS Code / VSCodium extension
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
Before any prompt leaves your machine, OpenCodeCommit scans the diff locally for secrets, credential files, source maps, private keys, and other sensitive artifacts.
|
|
11
|
+
|
|
12
|
+
- <a href="https://open-vsx.org/extension/Nevaberry/opencodecommit"><img src="https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/vscodium/vscodium-original.svg" width="14"> Open VSX</a>
|
|
13
|
+
- <a href="https://marketplace.visualstudio.com/items?itemName=Nevaberry.opencodecommit"><img src="https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/vscode/vscode-original.svg" width="14"> VS Code Marketplace</a>
|
|
14
|
+
- <a href="https://www.npmjs.com/package/opencodecommit"><img src="https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/npm/npm-original-wordmark.svg" width="14"> npm</a>
|
|
15
|
+
- <a href="https://crates.io/crates/opencodecommit"><img src="https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/rust/rust-original.svg" width="14"> crates.io</a>
|
|
16
|
+
- <a href="https://github.com/Nevaberry/opencodecommit"><img src="https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/github/github-original.svg" width="14"> GitHub</a>
|
|
10
17
|
|
|
11
18
|
## Install
|
|
12
19
|
|
|
13
|
-
|
|
20
|
+
Extension:
|
|
21
|
+
- Search for `OpenCodeCommit` in VS Code or VSCodium marketplace
|
|
14
22
|
|
|
15
|
-
|
|
23
|
+
CLI:
|
|
24
|
+
- `cargo install opencodecommit`
|
|
25
|
+
- `npm i -g opencodecommit`
|
|
16
26
|
|
|
17
|
-
|
|
27
|
+
Backends:
|
|
28
|
+
- `npm i -g @openai/codex`
|
|
29
|
+
- `npm i -g opencode`
|
|
30
|
+
- `npm i -g @anthropic-ai/claude-code`
|
|
31
|
+
- `npm i -g @google/gemini-cli`
|
|
18
32
|
|
|
19
|
-
|
|
20
|
-
|---------|---------|
|
|
21
|
-
| [Codex CLI](https://github.com/openai/codex) | `npm i -g @openai/codex` |
|
|
22
|
-
| [OpenCode](https://github.com/nicepkg/opencode) | `npm i -g opencode` |
|
|
23
|
-
| [Gemini CLI](https://github.com/google-gemini/gemini-cli) | `npm i -g @google/gemini-cli` |
|
|
24
|
-
| [Claude Code](https://docs.anthropic.com/en/docs/claude-code) | `npm i -g @anthropic-ai/claude-code` |
|
|
33
|
+
## Highlights
|
|
25
34
|
|
|
26
|
-
|
|
35
|
+
- Backend fallback across Codex, OpenCode, Claude Code, and Gemini, plus one-shot backend picks in the TUI and extension.
|
|
36
|
+
- Commit, PR, branch, and changelog generation from the same config surface.
|
|
37
|
+
- Built-in languages: English, Finnish, Japanese, Chinese, Spanish, Portuguese, French, Korean, Russian, Vietnamese, and German.
|
|
38
|
+
- Terminal TUI with a file sidebar that merges staged, unstaged, and untracked files and lets you stage or unstage the selected file with `Space`.
|
|
39
|
+
- Transparent git guard for normal `git commit` flows.
|
|
27
40
|
|
|
28
|
-
|
|
29
|
-
2. Click the **sparkle button** in Source Control
|
|
30
|
-
3. Commit message appears in the input box
|
|
41
|
+
## Quick Start
|
|
31
42
|
|
|
32
|
-
|
|
33
|
-
|
|
43
|
+
Extension:
|
|
44
|
+
1. Open Source Control.
|
|
45
|
+
2. Click the sparkle action.
|
|
46
|
+
3. Use the dropdown for refine, branch, PR, language, backend, or diagnose actions.
|
|
34
47
|
|
|
35
|
-
|
|
48
|
+
CLI:
|
|
36
49
|
|
|
37
50
|
```bash
|
|
38
|
-
occ tui
|
|
39
|
-
occ commit
|
|
40
|
-
occ commit --dry-run # preview only, don't commit
|
|
51
|
+
occ tui
|
|
52
|
+
occ commit
|
|
41
53
|
occ commit --backend gemini --dry-run --text
|
|
42
|
-
occ commit --language
|
|
43
|
-
occ
|
|
44
|
-
occ
|
|
45
|
-
occ
|
|
46
|
-
occ guard
|
|
47
|
-
occ
|
|
48
|
-
occ branch --mode adaptive # match existing branch naming style
|
|
49
|
-
occ pr # generate PR title + body
|
|
50
|
-
occ pr --backend gemini --text
|
|
51
|
-
occ changelog # generate changelog entry
|
|
52
|
-
|
|
53
|
-
# JSON output (default), or --text for human readable plain text
|
|
54
|
-
occ commit --text
|
|
55
|
-
occ commit --allow-sensitive # bypass blocking findings in non-strict modes
|
|
54
|
+
occ commit --language Japanese
|
|
55
|
+
occ branch --dry-run
|
|
56
|
+
occ pr --text
|
|
57
|
+
occ changelog --text
|
|
58
|
+
occ guard install --global
|
|
59
|
+
occ update
|
|
56
60
|
```
|
|
57
61
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
`occ` is the short form. `opencodecommit` also works if `occ` clashes with something on your system.
|
|
61
|
-
|
|
62
|
-
Exit codes: 0 success, 1 no changes, 2 backend error, 3 config error, 5 sensitive content detected
|
|
63
|
-
|
|
64
|
-
## Transparent Git Guard
|
|
65
|
-
|
|
66
|
-
Use OpenCodeCommit as a background safety layer for normal `git commit` usage:
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
|
-
occ guard install --global # install a machine-wide commit guard
|
|
70
|
-
occ guard uninstall --global # remove the machine-wide guard
|
|
71
|
-
occ guard profile human # warn by default, tuned for humans
|
|
72
|
-
occ guard profile strict-agent # strict-all, no bypass
|
|
73
|
-
```
|
|
62
|
+
## Security Scanner
|
|
74
63
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
- `confirmed-secret`: real provider tokens, private keys, credential-bearing URLs, webhook secrets
|
|
82
|
-
- `sensitive-artifact`: `.env`, kubeconfig, Terraform state, credential stores, key containers
|
|
83
|
-
- `suspicious`: generic assignments, local connection strings, public IPv4s, source maps, docs/examples with weaker evidence
|
|
64
|
+
The local scanner now checks for:
|
|
65
|
+
- provider tokens and webhook URLs for OpenAI, Anthropic, GitHub, GitLab, AWS, Slack, Stripe, SendGrid, npm, PyPI, Docker, Vault, Discord, Teams, and more
|
|
66
|
+
- bearer tokens, JWTs, Docker auth blobs, kube auth fields, and credential-bearing connection strings
|
|
67
|
+
- `.env*`, `.npmrc`, `.git-credentials`, `.kube/config`, Terraform state and vars, service-account JSON, key stores, SSH keys, and private key material
|
|
68
|
+
- exposed source maps such as `*.js.map` and `*.css.map`
|
|
84
69
|
|
|
85
70
|
Enforcement modes:
|
|
71
|
+
- `warn`
|
|
72
|
+
- `block-high`
|
|
73
|
+
- `block-all`
|
|
74
|
+
- `strict-high`
|
|
75
|
+
- `strict-all`
|
|
86
76
|
|
|
87
|
-
|
|
88
|
-
- `block-high`: block only high-confidence findings, allow a one-shot bypass.
|
|
89
|
-
- `block-all`: block all findings, allow a one-shot bypass.
|
|
90
|
-
- `strict-high`: block high-confidence findings, ignore bypass flags.
|
|
91
|
-
- `strict-all`: block all findings, ignore bypass flags.
|
|
92
|
-
|
|
93
|
-
`occ commit` exits with code `5` for blocking findings. In `warn` mode, text-mode `occ commit` prints the report and continues automatically. The global guard warns and returns success in `warn` mode, blocks in `block-*`, and blocks without bypass in `strict-*`.
|
|
94
|
-
|
|
95
|
-
Reports include the file, line number when available, rule, tier, and a redacted snippet preview. If a non-strict guard block is an intentional false positive, bypass only OpenCodeCommit for that one command:
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
OCC_ALLOW_SENSITIVE=1 git commit ...
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
Strict modes ignore `OCC_ALLOW_SENSITIVE=1` and `--allow-sensitive`.
|
|
102
|
-
|
|
103
|
-
**Flagged file names:**
|
|
104
|
-
|
|
105
|
-
| Category | Patterns |
|
|
106
|
-
|----------|----------|
|
|
107
|
-
| Environment / secrets | `.env*`, `credentials.json`, `secret.*`, `secrets.*`, `.netrc`, `service-account*.json` |
|
|
108
|
-
| 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/) |
|
|
109
|
-
| Private keys / certs | `*.pem`, `*.key`, `*.p12`, `*.pfx`, `*.keystore`, `*.jks` |
|
|
110
|
-
| SSH keys | `id_rsa`, `id_ed25519`, `id_ecdsa`, `id_dsa`, `.ssh/*` |
|
|
111
|
-
| Auth files | `.htpasswd` |
|
|
112
|
-
|
|
113
|
-
| Category | Patterns |
|
|
114
|
-
|----------|----------|
|
|
115
|
-
| Generic secrets | assignment-based heuristics for `PASSWORD`, `SECRET_KEY`, `ACCESS_TOKEN`, `DB_PASSWORD`, `DATABASE_URL`, `CLIENT_SECRET`, `CREDENTIALS` |
|
|
116
|
-
| Service-specific | OpenAI, GitHub, AWS, Slack, Stripe, SendGrid, npm, PyPI, Docker, Vault, Discord, Teams |
|
|
117
|
-
| Structural patterns | `Bearer <token>`, JWTs, private key PEM headers, Docker auth blobs, kube auth fields, credential-bearing connection strings |
|
|
118
|
-
|
|
119
|
-
## Configuration
|
|
120
|
-
|
|
121
|
-
All VSCodium / VS Code settings are prefixed with `opencodecommit.`. Key settings:
|
|
122
|
-
|
|
123
|
-
| Setting | Default | Description |
|
|
124
|
-
|---------|---------|-------------|
|
|
125
|
-
| `backendOrder` | `["codex","opencode","claude","gemini"]` | Backend fallback order |
|
|
126
|
-
| `commitMode` | `adaptive` | `adaptive`, `adaptive-oneliner`, `conventional`, `conventional-oneliner` |
|
|
127
|
-
| `branchMode` | `conventional` | `conventional` or `adaptive` (matches existing branch names) |
|
|
128
|
-
| `diffSource` | `auto` | `auto`, `staged`, or `all` |
|
|
129
|
-
| `languages` | English, Finnish, Japanese, Chinese, Spanish, Portuguese, French, Korean, Russian, Vietnamese, German, Custom (example) | Array of language configs with custom prompt modules |
|
|
130
|
-
| `commitTemplate` | `{{type}}: {{message}}` | Supports `{{type}}`, `{{emoji}}`, `{{message}}` |
|
|
131
|
-
| `sensitive.enforcement` | `warn` | `warn`, `block-high`, `block-all`, `strict-high`, or `strict-all` |
|
|
132
|
-
| `sensitive.allowlist` | `[]` | Suppress findings by `pathRegex`, `rule`, and/or `valueRegex` with AND semantics |
|
|
77
|
+
Use `occ guard profile human` for warnings-first local use, or `occ guard profile strict-agent` when you want non-bypassable blocking behavior for autonomous tooling.
|
|
133
78
|
|
|
134
|
-
|
|
79
|
+
## Config
|
|
135
80
|
|
|
136
|
-
|
|
81
|
+
VS Code / VSCodium settings live under `opencodecommit.*`.
|
|
137
82
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
enforcement = "block-high"
|
|
83
|
+
CLI config lives at `~/.config/opencodecommit/config.toml`.
|
|
84
|
+
On first CLI use, OpenCodeCommit writes the full default config there so the available settings are visible in one file.
|
|
141
85
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
Built-in: **English** (default), **Finnish**, **Japanese**, **Chinese**, **Spanish**, **Portuguese**, **French**, **Korean**, **Russian**, **Vietnamese**, **German**, **Custom (example)** (template for your own).
|
|
151
|
-
|
|
152
|
-
Each language defines full prompt modules (base, adaptive, conventional, length, sensitive note). Missing modules fall back to English. CLI: `--language <built-in label>`. Extension: dropdown menu or `opencodecommit.activeLanguage` setting.
|
|
153
|
-
|
|
154
|
-
Add custom languages in config — only `label` and `instruction` are required:
|
|
155
|
-
|
|
156
|
-
```toml
|
|
157
|
-
[[languages]]
|
|
158
|
-
label = "Deutsch"
|
|
159
|
-
instruction = "Schreibe die Commit-Nachricht auf Deutsch."
|
|
160
|
-
```
|
|
86
|
+
Useful settings:
|
|
87
|
+
- `backendOrder`
|
|
88
|
+
- `commitMode`
|
|
89
|
+
- `branchMode`
|
|
90
|
+
- `diffSource`
|
|
91
|
+
- `activeLanguage`
|
|
92
|
+
- `sensitive.enforcement`
|
|
93
|
+
- `sensitive.allowlist`
|
|
161
94
|
|
|
162
95
|
## License
|
|
163
96
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencodecommit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "AI-powered git commit message generator that delegates to terminal AI agents",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
"index.js"
|
|
19
19
|
],
|
|
20
20
|
"scripts": {
|
|
21
|
-
"prepack": "
|
|
21
|
+
"prepack": "node scripts/sync-readme.js materialize",
|
|
22
|
+
"postpack": "node scripts/sync-readme.js relink",
|
|
22
23
|
"postinstall": "node scripts/postinstall.js"
|
|
23
24
|
},
|
|
24
25
|
"keywords": [
|
|
Binary file
|
package/platforms/darwin-x64/occ
CHANGED
|
Binary file
|
|
Binary file
|
package/platforms/linux-x64/occ
CHANGED
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require("fs")
|
|
4
|
+
const path = require("path")
|
|
5
|
+
|
|
6
|
+
const packageRoot = path.resolve(__dirname, "..")
|
|
7
|
+
const repoReadme = path.resolve(packageRoot, "..", "..", "README.md")
|
|
8
|
+
const packageReadme = path.join(packageRoot, "README.md")
|
|
9
|
+
const relativeTarget = "../../README.md"
|
|
10
|
+
const mode = process.argv[2]
|
|
11
|
+
|
|
12
|
+
function removeIfExists(target) {
|
|
13
|
+
try {
|
|
14
|
+
fs.rmSync(target, { force: true })
|
|
15
|
+
} catch (error) {
|
|
16
|
+
if (error && error.code !== "ENOENT") throw error
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (mode === "materialize") {
|
|
21
|
+
removeIfExists(packageReadme)
|
|
22
|
+
fs.copyFileSync(repoReadme, packageReadme)
|
|
23
|
+
} else if (mode === "relink") {
|
|
24
|
+
removeIfExists(packageReadme)
|
|
25
|
+
fs.symlinkSync(relativeTarget, packageReadme)
|
|
26
|
+
} else {
|
|
27
|
+
console.error("usage: node scripts/sync-readme.js <materialize|relink>")
|
|
28
|
+
process.exit(1)
|
|
29
|
+
}
|