A small terminal UI for Devin sessions, built on OpenTUI — the same toolkit that powers opencode.ai.
Kick off a session, watch its events stream in, send messages back, and pop the web view open — without leaving the terminal.
- New sessions — type a prompt, hit Enter, Devin spins up.
- Resume — pick from your most recent sessions.
- Live transcript — events poll every 3s; user / Devin messages render with markdown (bold, italics, code blocks, lists, headings, links).
- Tool calls — shell, file edits, multi-edits, todos, web search, MCP — each as a one-line summary that you can expand to see the full payload (
Ctrl+E). - Sidebar — status, repo, pull requests with state, live todos, tags, ACU usage (with a rough cost estimate at $2/ACU).
- Open in browser —
Ctrl+Ojumps to the session in the Devin web UI. - Optimistic send — your message appears instantly, then dedupes once the API confirms it.
Bun-only (OpenTUI hasn't shipped a Node target yet).
bun install
bun startocdevin reuses credentials from the official Devin CLI:
| Source | Used for | How to get it |
|---|---|---|
cog_… Service User token at ~/.config/devin/config.json (token) |
Everything except creating new sessions | Org admin issues it via the Devin API settings |
Windsurf OAuth token at ~/.local/share/devin/credentials.toml (windsurf_api_key) |
New session creation only — so launched sessions are attributed to you instead of the service user | Run devin login from the official CLI |
Or override either with DEVIN_API_KEY / DEVIN_ORG_ID env vars.
The OAuth token is only used for POST /sessions because the v3 events / messages / get-session routes reject it (403 "This endpoint is not accessible with a Windsurf session token").
| Screen | Key | Action |
|---|---|---|
| Welcome | Enter |
Launch new session |
| Welcome | Shift+Enter |
Newline in prompt |
| Welcome | Ctrl+R |
Open the resume picker |
| Picker | ↑/↓ Enter |
Navigate / pick |
| Picker | Esc |
Back |
| Session | Enter |
Send message |
| Session | Shift+Enter |
Newline in composer |
| Session | Tab |
Switch focus between transcript and composer |
| Session | Ctrl+E |
Expand/collapse all tool payloads |
| Session | Ctrl+O |
Open this session in the Devin web UI |
| All | Ctrl+C |
Quit |
The Devin REST API (v3 + v3beta1) is polled every 3s for new events using the parallel-pagination pattern (/events?first=1 for the total, then Promise.allSettled over /events/details?offset=N&limit=50). Messages render via OpenTUI's <markdown> element with a tree-sitter-markdown highlighter and a small TextMate-style theme; tool events render through a pair of InlineTool / BlockTool helpers modelled on opencode's session route.
Project layout:
src/
index.tsx ← React app, screens, sidebar, tool renderers
devin.ts ← Devin API client + auth resolution
A weekend hack, written in a few hours. Probably has bugs around edge-case event types. PRs and issues welcome.