Skip to content

Reference

Brompter CLI

Script a running Brompter engine from the shell. `devchat ask` sends one prompt and prints the reply.

The devchat binary ships with the Rust engine. Start the engine first. The CLI talks to that process over loopback HTTP and prints the result. devchat --help lists every command.

Connect

The engine writes control-endpoint.json when it binds. The file holds url and token, and only the owner can read it. The CLI looks for the engine in this order:

  1. DEVCHAT_URL or DEVCHAT_ENGINE_URL, with DEVCHAT_AUTH_TOKEN when the engine expects a bearer token.
  2. The file named by DEVCHAT_CONTROL_ENDPOINT.
  3. DEVCHAT_DATA_DIR/control-endpoint.json.
  4. ~/.devchat-desktop/control-endpoint.json.
  5. http://127.0.0.1:8787 when nothing else is set.

Output

Add --json to print the engine’s JSON. Without it, a reply that has a text field prints that text. Other replies print the JSON value. devchat ask returns {session_id, text}.

Ask

shell
devchat ask --text "Summarize the diff" --agent cursor --json

Ask opens a session titled CLI, sends the prompt, and waits for the assistant reply. The wait can run for up to 30 minutes. Other commands time out after 30 seconds. --agent is claude, codex, cursor, or gemini. Leave it off to use the engine default.

Worktrees

  • worktree list and worktree ps list git worktrees. worktree current picks the one whose path contains the shell’s working directory.
  • worktree create --name <branch> adds a worktree. --path is optional and must stay relative to the workspace. The name is a branch token: letters, digits, -, _, and /.
  • worktree rm --path <relative> removes that worktree.

Terminals

  • terminal list lists the engine’s PTY sessions.
  • terminal create can take --cwd, --command, and --title. A command is launched in the new session. A title renames it.
  • terminal read --terminal <id> prints the session. terminal send writes --text, and --enter submits the line. terminal close stops it.

Files and the browser

File and browser commands are delivered to the open Brompter window. The window opens the file, shows the diff, or navigates. Snapshot, click, fill, screenshot, and device profile are the same kind of command: the window applies them. Paths must be workspace-relative. A leading slash or .. is rejected. goto accepts an http:// or https:// URL.

shell
devchat file open src/App.tsx
devchat file diff src/App.tsx
devchat goto --url https://example.com
devchat snapshot
devchat click --element @e3
devchat fill --element @e1 --value "user@example.com"
devchat screenshot
devchat set device --name "iPhone 12"

Automations and skills

Automations are the engine’s schedules. automations list lists them. automations create needs --name and --prompt. --cron defaults to 0 9 * * *. automations run <id> starts one now. skills list lists the skills the engine can see. The same routes are on the HTTP API page.