@nevaberry/opencodecommit 1.3.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.
Files changed (2) hide show
  1. package/README.md +16 -158
  2. package/package.json +2 -5
package/README.md CHANGED
@@ -1,164 +1,22 @@
1
- # OpenCodeCommit
1
+ # @nevaberry/opencodecommit
2
2
 
3
- AI commit messages via terminal AI agents. VSCodium / VS Code extension + standalone Rust / npm CLI.
4
- asdf
3
+ Compatibility package for OpenCodeCommit.
5
4
 
6
- **Security scanning built in** — diffs are scanned locally for secrets, source maps, and private keys before anything leaves your machine.
7
-
8
- [VSCodium Open VSX registry](https://open-vsx.org/extension/Nevaberry/opencodecommit)<br>
9
- [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
-
11
- ## Install
12
-
13
- **Extension:** Search "OpenCodeCommit" in VSCodium / VS Code, or `ext install Nevaberry.opencodecommit`
14
-
15
- **CLI:** `cargo install opencodecommit` or `npm i -g opencodecommit` (official unscoped alias: `@nevaberry/opencodecommit`)
16
-
17
- **Prerequisite:** At least one CLI backend:
18
-
19
- | Backend | Install |
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` |
25
-
26
- ## VSCodium / VS Code Usage
27
-
28
- 1. Stage changes (or leave unstaged — auto-detected)
29
- 2. Click the **sparkle button** in Source Control
30
- 3. Commit message appears in the input box
31
-
32
- Dropdown menu: mode-specific generation, refine, branch name generation, switch language, diagnose.
33
- Single-backend testing is available from dedicated SCM submenus for adaptive commit generation and PR generation; the main generate actions still follow fallback order.
34
-
35
- ## CLI Usage
5
+ Install `opencodecommit` instead:
36
6
 
37
7
  ```bash
38
- occ tui # launch the minimal interactive TUI
39
- occ commit # generate message + commit
40
- occ commit --dry-run # preview only, don't commit
41
- occ commit --backend gemini --dry-run --text
42
- occ commit --language Finnish # generate in Finnish
43
- occ commit --language Spanish # generate in Spanish
44
- occ commit --language Korean # generate in Korean
45
- occ guard profile human # set human-friendly warning mode
46
- occ guard profile strict-agent # set strict agent-safe mode
47
- occ branch # generate branch name + checkout
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
8
+ npm i -g opencodecommit
56
9
  ```
57
10
 
58
- `occ tui` is a small launcher over the existing commands, not a full git dashboard. It lets you generate, shorten, and commit messages, preview branch / PR / changelog output, install the safety hook, switch between human / strict-agent sensitive profiles, and run one-shot `Commit Backend` / `PR Backend` actions without changing the default backend.
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
- ```
74
-
75
- This installs a managed global hooks directory via `core.hooksPath`. `pre-commit` scans the staged diff for sensitive content, and other hook names are chained through so existing repo hooks still run.
76
-
77
- ## Sensitive Content Detection
78
-
79
- Diffs are scanned locally before being sent to any AI backend. Findings are classified as:
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
84
-
85
- Enforcement modes:
86
-
87
- - `warn`: default. Show the report, but continue after acknowledgement.
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 |
133
-
134
- CLI config: `~/.config/opencodecommit/config.toml` (TOML with the same fields in kebab-case).
135
-
136
- Example:
137
-
138
- ```toml
139
- [sensitive]
140
- enforcement = "block-high"
141
-
142
- [[sensitive.allowlist]]
143
- path-regex = "\\.env\\.example$"
144
- rule = "openai-project-key"
145
- value-regex = "^sk-proj-"
146
- ```
147
-
148
- ## Languages
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
- ```
161
-
162
- ## License
163
-
164
- [MIT](LICENSE)
11
+ The primary package provides:
12
+ - the `occ` CLI
13
+ - the TUI
14
+ - commit, branch, PR, and changelog generation
15
+ - local sensitive-content scanning and git guard support
16
+
17
+ Links:
18
+ - [Primary npm package](https://www.npmjs.com/package/opencodecommit)
19
+ - [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=Nevaberry.opencodecommit)
20
+ - [Open VSX](https://open-vsx.org/extension/Nevaberry/opencodecommit)
21
+ - [crates.io](https://crates.io/crates/opencodecommit)
22
+ - [GitHub](https://github.com/Nevaberry/opencodecommit)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nevaberry/opencodecommit",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "Scoped alias for opencodecommit — install opencodecommit instead",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -15,9 +15,6 @@
15
15
  "bin",
16
16
  "index.js"
17
17
  ],
18
- "scripts": {
19
- "prepack": "cp ../../README.md . 2>/dev/null || true"
20
- },
21
18
  "keywords": [
22
19
  "git",
23
20
  "commit",
@@ -31,6 +28,6 @@
31
28
  "node": ">=18"
32
29
  },
33
30
  "dependencies": {
34
- "opencodecommit": "1.3.1"
31
+ "opencodecommit": "1.3.2"
35
32
  }
36
33
  }