code-gate 1.1.0 → 1.1.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.
Files changed (3) hide show
  1. package/README.md +16 -2
  2. package/README_ZH.md +16 -2
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -6,6 +6,8 @@
6
6
 
7
7
  # Code Gate
8
8
 
9
+ ![Node Version](https://img.shields.io/badge/node-%3E%3D18-brightgreen)
10
+
9
11
  **Your Lightweight Local AI Code Review Assistant**
10
12
 
11
13
  Code Gate is an intelligent code review tool seamlessly integrated into your Git workflow. When you run `git commit`, it automatically analyzes staged code changes, utilizing local LLMs (Ollama) or cloud AI services to provide instant feedback on code quality, security suggestions, and optimization plans.
@@ -114,16 +116,28 @@ Install `code-gate` as a development dependency in your project:
114
116
  npm i -D code-gate
115
117
  ```
116
118
 
119
+ Add script command in `package.json`:
120
+
121
+ ```json
122
+ {
123
+ "scripts": {
124
+ "review": "code-gate review"
125
+ }
126
+ }
127
+ ```
128
+
117
129
  Manually trigger reviews via script commands:
118
130
 
119
131
  ```bash
120
132
  # Review staged changes
121
- npx code-gate review
133
+ npm run review
122
134
 
123
135
  # Review a specific commit
124
- npx code-gate review <commit-hash>
136
+ npm run review <commit-hash>
125
137
  ```
126
138
 
139
+ > If you want to use the `code-gate review` command directly in the command line, you can install `code-gate` as a global dependency: `npm i -g code-gate`
140
+
127
141
  ### Method 3: Automated Git Hook Review
128
142
 
129
143
  The recommended way. Automatically intercepts `git commit` flows.
package/README_ZH.md CHANGED
@@ -6,6 +6,8 @@
6
6
 
7
7
  # Code Gate
8
8
 
9
+ ![Node Version](https://img.shields.io/badge/node-%3E%3D18-brightgreen)
10
+
9
11
  **您的轻量级本地 AI 代码审查助手**
10
12
 
11
13
  Code Gate 是一款无缝集成到 Git 工作流中的智能代码AI审查工具。可视化展示代码变更与 AI 建议,帮助您快速定位问题并优化代码质量。
@@ -115,16 +117,28 @@ npx code-gate review
115
117
  npm i -D code-gate
116
118
  ```
117
119
 
120
+ 在 `package.json` 中添加脚本命令:
121
+
122
+ ```json
123
+ {
124
+ "scripts": {
125
+ "review": "code-gate review"
126
+ }
127
+ }
128
+ ```
129
+
118
130
  通过脚本命令手动触发审查:
119
131
 
120
132
  ```bash
121
133
  # 审查暂存区变更
122
- npx code-gate review
134
+ npm run review
123
135
 
124
136
  # 审查特定提交
125
- npx code-gate review <commit-hash>
137
+ npm run review <commit-hash>
126
138
  ```
127
139
 
140
+ > 如果想要直接在命令行使用 `code-gate review`命令,可以将 `code-gate` 安装为全局依赖:`npm i -g code-gate`
141
+
128
142
  ### 方式三:Git Hook 自动化审查
129
143
 
130
144
  自动拦截 `git commit` 流程(完成审核后会询问是否继续提交)。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "code-gate",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Intelligent Git commit guard and code reviewer. Supports local (Ollama) and cloud models (DeepSeek, OpenAI, Anthropic, etc.) with a rich CLI UI.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -53,7 +53,7 @@
53
53
  "dompurify": "^3.3.1",
54
54
  "dotenv": "^17.2.3",
55
55
  "highlight.js": "^11.9.0",
56
- "jsdom": "^27.0.1",
56
+ "jsdom": "^25.0.1",
57
57
  "marked": "^17.0.1",
58
58
  "micromatch": "^4.0.8",
59
59
  "openai": "^4.60.0",
@@ -62,7 +62,7 @@
62
62
  },
63
63
  "devDependencies": {
64
64
  "@types/dompurify": "^3.0.5",
65
- "@types/jsdom": "^27.0.0",
65
+ "@types/jsdom": "^21.1.7",
66
66
  "@types/marked": "^5.0.2",
67
67
  "@types/micromatch": "^4.0.10",
68
68
  "@types/node": "^22.7.5",