Loading articleโฆ
Loading 4weirdโฆ
Loading 4weirdโฆ
Loading articleโฆ
DocsTerminal
Docs ยท desktop ยท opencode
The web /terminal runs allow-listed local commands only โ no server exec, no eval. Driving OpenCode is the desktop panel's job: it shells to your installed opencode binary with a working-dir guard, timeout, and stop button.
Web side
The web terminal maps every input to a TypeScript handler โ there is no remote shell behind it. Use it for local power-user commands (help, coin quotes, deterministic seeds); it stays fail-open offline.
opencode binary. For Export / Fix / Heal, move to the desktop panel below.Desktop side
The desktop terminal panel (sibling desktop lane) offers a command input, scrolling output, working-dir picker, and stop button. It spawns headless opencode runs โ it never reimplements the CLI bridge.
Working-dir guard
Runs are rooted at your workspace โ never the repo root, never your home directory.
Timeout + stop
Every run carries a per-run timeout and a stop button; stdout/stderr stream back live.
Fail-open when absent
No binary on PATH? The panel shows the install hint and Export still writes the BUGFIX report.
Command reference
Each verb below maps to one TypeScript handler in the page. Anything not on this list prints help; there is deliberately no passthrough to a shell.
| Command | Local result | Notes |
|---|---|---|
| help | Lists every allowed verb with a one line gloss. | Start here when a guess fails. |
| status | Session flags and bridge reachability summary. | Purely local, works offline. |
| coins | Read-only quote at 100 coins to one dollar. | Predicts cost, writes nothing. |
| luck | Deterministic preview from the seed you pass. | Same seed always replays the same preview. |
| desktop | Fit guidance plus a deep-link to the right desktop tab. | The bridge verb: see the companion guide. |
| whoami / clear / echo | Identity label, screen reset, text repeat. | Utilities with zero side effects. |
Worked example
A realistic split session: price the work where it is cheap (web), spend the budget where it counts (desktop).
coins quote for the expected effort. Note the gross coins and the 75/25 split for your records.desktop opencode in the web terminal, read the printed recipe, then open the desktop app and attach the game workspace. Confirm the status dot turns green.Troubleshooting
Most terminal confusion is a surface mix-up. Match your symptom to the fix before reinstalling anything.
Typed an opencode command on the web page
Expected: the page prints help instead of running it. Move to the desktop panel, which shells to your binary with the workspace guard and timeout.
Desktop panel shows the install hint
Install the CLI, verify opencode --version in a fresh shell, and reopen the app so PATH refreshes. Export still works meanwhile as a hand-runnable report.
Stop button never lights up
No run is active: the button arms only while a headless run streams stdout. Start a Fix first; a lit button with no output means the process is still booting.
Output vanished after clear
History is capped by design on the web side. Re-run status to confirm health, and keep long desktop output in the BUGFIX report instead of scrollback.
FAQ
Offline behavior, history limits, secrets, and why eval stays banned.
Does the web terminal work offline?
Yes for handlers: help, status, coins, luck, and guidance print without a network. Only navigation links need connectivity, since the destination pages load separately.
How much history is kept?
Scrollback is capped so long sessions stay light. Copy durable output into the BUGFIX report or a squad thread before running clear.
Can I paste a secret for debugging?
No. Echo repeats input visibly and there is no vault here. Keep tokens in the shell session that owns the tool, and rotate anything pasted by accident.
Why is eval permanently off the table?
Arbitrary execution would turn a guidance widget into an attack surface. The allow-list plus typed handlers keeps every input predictable, auditable, and safe to link from docs.
Up next
Once the panel is green, the Heal button loops bugtest โ fix โ retest until clean or the budget is spent. The next page covers that loop.