Start from the interface that matches the automation.
| Surface | Use it for |
|---|---|
| CLI | Scripts, CI tasks, and interactive terminal work |
| Local server | Session, file, project, and event APIs |
| BrokenGPT API | OpenAI-compatible inference outside the coding client |
Keep one client close to the project context.
Start the BrokenCode server for local orchestration, then create a client using its URL. Subscribe to events when your application needs live session progress.
- Create and manage sessions.
- Read project and file state.
- Send prompts and receive structured events.
- Open or control the terminal UI.
Local server
brokencode serve --hostname 127.0.0.1 --port 4096Treat errors as typed service outcomes.
Handle authorization, validation, and unavailable-service responses explicitly. Missing inference configuration is an error and never produces a fabricated assistant answer.