clawdcode 0.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.
- package/README.md +64 -2
- package/dist/main.js +10114 -1018
- package/package.json +10 -2
package/README.md
CHANGED
|
@@ -72,15 +72,53 @@ ClawdCode supports multiple configuration methods (in priority order):
|
|
|
72
72
|
|
|
73
73
|
```json
|
|
74
74
|
{
|
|
75
|
-
"
|
|
76
|
-
"provider": "openai",
|
|
75
|
+
"default": {
|
|
77
76
|
"apiKey": "sk-your-api-key",
|
|
78
77
|
"baseURL": "https://api.openai.com/v1",
|
|
79
78
|
"model": "gpt-4"
|
|
79
|
+
},
|
|
80
|
+
"ui": {
|
|
81
|
+
"theme": "dark"
|
|
82
|
+
},
|
|
83
|
+
"permissions": {
|
|
84
|
+
"allow": ["Bash(npm:*)", "Bash(git:*)"],
|
|
85
|
+
"deny": ["Bash(rm -rf:*)"]
|
|
86
|
+
},
|
|
87
|
+
"defaultPermissionMode": "default"
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Permission Modes
|
|
92
|
+
|
|
93
|
+
| Mode | Read | Write | Execute |
|
|
94
|
+
|------|------|-------|---------|
|
|
95
|
+
| `default` | ✅ Auto | ❓ Ask | ❓ Ask |
|
|
96
|
+
| `autoEdit` | ✅ Auto | ✅ Auto | ❓ Ask |
|
|
97
|
+
| `yolo` | ✅ Auto | ✅ Auto | ✅ Auto |
|
|
98
|
+
| `plan` | ✅ Auto | ❌ Deny | ❌ Deny |
|
|
99
|
+
|
|
100
|
+
### Permission Rules
|
|
101
|
+
|
|
102
|
+
```json
|
|
103
|
+
{
|
|
104
|
+
"permissions": {
|
|
105
|
+
"allow": [
|
|
106
|
+
"Read(**/*.ts)",
|
|
107
|
+
"Bash(npm:*)"
|
|
108
|
+
],
|
|
109
|
+
"deny": [
|
|
110
|
+
"Bash(rm -rf:*)",
|
|
111
|
+
"Write(/etc/*)"
|
|
112
|
+
]
|
|
80
113
|
}
|
|
81
114
|
}
|
|
82
115
|
```
|
|
83
116
|
|
|
117
|
+
Rule format: `ToolName(pattern)` where pattern supports:
|
|
118
|
+
- Exact match: `Bash(npm test)`
|
|
119
|
+
- Prefix wildcard: `Bash(npm:*)` matches `npm install`, `npm test`, etc.
|
|
120
|
+
- Glob pattern: `Read(**/*.ts)` matches all TypeScript files
|
|
121
|
+
|
|
84
122
|
## Usage
|
|
85
123
|
|
|
86
124
|
### CLI Options
|
|
@@ -133,6 +171,30 @@ User Input → Build Messages → Call LLM → Tool Calls?
|
|
|
133
171
|
- Node.js >= 18.0.0
|
|
134
172
|
- OpenAI API key (or compatible API)
|
|
135
173
|
|
|
174
|
+
## Development
|
|
175
|
+
|
|
176
|
+
### Release & Publish
|
|
177
|
+
|
|
178
|
+
项目使用 [release-please](https://github.com/google-github-actions/release-please-action) 自动管理版本和发布。
|
|
179
|
+
|
|
180
|
+
**Commit 规范(Conventional Commits):**
|
|
181
|
+
- `feat:` 新功能 → minor 版本
|
|
182
|
+
- `fix:` 修复 → patch 版本
|
|
183
|
+
- `feat!:` 或 `BREAKING CHANGE` → major 版本
|
|
184
|
+
- `docs:` / `chore:` / `refactor:` → 不触发版本更新
|
|
185
|
+
|
|
186
|
+
**配置 GitHub Secrets:**
|
|
187
|
+
|
|
188
|
+
| Secret | 用途 | 获取方式 |
|
|
189
|
+
|--------|------|----------|
|
|
190
|
+
| `RELEASE_TOKEN` | release-please 创建 Release | GitHub → Settings → Developer settings → Personal access tokens → Fine-grained tokens,权限:Contents (R/W)、Pull requests (R/W) |
|
|
191
|
+
| `NPM_TOKEN` | 发布到 npm | npm → Access Tokens → Granular Access Token,勾选 Read and write |
|
|
192
|
+
|
|
193
|
+
**发布流程:**
|
|
194
|
+
```
|
|
195
|
+
Push to main → release-please 创建 PR → 合并 PR → 创建 GitHub Release → 自动 npm publish
|
|
196
|
+
```
|
|
197
|
+
|
|
136
198
|
## License
|
|
137
199
|
|
|
138
200
|
MIT
|