Build from source
Build devhost from a checkout of the repository to try unreleased changes or work on devhost itself.
Build a binary
Section titled “Build a binary”just setupjust devhost compile./apps/devhost/bin/devhost --versionjust setup installs the workspace dependencies and Go modules and builds the embedded toolbar. just devhost compile rebuilds the toolbar and writes a binary for your platform to apps/devhost/bin/devhost, stamped with the version in apps/devhost/metadata.json.
To run devhost from source without installing it, use just cli <args>, or just run-ai <args> for agent output. Both run in the directory you call them from. just run starts the repository’s own development stack.
Iterate on the toolbar
Section titled “Iterate on the toolbar”A development build serves the toolbar from its source checkout and rebuilds it when you reload a page, so UI changes show up without rebuilding devhost or restarting the stack.
- Use a development build.
just run,just cli,just run-ai, andjust dev-bootstrap(which replaces thedevhostyour dotfiles install) all record the checkout they were built from. For any other build, setDEVHOST_DEV_SOURCE_DIRto the checkout’s root; a relative path resolves from the manifest’s directory, and the variable wins over a recorded checkout. - Edit files under
packages/devhost-ui/src/devtools/and reload the page. - When those files are newer than the built bundle, devhost rebuilds it, one build at a time, and serves it uncached. Tabs that loaded an earlier build keep working.
- A failed build shows a
DEVHOST COMPILATION ERRORbanner on the page with the details; the next reload tries again.
Changes to Go code need a new binary: rerun just dev-bootstrap, or restart just run, which rebuilds on start.
If DEVHOST_DEV_SOURCE_DIR does not point at a devhost checkout, devhost start fails and names the path. If a development build’s recorded checkout has moved or been deleted, devhost warns at startup and serves the toolbar built into the binary.
A development build also lets chat work on devhost itself; see Chat about devhost itself.