[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-73626":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":16,"starSnapshotCount":16,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},73626,"codebuff","CodebuffAI\u002Fcodebuff","CodebuffAI","Generate code from the terminal!","https:\u002F\u002Fcodebuff.com",null,"TypeScript",6338,769,31,77,0,101,185,584,303,39.66,"Apache License 2.0",false,"main",[],"2026-06-12 02:03:15","# Codebuff & Freebuff\n\nEnglish | [简体中文](.\u002FREADME.zh-CN.md)\n\n**[Codebuff](https:\u002F\u002Fcodebuff.com)** is an open-source AI coding assistant that edits your codebase through natural language instructions. **[Freebuff](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Ffreebuff)** is the free, ad-supported version — no subscription, no credits, no configuration.\n\nInstead of using one model for everything, Codebuff coordinates specialized agents that work together to understand your project and make precise changes.\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\".\u002Fassets\u002Fcodebuff-vs-claude-code.png\" alt=\"Codebuff vs Claude Code\" width=\"400\">\n\u003C\u002Fdiv>\n\nCodebuff beats Claude Code at 61% vs 53% on [our evals](evals\u002FREADME.md) across 175+ coding tasks over multiple open-source repos that simulate real-world tasks.\n\n\n## How it works\n\nWhen you ask Codebuff to \"add authentication to my API,\" it might invoke:\n\n1. A **File Picker Agent** to scan your codebase to understand the architecture and find relevant files\n2. A **Planner Agent** to plan which files need changes and in what order\n3. An **Editor Agent** to make precise edits\n4. A **Reviewer Agent** to validate changes\n\n\u003Cdiv align=\"center\">\n  \u003Cimg src=\".\u002Fassets\u002Fmulti-agents.png\" alt=\"Codebuff Multi-Agents\" width=\"250\">\n\u003C\u002Fdiv>\n\nThis multi-agent approach gives you better context understanding, more accurate edits, and fewer errors compared to single-model tools.\n\n## CLI: Install and start coding\n\nInstall:\n\n```bash\nnpm install -g codebuff\n```\n\nRun:\n\n```bash\ncd your-project\ncodebuff\n```\n\nThen just tell Codebuff what you want and it handles the rest:\n\n- \"Fix the SQL injection vulnerability in user registration\"\n- \"Add rate limiting to all API endpoints\"\n- \"Refactor the database connection code for better performance\"\n\nCodebuff will find the right files, makes changes across your codebase, and runs tests to make sure nothing breaks.\n\n## Create custom agents\n\nTo get started building your own agents, start Codebuff and run the `\u002Finit` command:\n\n```bash\ncodebuff\n```\n\nThen inside the CLI:\n\n```\n\u002Finit\n```\n\nThis creates:\n```\nknowledge.md               # Project context for Codebuff\n.agents\u002F\n└── types\u002F                 # TypeScript type definitions\n    ├── agent-definition.ts\n    ├── tools.ts\n    └── util-types.ts\n```\n\nYou can write agent definition files that give you maximum control over agent behavior.\n\nImplement your workflows by specifying tools, which agents can be spawned, and prompts. We even have TypeScript generators for more programmatic control.\n\nFor example, here's a `git-committer` agent that creates git commits based on the current git state. Notice that it runs `git diff` and `git log` to analyze changes, but then hands control over to the LLM to craft a meaningful commit message and perform the actual commit.\n\n```typescript\nexport default {\n  id: 'git-committer',\n  displayName: 'Git Committer',\n  model: 'openai\u002Fgpt-5-nano',\n  toolNames: ['read_files', 'run_terminal_command', 'end_turn'],\n\n  instructionsPrompt:\n    'You create meaningful git commits by analyzing changes, reading relevant files for context, and crafting clear commit messages that explain the \"why\" behind changes.',\n\n  async *handleSteps() {\n    \u002F\u002F Analyze what changed\n    yield { tool: 'run_terminal_command', command: 'git diff' }\n    yield { tool: 'run_terminal_command', command: 'git log --oneline -5' }\n\n    \u002F\u002F Stage files and create commit with good message\n    yield 'STEP_ALL'\n  },\n}\n```\n\n## SDK: Run agents in production\n\nInstall the [SDK package](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@codebuff\u002Fsdk) -- note this is different than the CLI codebuff package.\n\n```bash\nnpm install @codebuff\u002Fsdk\n```\n\nImport the client and run agents!\n\n```typescript\nimport { CodebuffClient } from '@codebuff\u002Fsdk'\n\n\u002F\u002F 1. Initialize the client\nconst client = new CodebuffClient({\n  apiKey: 'your-api-key',\n  cwd: '\u002Fpath\u002Fto\u002Fyour\u002Fproject',\n  onError: (error) => console.error('Codebuff error:', error.message),\n})\n\n\u002F\u002F 2. Do a coding task...\nconst result = await client.run({\n  agent: 'base', \u002F\u002F Codebuff's base coding agent\n  prompt: 'Add error handling to all API endpoints',\n  handleEvent: (event) => {\n    console.log('Progress', event)\n  },\n})\n\n\u002F\u002F 3. Or, run a custom agent!\nconst myCustomAgent: AgentDefinition = {\n  id: 'greeter',\n  displayName: 'Greeter',\n  model: 'openai\u002Fgpt-5.1',\n  instructionsPrompt: 'Say hello!',\n}\nawait client.run({\n  agent: 'greeter',\n  agentDefinitions: [myCustomAgent],\n  prompt: 'My name is Bob.',\n  customToolDefinitions: [], \u002F\u002F Add custom tools too!\n  handleEvent: (event) => {\n    console.log('Progress', event)\n  },\n})\n```\n\nLearn more about the SDK [here](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002F@codebuff\u002Fsdk).\n\n## Freebuff: The free coding agent\n\nDon't want a subscription? **[Freebuff](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Ffreebuff)** is a free variant of Codebuff — no subscription, no credits, no configuration. Just install and start coding.\n\n```bash\nnpm install -g freebuff\ncd your-project\nfreebuff\n```\n\nFreebuff is ad-supported and uses models optimized for fast, high-quality assistance. It includes built-in web research, browser use, and more. Learn more in the [Freebuff README](.\u002Ffreebuff\u002FREADME.md).\n\n## Why choose Codebuff\n\n**Custom workflows**: TypeScript generators let you mix AI generation with programmatic control. Agents can spawn subagents, branch on conditions, and run multi-step processes.\n\n**Any model on OpenRouter**: Unlike Claude Code which locks you into Anthropic's models, Codebuff supports any model available on [OpenRouter](https:\u002F\u002Fopenrouter.ai\u002Fmodels) - from Claude and GPT to specialized models like Qwen, DeepSeek, and others. Switch models for different tasks or use the latest releases without waiting for platform updates.\n\n**Reuse any published agent**: Compose existing [published agents](https:\u002F\u002Fwww.codebuff.com\u002Fstore) to get a leg up. Codebuff agents are the new MCP!\n\n**SDK**: Build Codebuff into your applications. Create custom tools, integrate with CI\u002FCD, or embed coding assistance into your products.\n\n## Advanced Usage\n\n### Custom Agent Workflows\n\nCreate your own agents with specialized workflows using the `\u002Finit` command:\n\n```bash\ncodebuff\n\u002Finit\n```\n\nThis creates a custom agent structure in `.agents\u002F` that you can customize.\n\n## Contributing to Codebuff\n\nWe ❤️ contributions from the community - whether you're fixing bugs, tweaking our agents, or improving documentation.\n\n**Want to contribute?** Check out our [Contributing Guide](.\u002FCONTRIBUTING.md) to get started.\n\n### Running Tests\n\nTo run the test suite:\n\n```bash\ncd cli\nbun test\n```\n\n**For interactive E2E testing**, install tmux:\n\n```bash\n# macOS\nbrew install tmux\n\n# Ubuntu\u002FDebian\nsudo apt-get install tmux\n\n# Windows (via WSL)\nwsl --install\nsudo apt-get install tmux\n```\n\nSee [cli\u002Fsrc\u002F__tests__\u002FREADME.md](cli\u002Fsrc\u002F__tests__\u002FREADME.md) for comprehensive testing documentation.\n\nSome ways you can help:\n\n- 🐛 **Fix bugs** or add features\n- 🤖 **Create specialized agents** and publish them to the Agent Store\n- 📚 **Improve documentation** or write tutorials\n- 💡 **Share ideas** in our [GitHub Issues](https:\u002F\u002Fgithub.com\u002FCodebuffAI\u002Fcodebuff\u002Fissues)\n\n## Get started\n\n### Install\n\n**CLI**: `npm install -g codebuff`\n\n**SDK**: `npm install @codebuff\u002Fsdk`\n\n**Freebuff (free)**: `npm install -g freebuff`\n\n### Resources\n\n**Documentation**: [codebuff.com\u002Fdocs](https:\u002F\u002Fcodebuff.com\u002Fdocs)\n\n**Community**: [Discord](https:\u002F\u002Fcodebuff.com\u002Fdiscord)\n\n**Issues & Ideas**: [GitHub Issues](https:\u002F\u002Fgithub.com\u002FCodebuffAI\u002Fcodebuff\u002Fissues)\n\n**Contributing**: [CONTRIBUTING.md](.\u002FCONTRIBUTING.md) - Start here to contribute!\n\n**Support**: [support@codebuff.com](mailto:support@codebuff.com)\n\n## Star History\n\n[![Star History Chart](https:\u002F\u002Fapi.star-history.com\u002Fsvg?repos=CodebuffAI\u002Fcodebuff&type=Date)](https:\u002F\u002Fwww.star-history.com\u002F#CodebuffAI\u002Fcodebuff&Date)\n","Codebuff 是一个开源的 AI 编码助手，通过自然语言指令编辑代码库。其核心功能包括多代理协作机制，能够理解项目结构并精准地进行代码修改与审查，相比单一模型工具提供了更好的上下文理解能力和更少的错误。用户只需简单描述需求如“为我的 API 添加认证”，Codebuff 便能自动定位相关文件、规划修改顺序并执行更改。该工具特别适合需要快速迭代开发或维护大型代码库的场景，尤其是当开发者希望通过自然语言指令来完成复杂的编码任务时。Codebuff 支持 TypeScript，并且可以通过 npm 全局安装后直接在终端中使用。",2,"2026-06-11 03:46:27","high_star"]