You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+68Lines changed: 68 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -157,6 +157,74 @@ Learn more about the SDK [here](https://www.npmjs.com/package/@codebuff/sdk).
157
157
158
158
**SDK**: Build Codebuff into your applications. Create custom tools, integrate with CI/CD, or embed coding assistance into your products.
159
159
160
+
## Advanced Usage
161
+
162
+
### Custom Agent Workflows
163
+
164
+
Create your own agents with specialized workflows using the `/init` command:
165
+
166
+
```bash
167
+
codebuff
168
+
/init
169
+
```
170
+
171
+
This creates a custom agent structure in `.agents/` that you can customize.
172
+
173
+
### Using Different Models
174
+
175
+
Codebuff supports any model on OpenRouter. Override the default model per task:
176
+
177
+
```typescript
178
+
const result =awaitclient.run({
179
+
agent: 'editor',
180
+
prompt: 'Refactor this function',
181
+
model: 'deepseek/deepseek-chat', // Use DeepSeek for this task
182
+
})
183
+
```
184
+
185
+
### Multi-Agent Orchestration
186
+
187
+
Codebuff's strength is coordinating multiple specialized agents:
188
+
189
+
```typescript
190
+
const result =awaitclient.run({
191
+
agent: 'commander', // The orchestrator agent
192
+
prompt: 'Add authentication to the API - use file-picker to find relevant files, planner to plan changes, editor to make edits, and reviewer to validate',
193
+
})
194
+
```
195
+
196
+
### CI/CD Integration
197
+
198
+
Integrate Codebuff into your CI pipeline for automated code reviews:
199
+
200
+
```bash
201
+
# In your CI script
202
+
codebuff "Review the changes in this PR for security issues"
203
+
```
204
+
205
+
### Environment Variables
206
+
207
+
Configure Codebuff behavior via environment variables:
208
+
209
+
```bash
210
+
# Use a specific OpenRouter API key
211
+
export OPENROUTER_API_KEY=sk-or-v1-xxxx
212
+
213
+
# Set default model
214
+
export CODEBUFF_MODEL=anthropic/claude-3.5-sonnet
215
+
216
+
# Enable debug mode
217
+
export DEBUG=codebuff*
218
+
```
219
+
220
+
### Keyboard Shortcuts (Interactive Mode)
221
+
222
+
-`Ctrl+C` - Cancel current operation
223
+
-`Ctrl+L` - Clear screen
224
+
-`Ctrl+U` - Clear current input
225
+
-`Ctrl+P/N` - Navigate command history
226
+
-`Tab` - Autocomplete
227
+
160
228
## Contributing to Codebuff
161
229
162
230
We ❤️ contributions from the community - whether you're fixing bugs, tweaking our agents, or improving documentation.
0 commit comments