opencodecommit 1.7.0 → 1.7.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 CHANGED
@@ -1,14 +1,10 @@
1
1
  # OpenCodeCommit
2
2
 
3
- AI commit, branch, PR, and changelog generation through terminal AI CLIs and direct provider APIs.
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 works as:
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 any prompt leaves your machine, OpenCodeCommit scans the diff locally for secrets, credential files, source maps, private keys, and other sensitive artifacts.
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,116 @@ 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 marketplace
29
+ - Search for `OpenCodeCommit` in VS Code or VSCodium
23
30
 
24
31
  CLI:
25
- - `cargo install opencodecommit`
26
- - `npm i -g opencodecommit`
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
- Extension:
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 dropdown for refine, branch, PR, language, backend, or diagnose actions.
55
+ 3. Use the `occ` menu for refine, branch, PR, language, backend, config, and diagnose actions.
61
56
 
62
- CLI:
57
+ Terminal:
63
58
 
64
59
  ```bash
65
60
  occ tui
66
61
  occ commit
67
- occ commit --backend openai-api --dry-run --text
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
73
  occ guard install --global
75
- occ update
76
74
  ```
77
75
 
78
- ## Security Scanner
79
-
80
- The local scanner checks for:
81
- - provider tokens and webhook URLs for OpenAI, Anthropic, GitHub, GitLab, AWS, Slack, Stripe, SendGrid, npm, PyPI, Docker, Vault, Discord, Teams, and more
82
- - bearer tokens, JWTs, Docker auth blobs, kube auth fields, and credential-bearing connection strings
83
- - `.env*`, `.npmrc`, `.git-credentials`, `.kube/config`, Terraform state and vars, service-account JSON, key stores, SSH keys, and private key material
84
- - exposed source maps such as `*.js.map` and `*.css.map`
85
-
86
- Enforcement modes:
87
- - `warn`
88
- - `block-high`
89
- - `block-all`
90
- - `strict-high`
91
- - `strict-all`
92
-
93
- `occ scan` reuses the same scanner outside the AI flow. It accepts git diff input, `--stdin`, or `--diff-file`, returns `0` when the selected enforcement allows the diff, and returns `2` when blocking findings remain.
94
-
95
- 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.
96
-
97
- See [SENSITIVE.md](SENSITIVE.md) for the full scanning flow and [PROCESS.md](PROCESS.md) for how it fits into generation and CI/CD.
98
-
99
- ## Config
100
-
101
- `~/.config/opencodecommit/config.toml` is the single source of truth for both CLI and extension.
102
- On first use, OpenCodeCommit writes the full default config there so every setting is visible in one file.
103
- VS Code / VSCodium settings under `opencodecommit.*` are synced bidirectionally with the file.
104
-
105
- Override the path with the `OPENCODECOMMIT_CONFIG` environment variable.
106
-
107
- Useful settings:
108
- - `backend`
109
- - `backend-order`
110
- - `commit-mode`
111
- - `branch-mode`
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
- ```
76
+ ## What You Get
77
+
78
+ - Commit generation that can adapt to recent commit style or force conventional commits.
79
+ - Branch names, PR drafts, and changelog entries from the same context pipeline.
80
+ - A terminal TUI with backend picks, diff view, output panels, and file staging.
81
+ - Local sensitive-content scanning with `warn`, `block-*`, and `strict-*` enforcement modes.
82
+ - CI output as text, JSON, SARIF, or GitHub annotations.
83
+ - Built-in language templates for English, Finnish, Japanese, Chinese, Spanish, Portuguese, French, Korean, Russian, Vietnamese, and German.
84
+
85
+ ## Privacy And Security
86
+
87
+ OpenCodeCommit has no hosted service and no telemetry. Diffs and file context are processed locally first, then sent only to the backend you configure.
88
+
89
+ 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.
90
+
91
+ See [SECURITY.md](SECURITY.md) for vulnerability reporting and data-flow details.
92
+
93
+ ## Configuration
94
+
95
+ `~/.config/opencodecommit/config.toml` is the shared config for the CLI, TUI, and extension. The extension syncs VS Code / VSCodium settings with that file.
96
+
97
+ Override the path with `OPENCODECOMMIT_CONFIG`.
98
+
99
+ Start here:
100
+ - [Backends](docs/backends.md)
101
+ - [Configuration](docs/config.md)
102
+ - [CI scanning](docs/ci-scan.md)
103
+ - [VS Code and VSCodium](docs/vscode-vscodium.md)
104
+ - [Sensitive scanning flow](docs/sensitive-scanning.md)
105
+ - [Process flow](docs/process-flow.md)
106
+ - [Architecture](docs/architecture.md)
107
+ - [Roadmap](docs/roadmap.md)
144
108
 
145
109
  ## CI/CD
146
110
 
147
- - GitHub Action: [`action.yml`](action.yml)
148
- - Examples: [`examples/ci/github-actions.yml`](examples/ci/github-actions.yml), [`examples/ci/azure-pipelines.yml`](examples/ci/azure-pipelines.yml), [`examples/ci/gitlab-ci.yml`](examples/ci/gitlab-ci.yml)
111
+ Use the bundled GitHub Action:
112
+
113
+ ```yaml
114
+ - uses: Nevaberry/opencodecommit@v1
115
+ with:
116
+ enforcement: block-high
117
+ upload-sarif: true
118
+ ```
119
+
120
+ 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).
121
+
122
+ ## Contributing
149
123
 
150
- The composite action installs the published `opencodecommit` package, runs `occ scan`, can upload SARIF to GitHub code scanning, emits GitHub annotations, and supports a workflow-level manual override that preserves reports without hiding findings.
124
+ 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
125
 
152
126
  ## License
153
127
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencodecommit",
3
- "version": "1.7.0",
3
+ "version": "1.7.2",
4
4
  "description": "AI commit, branch, PR, changelog, and CI scan tooling for CLI backends and direct provider APIs",
5
5
  "license": "MIT",
6
6
  "repository": {
Binary file
Binary file
Binary file
Binary file
Binary file