codebuff-cli 1.0.15 → 1.0.16

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/package.json CHANGED
@@ -1,92 +1,43 @@
1
1
  {
2
2
  "name": "codebuff-cli",
3
- "version": "1.0.15",
4
- "license": "Apache-2.0",
3
+ "version": "1.0.16",
4
+ "description": "AI coding agent",
5
+ "license": "MIT",
5
6
  "bin": {
6
- "codebuff": "cli/bin/codebuff.cjs",
7
- "codebuff-cli": "cli/bin/codebuff.cjs"
7
+ "codebuff": "index.js",
8
+ "codebuff-cli": "index.js"
9
+ },
10
+ "scripts": {
11
+ "postinstall": "node postinstall.js",
12
+ "preuninstall": "node -e \"const fs = require('fs'); const path = require('path'); const os = require('os'); const binaryPath = path.join(os.homedir(), '.config', 'manicode', process.platform === 'win32' ? 'codebuff.exe' : 'codebuff'); try { fs.unlinkSync(binaryPath) } catch (e) { /* ignore if file doesn't exist */ }\""
8
13
  },
9
14
  "files": [
10
- "cli/bin/codebuff.cjs",
11
- "cli/scripts/download-binary.cjs",
12
- "README.md",
13
- "LICENSE",
14
- "NOTICE"
15
+ "index.js",
16
+ "http.js",
17
+ "postinstall.js",
18
+ "README.md"
15
19
  ],
16
- "publishConfig": {
17
- "access": "public"
18
- },
19
- "type": "module",
20
- "workspaces": [
21
- ".agents",
22
- "common",
23
- "packages/*",
24
- "scripts",
25
- "evals",
26
- "sdk",
27
- "agents",
28
- "cli"
20
+ "os": [
21
+ "darwin",
22
+ "linux",
23
+ "win32"
29
24
  ],
30
- "scripts": {
31
- "dev": "bun start-cli",
32
- "up": "bun scripts/start-services.ts",
33
- "start-cli": "bun --cwd cli dev",
34
- "start-db": "bun --cwd packages/internal db:start",
35
- "start-studio": "bun --cwd packages/internal db:studio",
36
- "down": "bun scripts/stop-services.ts",
37
- "ps": "bun scripts/status-services.ts",
38
- "format": "prettier --write \"**/*.{ts,tsx,json,md}\"",
39
- "release:cli": "bun run --cwd=cli release",
40
- "release:sdk": "bun run --cwd=sdk release",
41
- "clean-ts": "find . -name '*.tsbuildinfo' -type f -delete && find . -name '.next' -type d -exec rm -rf {} + 2>/dev/null || true && find . -name 'node_modules' -type d -exec rm -rf {} + 2>/dev/null || true && bun install",
42
- "typecheck": "bun scripts/check-env-architecture.ts && bun --filter='*' run typecheck && echo '✅ All type checks passed!'",
43
- "test": "bun --filter='{@codebuff/common,@codebuff/agents,@codebuff/agent-runtime,@codebuff/sdk,@codebuff/cli,@codebuff/evals,@codebuff/scripts}' run test",
44
- "init-worktree": "bun scripts/init-worktree.ts",
45
- "cleanup-worktree": "bun scripts/cleanup-worktree.ts",
46
- "generate-tool-definitions": "bun scripts/generate-tool-definitions.ts",
47
- "postinstall": "node cli/scripts/download-binary.cjs"
25
+ "cpu": [
26
+ "x64",
27
+ "arm64"
28
+ ],
29
+ "engines": {
30
+ "node": ">=16"
48
31
  },
49
32
  "dependencies": {
50
- "@t3-oss/env-nextjs": "^0.7.3",
51
- "canvas": "^3.2.0",
52
- "gif-encoder-2": "^1.0.5",
53
- "zod": "^4.2.1"
54
- },
55
- "overrides": {
56
- "react": "^19.0.0",
57
- "react-dom": "^19.0.0",
58
- "@types/react": "19.2.14",
59
- "@types/react-dom": "19.2.3",
60
- "baseline-browser-mapping": "^2.9.14",
61
- "caniuse-lite": "^1.0.30001792",
62
- "zod": "^4.2.1",
63
- "signal-exit": "3.0.7"
64
- },
65
- "devDependencies": {
66
- "@tanstack/react-query": "^5.90.12",
67
- "@types/bun": "1.3.11",
68
- "@types/js-yaml": "^4.0.9",
69
- "@types/lodash": "^4.17.21",
70
- "@types/node": "^22.9.0",
71
- "@types/node-fetch": "^2.6.12",
72
- "@types/parse-path": "^7.1.0",
73
- "@typescript-eslint/eslint-plugin": "^6.17",
74
- "bun-types": "1.3.11",
75
- "eslint-config-prettier": "^9.1.0",
76
- "eslint-plugin-import": "^2.29.1",
77
- "eslint-plugin-unused-imports": "^4.1.4",
78
- "ignore": "^6.0.2",
79
- "lodash": "4.17.23",
80
- "prettier": "^3.7.4",
81
- "ts-node": "^10.9.2",
82
- "ts-pattern": "^5.9.0",
83
- "tsc-alias": "^1.8.16",
84
- "tsconfig-paths": "4.2.0",
85
- "typescript": "5.5.4",
86
- "typescript-eslint": "^7.17.0"
33
+ "tar": "^7.0.0"
87
34
  },
88
- "engines": {
89
- "bun": "1.3.11"
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "https://github.com/Marcus-Mok-GH/codebuff-cli.git"
90
38
  },
91
- "packageManager": "bun@1.3.11"
39
+ "homepage": "https://codebuff.com",
40
+ "publishConfig": {
41
+ "access": "public"
42
+ }
92
43
  }
package/postinstall.js ADDED
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const os = require('os');
5
+ const path = require('path');
6
+
7
+ // Clean up old binary
8
+ const binaryPath = path.join(
9
+ os.homedir(),
10
+ '.config',
11
+ 'manicode',
12
+ process.platform === 'win32' ? 'codebuff.exe' : 'codebuff'
13
+ );
14
+
15
+ try {
16
+ fs.unlinkSync(binaryPath);
17
+ } catch (e) {
18
+ /* ignore if file doesn't exist */
19
+ }
20
+
21
+ // Print welcome message
22
+ console.log('\n');
23
+ console.log('🎉 Welcome to Codebuff!');
24
+ console.log('\n');
25
+ console.log('To get started:');
26
+ console.log(' 1. cd to your project directory');
27
+ console.log(' 2. Run: codebuff');
28
+ console.log('\n');
29
+ console.log('Example:');
30
+ console.log(' $ cd ~/my-project');
31
+ console.log(' $ codebuff');
32
+ console.log('\n');
33
+ console.log('For more information, visit: https://codebuff.com/docs');
34
+ console.log('\n');
package/LICENSE DELETED
@@ -1,202 +0,0 @@
1
-
2
- Apache License
3
- Version 2.0, January 2004
4
- http://www.apache.org/licenses/
5
-
6
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
-
8
- 1. Definitions.
9
-
10
- "License" shall mean the terms and conditions for use, reproduction,
11
- and distribution as defined by Sections 1 through 9 of this document.
12
-
13
- "Licensor" shall mean the copyright owner or entity authorized by
14
- the copyright owner that is granting the License.
15
-
16
- "Legal Entity" shall mean the union of the acting entity and all
17
- other entities that control, are controlled by, or are under common
18
- control with that entity. For the purposes of this definition,
19
- "control" means (i) the power, direct or indirect, to cause the
20
- direction or management of such entity, whether by contract or
21
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
- outstanding shares, or (iii) beneficial ownership of such entity.
23
-
24
- "You" (or "Your") shall mean an individual or Legal Entity
25
- exercising permissions granted by this License.
26
-
27
- "Source" form shall mean the preferred form for making modifications,
28
- including but not limited to software source code, documentation
29
- source, and configuration files.
30
-
31
- "Object" form shall mean any form resulting from mechanical
32
- transformation or translation of a Source form, including but
33
- not limited to compiled object code, generated documentation,
34
- and conversions to other media types.
35
-
36
- "Work" shall mean the work of authorship, whether in Source or
37
- Object form, made available under the License, as indicated by a
38
- copyright notice that is included in or attached to the work
39
- (an example is provided in the Appendix below).
40
-
41
- "Derivative Works" shall mean any work, whether in Source or Object
42
- form, that is based on (or derived from) the Work and for which the
43
- editorial revisions, annotations, elaborations, or other modifications
44
- represent, as a whole, an original work of authorship. For the purposes
45
- of this License, Derivative Works shall not include works that remain
46
- separable from, or merely link (or bind by name) to the interfaces of,
47
- the Work and Derivative Works thereof.
48
-
49
- "Contribution" shall mean any work of authorship, including
50
- the original version of the Work and any modifications or additions
51
- to that Work or Derivative Works thereof, that is intentionally
52
- submitted to Licensor for inclusion in the Work by the copyright owner
53
- or by an individual or Legal Entity authorized to submit on behalf of
54
- the copyright owner. For the purposes of this definition, "submitted"
55
- means any form of electronic, verbal, or written communication sent
56
- to the Licensor or its representatives, including but not limited to
57
- communication on electronic mailing lists, source code control systems,
58
- and issue tracking systems that are managed by, or on behalf of, the
59
- Licensor for the purpose of discussing and improving the Work, but
60
- excluding communication that is conspicuously marked or otherwise
61
- designated in writing by the copyright owner as "Not a Contribution."
62
-
63
- "Contributor" shall mean Licensor and any individual or Legal Entity
64
- on behalf of whom a Contribution has been received by Licensor and
65
- subsequently incorporated within the Work.
66
-
67
- 2. Grant of Copyright License. Subject to the terms and conditions of
68
- this License, each Contributor hereby grants to You a perpetual,
69
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
- copyright license to reproduce, prepare Derivative Works of,
71
- publicly display, publicly perform, sublicense, and distribute the
72
- Work and such Derivative Works in Source or Object form.
73
-
74
- 3. Grant of Patent License. Subject to the terms and conditions of
75
- this License, each Contributor hereby grants to You a perpetual,
76
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
- (except as stated in this section) patent license to make, have made,
78
- use, offer to sell, sell, import, and otherwise transfer the Work,
79
- where such license applies only to those patent claims licensable
80
- by such Contributor that are necessarily infringed by their
81
- Contribution(s) alone or by combination of their Contribution(s)
82
- with the Work to which such Contribution(s) was submitted. If You
83
- institute patent litigation against any entity (including a
84
- cross-claim or counterclaim in a lawsuit) alleging that the Work
85
- or a Contribution incorporated within the Work constitutes direct
86
- or contributory patent infringement, then any patent licenses
87
- granted to You under this License for that Work shall terminate
88
- as of the date such litigation is filed.
89
-
90
- 4. Redistribution. You may reproduce and distribute copies of the
91
- Work or Derivative Works thereof in any medium, with or without
92
- modifications, and in Source or Object form, provided that You
93
- meet the following conditions:
94
-
95
- (a) You must give any other recipients of the Work or
96
- Derivative Works a copy of this License; and
97
-
98
- (b) You must cause any modified files to carry prominent notices
99
- stating that You changed the files; and
100
-
101
- (c) You must retain, in the Source form of any Derivative Works
102
- that You distribute, all copyright, patent, trademark, and
103
- attribution notices from the Source form of the Work,
104
- excluding those notices that do not pertain to any part of
105
- the Derivative Works; and
106
-
107
- (d) If the Work includes a "NOTICE" text file as part of its
108
- distribution, then any Derivative Works that You distribute must
109
- include a readable copy of the attribution notices contained
110
- within such NOTICE file, excluding those notices that do not
111
- pertain to any part of the Derivative Works, in at least one
112
- of the following places: within a NOTICE text file distributed
113
- as part of the Derivative Works; within the Source form or
114
- documentation, if provided along with the Derivative Works; or,
115
- within a display generated by the Derivative Works, if and
116
- wherever such third-party notices normally appear. The contents
117
- of the NOTICE file are for informational purposes only and
118
- do not modify the License. You may add Your own attribution
119
- notices within Derivative Works that You distribute, alongside
120
- or as an addendum to the NOTICE text from the Work, provided
121
- that such additional attribution notices cannot be construed
122
- as modifying the License.
123
-
124
- You may add Your own copyright statement to Your modifications and
125
- may provide additional or different license terms and conditions
126
- for use, reproduction, or distribution of Your modifications, or
127
- for any such Derivative Works as a whole, provided Your use,
128
- reproduction, and distribution of the Work otherwise complies with
129
- the conditions stated in this License.
130
-
131
- 5. Submission of Contributions. Unless You explicitly state otherwise,
132
- any Contribution intentionally submitted for inclusion in the Work
133
- by You to the Licensor shall be under the terms and conditions of
134
- this License, without any additional terms or conditions.
135
- Notwithstanding the above, nothing herein shall supersede or modify
136
- the terms of any separate license agreement you may have executed
137
- with Licensor regarding such Contributions.
138
-
139
- 6. Trademarks. This License does not grant permission to use the trade
140
- names, trademarks, service marks, or product names of the Licensor,
141
- except as required for reasonable and customary use in describing the
142
- origin of the Work and reproducing the content of the NOTICE file.
143
-
144
- 7. Disclaimer of Warranty. Unless required by applicable law or
145
- agreed to in writing, Licensor provides the Work (and each
146
- Contributor provides its Contributions) on an "AS IS" BASIS,
147
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
- implied, including, without limitation, any warranties or conditions
149
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
- PARTICULAR PURPOSE. You are solely responsible for determining the
151
- appropriateness of using or redistributing the Work and assume any
152
- risks associated with Your exercise of permissions under this License.
153
-
154
- 8. Limitation of Liability. In no event and under no legal theory,
155
- whether in tort (including negligence), contract, or otherwise,
156
- unless required by applicable law (such as deliberate and grossly
157
- negligent acts) or agreed to in writing, shall any Contributor be
158
- liable to You for damages, including any direct, indirect, special,
159
- incidental, or consequential damages of any character arising as a
160
- result of this License or out of the use or inability to use the
161
- Work (including but not limited to damages for loss of goodwill,
162
- work stoppage, computer failure or malfunction, or any and all
163
- other commercial damages or losses), even if such Contributor
164
- has been advised of the possibility of such damages.
165
-
166
- 9. Accepting Warranty or Additional Liability. While redistributing
167
- the Work or Derivative Works thereof, You may choose to offer,
168
- and charge a fee for, acceptance of support, warranty, indemnity,
169
- or other liability obligations and/or rights consistent with this
170
- License. However, in accepting such obligations, You may act only
171
- on Your own behalf and on Your sole responsibility, not on behalf
172
- of any other Contributor, and only if You agree to indemnify,
173
- defend, and hold each Contributor harmless for any liability
174
- incurred by, or claims asserted against, such Contributor by reason
175
- of your accepting any such warranty or additional liability.
176
-
177
- END OF TERMS AND CONDITIONS
178
-
179
- APPENDIX: How to apply the Apache License to your work.
180
-
181
- To apply the Apache License to your work, attach the following
182
- boilerplate notice, with the fields enclosed by brackets "[]"
183
- replaced with your own identifying information. (Don't include
184
- the brackets!) The text should be enclosed in the appropriate
185
- comment syntax for the file format. We also recommend that a
186
- file or class name and description of purpose be included on the
187
- same "printed page" as the copyright notice for easier
188
- identification within third-party archives.
189
-
190
- Copyright 2025 Manicode, Inc.
191
-
192
- Licensed under the Apache License, Version 2.0 (the "License");
193
- you may not use this file except in compliance with the License.
194
- You may obtain a copy of the License at
195
-
196
- http://www.apache.org/licenses/LICENSE-2.0
197
-
198
- Unless required by applicable law or agreed to in writing, software
199
- distributed under the License is distributed on an "AS IS" BASIS,
200
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
- See the License for the specific language governing permissions and
202
- limitations under the License.
package/NOTICE DELETED
@@ -1,4 +0,0 @@
1
- Codebuff
2
- Copyright 2025 Codebuff
3
-
4
- This product includes software developed for the Codebuff project.
package/README.zh-CN.md DELETED
@@ -1,251 +0,0 @@
1
- # Codebuff & Freebuff
2
-
3
- [English](./README.md) | 简体中文
4
-
5
- **[Codebuff](https://codebuff.com)** 是一款开源的 AI 编程助手,能根据自然语言指令直接修改你的代码库。**[Freebuff](https://www.npmjs.com/package/freebuff)** 是它的免费、广告支持版本——无需订阅、无需积分、零配置。
6
-
7
- 与那种"一个模型干所有事"的工具不同,Codebuff 会协调多个专业化的智能体(agent)协同工作,理解你的项目并做出精准的改动。
8
-
9
- <div align="center">
10
- <img src="./assets/codebuff-vs-claude-code.png" alt="Codebuff vs Claude Code" width="400">
11
- </div>
12
-
13
- 在我们的[评测](evals/README.md)中,Codebuff 在 175+ 个真实开源仓库的编码任务上以 61% 对 53% 的成绩领先 Claude Code。
14
-
15
-
16
- ## 工作原理
17
-
18
- 当你让 Codebuff "给我的 API 加上身份验证"时,它可能会调用:
19
-
20
- 1. **File Picker Agent** —— 扫描代码库、理解架构、找出相关文件
21
- 2. **Planner Agent** —— 规划哪些文件需要改、按什么顺序改
22
- 3. **Editor Agent** —— 执行精确的修改
23
- 4. **Reviewer Agent** —— 校验改动是否正确
24
-
25
- <div align="center">
26
- <img src="./assets/multi-agents.png" alt="Codebuff Multi-Agents" width="250">
27
- </div>
28
-
29
- 相比单模型工具,这种多智能体方案能带来更准的上下文理解、更精确的修改,以及更少的错误。
30
-
31
- ## CLI:装好就能写代码
32
-
33
- 安装:
34
-
35
- ```bash
36
- npm install -g codebuff
37
- ```
38
-
39
- 运行:
40
-
41
- ```bash
42
- cd your-project
43
- codebuff
44
- ```
45
-
46
- 然后直接告诉 Codebuff 你想做什么,剩下的它自己搞定:
47
-
48
- - "修掉用户注册里的 SQL 注入漏洞"
49
- - "给所有 API 端点加上限流"
50
- - "重构数据库连接代码,提升性能"
51
-
52
- Codebuff 会找到对应的文件,跨多个文件做改动,并跑测试确认没有破坏现有功能。
53
-
54
- ## 创建自定义智能体
55
-
56
- 要开始构建自己的智能体,先启动 Codebuff 然后执行 `/init`:
57
-
58
- ```bash
59
- codebuff
60
- ```
61
-
62
- 进入 CLI 后:
63
-
64
- ```
65
- /init
66
- ```
67
-
68
- 这会生成:
69
- ```
70
- knowledge.md # Codebuff 用的项目上下文
71
- .agents/
72
- └── types/ # TypeScript 类型定义
73
- ├── agent-definition.ts
74
- ├── tools.ts
75
- └── util-types.ts
76
- ```
77
-
78
- 通过编写智能体定义文件,你可以最大程度地控制智能体的行为。
79
-
80
- 通过指定工具、可派生的子智能体和提示词来实现自己的工作流。我们还提供了 TypeScript 生成器,方便你以更程序化的方式控制流程。
81
-
82
- 下面是一个 `git-committer` 智能体的例子,它会基于当前的 git 状态生成提交。注意它先跑 `git diff` 和 `git log` 分析改动,然后再把决策权交给 LLM,让它撰写有意义的 commit message 并完成实际提交。
83
-
84
- ```typescript
85
- export default {
86
- id: 'git-committer',
87
- displayName: 'Git Committer',
88
- model: 'openai/gpt-5-nano',
89
- toolNames: ['read_files', 'run_terminal_command', 'end_turn'],
90
-
91
- instructionsPrompt:
92
- 'You create meaningful git commits by analyzing changes, reading relevant files for context, and crafting clear commit messages that explain the "why" behind changes.',
93
-
94
- async *handleSteps() {
95
- // 分析改动
96
- yield { tool: 'run_terminal_command', command: 'git diff' }
97
- yield { tool: 'run_terminal_command', command: 'git log --oneline -5' }
98
-
99
- // 暂存文件,并用合适的 message 生成提交
100
- yield 'STEP_ALL'
101
- },
102
- }
103
- ```
104
-
105
- ## SDK:在生产环境里跑智能体
106
-
107
- 安装 [SDK 包](https://www.npmjs.com/package/@codebuff/sdk)——注意这跟 CLI 用的 codebuff 包是两个不同的包。
108
-
109
- ```bash
110
- npm install @codebuff/sdk
111
- ```
112
-
113
- 引入 client,开始跑智能体:
114
-
115
- ```typescript
116
- import { CodebuffClient } from '@codebuff/sdk'
117
-
118
- // 1. 初始化 client
119
- const client = new CodebuffClient({
120
- apiKey: 'your-api-key',
121
- cwd: '/path/to/your/project',
122
- onError: (error) => console.error('Codebuff error:', error.message),
123
- })
124
-
125
- // 2. 跑一个编码任务……
126
- const result = await client.run({
127
- agent: 'base', // Codebuff 默认的基础编码智能体
128
- prompt: 'Add error handling to all API endpoints',
129
- handleEvent: (event) => {
130
- console.log('Progress', event)
131
- },
132
- })
133
-
134
- // 3. 也可以跑自定义智能体!
135
- const myCustomAgent: AgentDefinition = {
136
- id: 'greeter',
137
- displayName: 'Greeter',
138
- model: 'openai/gpt-5.1',
139
- instructionsPrompt: 'Say hello!',
140
- }
141
- await client.run({
142
- agent: 'greeter',
143
- agentDefinitions: [myCustomAgent],
144
- prompt: 'My name is Bob.',
145
- customToolDefinitions: [], // 也可以加自定义工具!
146
- handleEvent: (event) => {
147
- console.log('Progress', event)
148
- },
149
- })
150
- ```
151
-
152
- 更多 SDK 用法请看[这里](https://www.npmjs.com/package/@codebuff/sdk)。
153
-
154
- ## Freebuff:免费的编程智能体
155
-
156
- 不想订阅?**[Freebuff](https://www.npmjs.com/package/freebuff)** 是 Codebuff 的免费版本——无需订阅、无需积分、零配置,装上就能用。
157
-
158
- ```bash
159
- npm install -g freebuff
160
- cd your-project
161
- freebuff
162
- ```
163
-
164
- Freebuff 由广告支持,使用经过优化、兼顾速度与质量的模型。内置网页检索、浏览器使用等能力。详情见 [Freebuff README](./freebuff/README.md)。
165
-
166
- ## 为什么选 Codebuff
167
-
168
- **自定义工作流**:用 TypeScript 生成器把 AI 生成和程序化控制混着用。智能体可以派生子智能体、按条件分支、跑多步流程。
169
-
170
- **OpenRouter 上的任何模型**:Claude Code 把你锁死在 Anthropic 的模型上,Codebuff 不一样——它支持 [OpenRouter](https://openrouter.ai/models) 上的所有模型,从 Claude、GPT 到 Qwen、DeepSeek 这类专用模型都行。可以按任务切换模型,也能随时用上最新发布的模型,不必等平台跟进。
171
-
172
- **复用已发布的智能体**:把社区[已发布的智能体](https://www.codebuff.com/store)拼起来用,少走弯路。Codebuff 智能体就是新一代的 MCP!
173
-
174
- **SDK**:把 Codebuff 嵌进你自己的应用里。可以创建自定义工具、对接 CI/CD,或把编码能力内嵌进你的产品。
175
-
176
- ## 进阶用法
177
-
178
- ### 自定义智能体工作流
179
-
180
- 用 `/init` 命令创建带专门工作流的智能体:
181
-
182
- ```bash
183
- codebuff
184
- /init
185
- ```
186
-
187
- 这会在 `.agents/` 下生成一套可自定义的智能体结构。
188
-
189
- ## 参与贡献
190
-
191
- 我们 ❤️ 来自社区的贡献——无论是修 bug、调整智能体、还是改进文档。
192
-
193
- **想参与?** 看一眼[贡献指南](./CONTRIBUTING.md) 就能上手。
194
-
195
- ### 运行测试
196
-
197
- 跑测试套件:
198
-
199
- ```bash
200
- cd cli
201
- bun test
202
- ```
203
-
204
- **交互式端到端测试**需要 tmux:
205
-
206
- ```bash
207
- # macOS
208
- brew install tmux
209
-
210
- # Ubuntu/Debian
211
- sudo apt-get install tmux
212
-
213
- # Windows(通过 WSL)
214
- wsl --install
215
- sudo apt-get install tmux
216
- ```
217
-
218
- 更完整的测试文档见 [cli/src/__tests__/README.md](cli/src/__tests__/README.md)。
219
-
220
- 可以帮忙的方向:
221
-
222
- - 🐛 **修 bug** 或新增功能
223
- - 🤖 **打造专用智能体**并发布到 Agent Store
224
- - 📚 **完善文档**或撰写教程
225
- - 💡 **分享想法**:在 [GitHub Issues](https://github.com/CodebuffAI/codebuff/issues) 留言
226
-
227
- ## 开始使用
228
-
229
- ### 安装
230
-
231
- **CLI**:`npm install -g codebuff`
232
-
233
- **SDK**:`npm install @codebuff/sdk`
234
-
235
- **Freebuff(免费版)**:`npm install -g freebuff`
236
-
237
- ### 资源
238
-
239
- **文档**:[codebuff.com/docs](https://codebuff.com/docs)
240
-
241
- **社区**:[Discord](https://codebuff.com/discord)
242
-
243
- **Issue 与想法**:[GitHub Issues](https://github.com/CodebuffAI/codebuff/issues)
244
-
245
- **贡献指南**:[CONTRIBUTING.md](./CONTRIBUTING.md) ——想贡献从这里开始!
246
-
247
- **支持**:[support@codebuff.com](mailto:support@codebuff.com)
248
-
249
- ## Star 历史
250
-
251
- [![Star History Chart](https://api.star-history.com/svg?repos=CodebuffAI/codebuff&type=Date)](https://www.star-history.com/#CodebuffAI/codebuff&Date)