opencodecommit 1.4.1 → 1.5.1

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,19 +1,20 @@
1
1
  # OpenCodeCommit
2
2
 
3
- AI commit, branch, PR, and changelog generation through terminal AI CLIs.
3
+ AI commit, branch, PR, and changelog generation through terminal AI CLIs and direct provider APIs.
4
4
 
5
5
  OpenCodeCommit works as:
6
+ - a VS Code / VSCodium extension
6
7
  - a Rust / npm CLI (`occ`)
7
8
  - a terminal TUI (`occ tui`)
8
- - a VS Code / VSCodium extension
9
+ - a standalone CI/CD scanner in cloud (`occ scan`)
9
10
 
10
11
  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
 
12
- - <a href="https://open-vsx.org/extension/Nevaberry/opencodecommit"><img src=".github/icons/openvsx.png" width="14"> Open VSX</a>
13
- - <a href="https://marketplace.visualstudio.com/items?itemName=Nevaberry.opencodecommit"><img src=".github/icons/vscode.png" width="14"> VS Code Marketplace</a>
14
- - <a href="https://www.npmjs.com/package/opencodecommit"><img src=".github/icons/npm.png" width="14"> npm</a>
15
- - <a href="https://crates.io/crates/opencodecommit"><img src=".github/icons/crates.png" width="14"> crates.io</a>
16
- - <a href="https://github.com/Nevaberry/opencodecommit"><img src=".github/icons/github.png" width="14"> GitHub</a>
13
+ - <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
+ - <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>
15
+ - <a href="https://www.npmjs.com/package/opencodecommit"><img src="https://raw.githubusercontent.com/Nevaberry/opencodecommit/HEAD/.github/icons/npm.png" width="14"> npm</a>
16
+ - <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
+ - <a href="https://github.com/Nevaberry/opencodecommit"><img src="https://raw.githubusercontent.com/Nevaberry/opencodecommit/HEAD/.github/icons/github.png" width="14"> GitHub</a>
17
18
 
18
19
  ## Install
19
20
 
@@ -24,18 +25,31 @@ CLI:
24
25
  - `cargo install opencodecommit`
25
26
  - `npm i -g opencodecommit`
26
27
 
27
- Backends:
28
+ Optional CLI backends:
28
29
  - `npm i -g @openai/codex`
29
30
  - `npm i -g opencode`
30
31
  - `npm i -g @anthropic-ai/claude-code`
31
32
  - `npm i -g @google/gemini-cli`
32
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
+
33
46
  ## Highlights
34
47
 
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.
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.
37
51
  - 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`.
52
+ - Terminal TUI with one-shot backend picks and a file sidebar that stages or unstages the selected file with `Space`.
39
53
  - Transparent git guard for normal `git commit` flows.
40
54
 
41
55
  ## Quick Start
@@ -50,18 +64,20 @@ CLI:
50
64
  ```bash
51
65
  occ tui
52
66
  occ commit
67
+ occ commit --backend openai-api --dry-run --text
53
68
  occ commit --backend gemini --dry-run --text
54
- occ commit --language Japanese
55
69
  occ branch --dry-run
56
- occ pr --text
70
+ occ pr --backend openrouter-api --text
57
71
  occ changelog --text
72
+ occ scan --format text
73
+ occ scan --format sarif --output occ-scan.sarif
58
74
  occ guard install --global
59
75
  occ update
60
76
  ```
61
77
 
62
78
  ## Security Scanner
63
79
 
64
- The local scanner now checks for:
80
+ The local scanner checks for:
65
81
  - provider tokens and webhook URLs for OpenAI, Anthropic, GitHub, GitLab, AWS, Slack, Stripe, SendGrid, npm, PyPI, Docker, Vault, Discord, Teams, and more
66
82
  - bearer tokens, JWTs, Docker auth blobs, kube auth fields, and credential-bearing connection strings
67
83
  - `.env*`, `.npmrc`, `.git-credentials`, `.kube/config`, Terraform state and vars, service-account JSON, key stores, SSH keys, and private key material
@@ -74,9 +90,11 @@ Enforcement modes:
74
90
  - `strict-high`
75
91
  - `strict-all`
76
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
+
77
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.
78
96
 
79
- See [SENSITIVE.md](SENSITIVE.md) for the full scanning flow and [PROCESS.md](PROCESS.md) for how it fits into the overall commit pipeline.
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.
80
98
 
81
99
  ## Config
82
100
 
@@ -87,6 +105,7 @@ VS Code / VSCodium settings under `opencodecommit.*` are synced bidirectionally
87
105
  Override the path with the `OPENCODECOMMIT_CONFIG` environment variable.
88
106
 
89
107
  Useful settings:
108
+ - `backend`
90
109
  - `backend-order`
91
110
  - `commit-mode`
92
111
  - `branch-mode`
@@ -95,6 +114,40 @@ Useful settings:
95
114
  - `commit-template`
96
115
  - `sensitive.enforcement`
97
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
+ ```
144
+
145
+ ## CI/CD
146
+
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)
149
+
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.
98
151
 
99
152
  ## License
100
153
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "opencodecommit",
3
- "version": "1.4.1",
4
- "description": "AI-powered git commit message generator that delegates to terminal AI agents",
3
+ "version": "1.5.1",
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": {
7
7
  "type": "git",
@@ -27,6 +27,10 @@
27
27
  "commit",
28
28
  "ai",
29
29
  "cli",
30
+ "api",
31
+ "ci",
32
+ "scanner",
33
+ "security",
30
34
  "opencode",
31
35
  "claude",
32
36
  "codex"
Binary file
Binary file
Binary file
Binary file
Binary file