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 +65 -95
- 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,123 +1,93 @@
|
|
|
1
1
|
# OpenCodeCommit
|
|
2
2
|
|
|
3
|
-
AI commit
|
|
3
|
+
AI commit, branch, PR, and changelog generation through terminal AI CLIs.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
OpenCodeCommit works as:
|
|
6
|
+
- a Rust / npm CLI (`occ`)
|
|
7
|
+
- a terminal TUI
|
|
8
|
+
- a VS Code / VSCodium extension
|
|
6
9
|
|
|
7
|
-
|
|
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)
|
|
10
|
+
Before any prompt leaves your machine, OpenCodeCommit scans the diff locally for secrets, credential files, source maps, private keys, and other sensitive artifacts.
|
|
9
11
|
|
|
10
|
-
|
|
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
|
|
12
|
+
[Open VSX](https://open-vsx.org/extension/Nevaberry/opencodecommit) · [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=Nevaberry.opencodecommit) · [npm](https://www.npmjs.com/package/opencodecommit) · [scoped npm alias](https://www.npmjs.com/package/@nevaberry/opencodecommit) · [crates.io](https://crates.io/crates/opencodecommit) · [GitHub](https://github.com/Nevaberry/opencodecommit)
|
|
26
13
|
|
|
27
|
-
|
|
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.
|
|
14
|
+
## Install
|
|
53
15
|
|
|
54
|
-
|
|
16
|
+
Extension:
|
|
17
|
+
- Search for `OpenCodeCommit` in VS Code or VSCodium
|
|
18
|
+
- Or run `ext install Nevaberry.opencodecommit`
|
|
55
19
|
|
|
56
|
-
|
|
20
|
+
CLI:
|
|
21
|
+
- `cargo install opencodecommit`
|
|
22
|
+
- `npm i -g opencodecommit`
|
|
57
23
|
|
|
58
|
-
|
|
24
|
+
Backends:
|
|
25
|
+
- `npm i -g @openai/codex`
|
|
26
|
+
- `npm i -g opencode`
|
|
27
|
+
- `npm i -g @anthropic-ai/claude-code`
|
|
28
|
+
- `npm i -g @google/gemini-cli`
|
|
59
29
|
|
|
60
|
-
|
|
61
|
-
occ guard install --global # install a machine-wide commit guard
|
|
62
|
-
occ guard uninstall --global # remove the machine-wide guard
|
|
63
|
-
```
|
|
30
|
+
## Highlights
|
|
64
31
|
|
|
65
|
-
|
|
32
|
+
- Backend fallback across Codex, OpenCode, Claude Code, and Gemini, plus one-shot backend picks in the TUI and extension.
|
|
33
|
+
- Commit, PR, branch, and changelog generation from the same config surface.
|
|
34
|
+
- Built-in languages: English, Finnish, Japanese, Chinese, Spanish, Portuguese, French, Korean, Russian, Vietnamese, and German.
|
|
35
|
+
- Terminal TUI with a file sidebar that merges staged, unstaged, and untracked files and lets you stage or unstage the selected file with `Space`.
|
|
36
|
+
- Transparent git guard for normal `git commit` flows.
|
|
66
37
|
|
|
67
|
-
##
|
|
38
|
+
## Quick Start
|
|
68
39
|
|
|
69
|
-
|
|
40
|
+
Extension:
|
|
41
|
+
1. Open Source Control.
|
|
42
|
+
2. Click the sparkle action.
|
|
43
|
+
3. Use the dropdown for refine, branch, PR, language, backend, or diagnose actions.
|
|
70
44
|
|
|
71
|
-
|
|
45
|
+
CLI:
|
|
72
46
|
|
|
73
47
|
```bash
|
|
74
|
-
|
|
48
|
+
occ tui
|
|
49
|
+
occ commit
|
|
50
|
+
occ commit --backend gemini --dry-run --text
|
|
51
|
+
occ commit --language Japanese
|
|
52
|
+
occ branch --dry-run
|
|
53
|
+
occ pr --text
|
|
54
|
+
occ changelog --text
|
|
55
|
+
occ guard install --global
|
|
56
|
+
occ update
|
|
75
57
|
```
|
|
76
58
|
|
|
77
|
-
|
|
59
|
+
## Security Scanner
|
|
78
60
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
| SSH keys | `id_rsa`, `id_ed25519`, `id_ecdsa`, `id_dsa`, `.ssh/*` |
|
|
85
|
-
| Auth files | `.htpasswd` |
|
|
61
|
+
The local scanner now checks for:
|
|
62
|
+
- provider tokens and webhook URLs for OpenAI, Anthropic, GitHub, GitLab, AWS, Slack, Stripe, SendGrid, npm, PyPI, Docker, Vault, Discord, Teams, and more
|
|
63
|
+
- bearer tokens, JWTs, Docker auth blobs, kube auth fields, and credential-bearing connection strings
|
|
64
|
+
- `.env*`, `.npmrc`, `.git-credentials`, `.kube/config`, Terraform state and vars, service-account JSON, key stores, SSH keys, and private key material
|
|
65
|
+
- exposed source maps such as `*.js.map` and `*.css.map`
|
|
86
66
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
67
|
+
Enforcement modes:
|
|
68
|
+
- `warn`
|
|
69
|
+
- `block-high`
|
|
70
|
+
- `block-all`
|
|
71
|
+
- `strict-high`
|
|
72
|
+
- `strict-all`
|
|
92
73
|
|
|
93
|
-
|
|
74
|
+
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.
|
|
94
75
|
|
|
95
|
-
|
|
76
|
+
## Config
|
|
96
77
|
|
|
97
|
-
|
|
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}}` |
|
|
78
|
+
VS Code / VSCodium settings live under `opencodecommit.*`.
|
|
105
79
|
|
|
106
|
-
CLI config
|
|
80
|
+
CLI config lives at `~/.config/opencodecommit/config.toml`.
|
|
81
|
+
On first CLI use, OpenCodeCommit writes the full default config there so the available settings are visible in one file.
|
|
107
82
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
```toml
|
|
117
|
-
[[languages]]
|
|
118
|
-
label = "Deutsch"
|
|
119
|
-
instruction = "Schreibe die Commit-Nachricht auf Deutsch."
|
|
120
|
-
```
|
|
83
|
+
Useful settings:
|
|
84
|
+
- `backendOrder`
|
|
85
|
+
- `commitMode`
|
|
86
|
+
- `branchMode`
|
|
87
|
+
- `diffSource`
|
|
88
|
+
- `activeLanguage`
|
|
89
|
+
- `sensitive.enforcement`
|
|
90
|
+
- `sensitive.allowlist`
|
|
121
91
|
|
|
122
92
|
## License
|
|
123
93
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencodecommit",
|
|
3
|
-
"version": "1.2
|
|
3
|
+
"version": "1.3.2",
|
|
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
|
+
}
|