Skip to content

BrokenCode reference

Automate BrokenCode

Use the BrokenCode client and HTTP interfaces to create sessions, inspect projects, work with files, and stream session events.

UPDATED 03 Aug 20265 min readTECHNICAL GUIDE
01

Start from the interface that matches the automation.

Automation surfaces
SurfaceUse it for
CLIScripts, CI tasks, and interactive terminal work
Local serverSession, file, project, and event APIs
BrokenGPT APIOpenAI-compatible inference outside the coding client
02

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 4096
03

Treat 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.

STRAIGHT ANSWERS

Frequently asked questions

01Can I use BrokenCode without the desktop app?

Yes. The terminal client and local server support full project workflows.

02Where is the BrokenGPT inference API documented?

Use the API documentation at /docs and the OpenAPI document at /openapi.json.

Build

Automate a real project session.

Install BrokenCode, start the local server, and connect your application to its event stream.

Get BrokenCode