opencodecommit 1.7.0 → 1.9.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 +92 -113
- package/package.json +1 -1
- 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/README.md
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
# OpenCodeCommit
|
|
2
2
|
|
|
3
|
-
AI commit
|
|
3
|
+
AI commit messages should not require copy-pasting diffs into chat windows, leaking secrets by accident, or fighting a different tool for every backend.
|
|
4
4
|
|
|
5
|
-
OpenCodeCommit
|
|
6
|
-
- a VS Code / VSCodium extension
|
|
7
|
-
- a Rust / npm CLI (`occ`)
|
|
8
|
-
- a terminal TUI (`occ tui`)
|
|
9
|
-
- a standalone CI/CD scanner in cloud (`occ scan`)
|
|
5
|
+
OpenCodeCommit gives you one local workflow for commit messages, branch names, pull request drafts, changelog entries, and CI secret scanning. It runs in VS Code / VSCodium, as the `occ` CLI, as a terminal TUI, and as a GitHub Action.
|
|
10
6
|
|
|
11
|
-
Before
|
|
7
|
+
Before a prompt is sent to any AI backend, OpenCodeCommit scans the diff locally for secrets, credential files, private keys, source maps, and other sensitive artifacts.
|
|
12
8
|
|
|
13
9
|
- <a href="https://open-vsx.org/extension/Nevaberry/opencodecommit"><img src="https://raw.githubusercontent.com/Nevaberry/opencodecommit/HEAD/.github/icons/openvsx.png" width="14"> Open VSX</a>
|
|
14
10
|
- <a href="https://marketplace.visualstudio.com/items?itemName=Nevaberry.opencodecommit"><img src="https://raw.githubusercontent.com/Nevaberry/opencodecommit/HEAD/.github/icons/vscode.png" width="14"> VS Code Marketplace</a>
|
|
@@ -16,138 +12,121 @@ Before any prompt leaves your machine, OpenCodeCommit scans the diff locally for
|
|
|
16
12
|
- <a href="https://crates.io/crates/opencodecommit"><img src="https://raw.githubusercontent.com/Nevaberry/opencodecommit/HEAD/.github/icons/crates.png" width="14"> crates.io</a>
|
|
17
13
|
- <a href="https://github.com/Nevaberry/opencodecommit"><img src="https://raw.githubusercontent.com/Nevaberry/opencodecommit/HEAD/.github/icons/github.png" width="14"> GitHub</a>
|
|
18
14
|
|
|
15
|
+
## Why It Exists
|
|
16
|
+
|
|
17
|
+
Good commit history is useful only if writing it is cheap enough to do every time.
|
|
18
|
+
|
|
19
|
+
OpenCodeCommit is for teams and solo developers who want:
|
|
20
|
+
- specific commit messages that match the repository's recent style
|
|
21
|
+
- PR drafts and changelog entries without another browser round trip
|
|
22
|
+
- local-first safety checks before any diff reaches an AI provider
|
|
23
|
+
- one config shared by the extension, CLI, TUI, and CI scanner
|
|
24
|
+
- fallback across Codex, OpenCode, Claude, Gemini, hosted APIs, and local OpenAI-compatible endpoints
|
|
25
|
+
|
|
19
26
|
## Install
|
|
20
27
|
|
|
21
28
|
Extension:
|
|
22
|
-
- Search for `OpenCodeCommit` in VS Code or VSCodium
|
|
29
|
+
- Search for `OpenCodeCommit` in VS Code or VSCodium
|
|
23
30
|
|
|
24
31
|
CLI:
|
|
25
|
-
|
|
26
|
-
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
cargo install opencodecommit
|
|
35
|
+
# or
|
|
36
|
+
npm i -g opencodecommit
|
|
37
|
+
```
|
|
27
38
|
|
|
28
39
|
Optional CLI backends:
|
|
29
|
-
- `npm i -g @openai/codex`
|
|
30
|
-
- `npm i -g opencode`
|
|
31
|
-
- `npm i -g @anthropic-ai/claude-code`
|
|
32
|
-
- `npm i -g @google/gemini-cli`
|
|
33
|
-
|
|
34
|
-
Direct API backends:
|
|
35
|
-
- OpenAI
|
|
36
|
-
- Anthropic
|
|
37
|
-
- Google Gemini
|
|
38
|
-
- OpenRouter
|
|
39
|
-
- OpenCode Zen
|
|
40
|
-
- Ollama
|
|
41
|
-
- LM Studio
|
|
42
|
-
- Custom OpenAI-compatible endpoints
|
|
43
|
-
|
|
44
|
-
Hosted API backends use API keys from environment variables. Ollama and LM Studio can auto-detect the lexicographically first available model when their `model` field is left empty.
|
|
45
|
-
|
|
46
|
-
## Highlights
|
|
47
|
-
|
|
48
|
-
- Mixed fallback chains across CLI and API backends from the same `backend` / `backend-order` config.
|
|
49
|
-
- Commit, PR, branch, and changelog generation from the CLI, TUI, and extension with the same config surface.
|
|
50
|
-
- `occ scan` for CI/CD with `text`, `json`, `sarif`, and `github-annotations` output modes.
|
|
51
|
-
- Built-in languages: English, Finnish, Japanese, Chinese, Spanish, Portuguese, French, Korean, Russian, Vietnamese, and German.
|
|
52
|
-
- Terminal TUI with one-shot backend picks and a file sidebar that stages or unstages the selected file with `Space`.
|
|
53
|
-
- Transparent git guard for normal `git commit` flows.
|
|
54
|
-
|
|
55
|
-
## Quick Start
|
|
56
40
|
|
|
57
|
-
|
|
41
|
+
```bash
|
|
42
|
+
npm i -g @openai/codex
|
|
43
|
+
npm i -g opencode
|
|
44
|
+
npm i -g @anthropic-ai/claude-code
|
|
45
|
+
npm i -g @google/gemini-cli
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Direct API backends are also supported for OpenAI, Anthropic, Google Gemini, OpenRouter, OpenCode Zen, Ollama, LM Studio, and custom OpenAI-compatible endpoints.
|
|
49
|
+
|
|
50
|
+
## Use It
|
|
51
|
+
|
|
52
|
+
VS Code / VSCodium:
|
|
58
53
|
1. Open Source Control.
|
|
59
54
|
2. Click the sparkle action.
|
|
60
|
-
3. Use the
|
|
55
|
+
3. Use the `occ` menu for refine, branch, PR, language, backend, config, and diagnose actions.
|
|
61
56
|
|
|
62
|
-
|
|
57
|
+
Terminal:
|
|
63
58
|
|
|
64
59
|
```bash
|
|
65
60
|
occ tui
|
|
66
61
|
occ commit
|
|
67
|
-
occ commit --backend
|
|
68
|
-
occ commit --backend gemini --dry-run --text
|
|
62
|
+
occ commit --backend codex --dry-run --text
|
|
69
63
|
occ branch --dry-run
|
|
70
64
|
occ pr --backend openrouter-api --text
|
|
71
65
|
occ changelog --text
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
CI and local scanning:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
72
71
|
occ scan --format text
|
|
73
72
|
occ scan --format sarif --output occ-scan.sarif
|
|
74
|
-
occ guard install
|
|
75
|
-
occ
|
|
73
|
+
occ guard install
|
|
74
|
+
occ git commit -m "manual draft"
|
|
75
|
+
occ evidence install --profile samd
|
|
76
|
+
occ evidence snapshot
|
|
76
77
|
```
|
|
77
78
|
|
|
78
|
-
##
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
-
|
|
82
|
-
-
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
- `diff-source`
|
|
113
|
-
- `active-language`
|
|
114
|
-
- `commit-template`
|
|
115
|
-
- `sensitive.enforcement`
|
|
116
|
-
- `sensitive.allowlist`
|
|
117
|
-
- `api.openai`
|
|
118
|
-
- `api.anthropic`
|
|
119
|
-
- `api.gemini`
|
|
120
|
-
- `api.openrouter`
|
|
121
|
-
- `api.opencode`
|
|
122
|
-
- `api.ollama`
|
|
123
|
-
- `api.lm-studio`
|
|
124
|
-
- `api.custom`
|
|
125
|
-
|
|
126
|
-
Example:
|
|
127
|
-
|
|
128
|
-
```toml
|
|
129
|
-
backend = "openai-api"
|
|
130
|
-
backend-order = ["claude", "openai-api", "ollama-api"]
|
|
131
|
-
|
|
132
|
-
[api.openai]
|
|
133
|
-
model = "gpt-5.4-mini"
|
|
134
|
-
endpoint = "https://api.openai.com/v1/chat/completions"
|
|
135
|
-
key-env = "OPENAI_API_KEY"
|
|
136
|
-
pr-model = "gpt-5.4"
|
|
137
|
-
cheap-model = "gpt-5.4-mini"
|
|
138
|
-
|
|
139
|
-
[api.ollama]
|
|
140
|
-
model = ""
|
|
141
|
-
endpoint = "http://localhost:11434"
|
|
142
|
-
key-env = ""
|
|
143
|
-
```
|
|
79
|
+
## What You Get
|
|
80
|
+
|
|
81
|
+
- Commit generation that can adapt to recent commit style or force conventional commits.
|
|
82
|
+
- Branch names, PR drafts, and changelog entries from the same context pipeline.
|
|
83
|
+
- A terminal TUI with backend picks, diff view, output panels, and file staging.
|
|
84
|
+
- Local sensitive-content scanning with `warn`, `block-*`, and `strict-*` enforcement modes.
|
|
85
|
+
- A repo-local Git guard that routes raw `git commit` messages through OCC using `prepare-commit-msg`.
|
|
86
|
+
- Optional repo-local evidence sidecars for `samd` and all-in `defence` profiles, referenced by compact `OCC-Evidence` trailers.
|
|
87
|
+
- CI output as text, JSON, SARIF, or GitHub annotations.
|
|
88
|
+
- Built-in language templates for English, Finnish, Japanese, Chinese, Spanish, Portuguese, French, Korean, Russian, Vietnamese, and German.
|
|
89
|
+
|
|
90
|
+
## Privacy And Security
|
|
91
|
+
|
|
92
|
+
OpenCodeCommit has no hosted service and no telemetry. Diffs and file context are processed locally first, then sent only to the backend you configure.
|
|
93
|
+
|
|
94
|
+
The scanner can block provider tokens, webhooks, credential-bearing connection strings, `.env*` files, key stores, private keys, source maps, and other high-risk artifacts before generation runs.
|
|
95
|
+
|
|
96
|
+
See [SECURITY.md](SECURITY.md) for vulnerability reporting and data-flow details.
|
|
97
|
+
|
|
98
|
+
## Configuration
|
|
99
|
+
|
|
100
|
+
`~/.config/opencodecommit/config.toml` is the shared config for the CLI, TUI, and extension. The extension syncs VS Code / VSCodium settings with that file.
|
|
101
|
+
|
|
102
|
+
Override the path with `OPENCODECOMMIT_CONFIG`.
|
|
103
|
+
|
|
104
|
+
Start here:
|
|
105
|
+
- [Backends](docs/backends.md)
|
|
106
|
+
- [Configuration](docs/config.md)
|
|
107
|
+
- [CI scanning](docs/ci-scan.md)
|
|
108
|
+
- [VS Code and VSCodium](docs/vscode-vscodium.md)
|
|
109
|
+
- [Sensitive scanning flow](docs/sensitive-scanning.md)
|
|
110
|
+
- [Process flow](docs/process-flow.md)
|
|
111
|
+
- [Architecture](docs/architecture.md)
|
|
112
|
+
- [Roadmap](docs/roadmap.md)
|
|
144
113
|
|
|
145
114
|
## CI/CD
|
|
146
115
|
|
|
147
|
-
|
|
148
|
-
|
|
116
|
+
Use the bundled GitHub Action:
|
|
117
|
+
|
|
118
|
+
```yaml
|
|
119
|
+
- uses: Nevaberry/opencodecommit@v1
|
|
120
|
+
with:
|
|
121
|
+
enforcement: block-high
|
|
122
|
+
upload-sarif: true
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Examples are available for [GitHub Actions](examples/ci/github-actions.yml), [Azure Pipelines](examples/ci/azure-pipelines.yml), and [GitLab CI](examples/ci/gitlab-ci.yml).
|
|
126
|
+
|
|
127
|
+
## Contributing
|
|
149
128
|
|
|
150
|
-
|
|
129
|
+
OpenCodeCommit intentionally tests against both deterministic unit paths and real AI backends. See [CONTRIBUTING.md](CONTRIBUTING.md) for setup, verification, and live E2E commands.
|
|
151
130
|
|
|
152
131
|
## License
|
|
153
132
|
|
package/package.json
CHANGED
|
Binary file
|
package/platforms/darwin-x64/occ
CHANGED
|
Binary file
|
|
Binary file
|
package/platforms/linux-x64/occ
CHANGED
|
Binary file
|
|
Binary file
|