Practical examples and recipes for using Codebot.
task.yaml:
repository_url: https://github.com/user/myproject.git
description: Fix the null pointer exception in UserService.javaRun:
codebot run --task-prompt-file task.yamltask.yaml:
repository_url: https://github.com/user/myproject.git
ticket_id: FEA-456
ticket_summary: add-dark-mode
description: |
Add dark mode support to the application.
Include a toggle in the settings page.
Ensure all existing tests still pass.Run:
codebot run --task-prompt-file task.yamltask.yaml:
repository_url: https://github.com/user/myproject.git
base_branch: develop
description: Backport security fix to develop branchRun:
codebot run --task-prompt-file task.yamlcodebot run --task-prompt '{
"repository_url": "https://github.com/user/repo.git",
"description": "Add README with installation instructions"
}'curl -X POST http://localhost:5000/api/tasks/submit \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"repository_url": "https://github.com/user/repo.git",
"description": "Add dark mode support",
"ticket_id": "FEAT-123"
}'Response:
{
"task_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "pending",
"message": "Task queued successfully"
}curl http://localhost:5000/api/tasks/550e8400-e29b-41d4-a716-446655440000/status \
-H "Authorization: Bearer your-api-key"Response:
{
"task_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "completed",
"submitted_at": "2025-11-03T12:00:00Z",
"started_at": "2025-11-03T12:00:05Z",
"completed_at": "2025-11-03T12:05:30Z",
"result": {
"pr_url": "https://github.com/user/repo/pull/123",
"branch_name": "u/codebot/abc1234/add-dark-mode",
"work_dir": "/path/to/workspace"
}
}curl "http://localhost:5000/api/tasks?status=completed&limit=10" \
-H "Authorization: Bearer your-api-key"- CLI Usage Guide - Learn CLI commands
- HTTP API Guide - API reference
- Webhooks Guide - PR automation