Skip to content

feat: Omarchy support (verified runtimes, craftbot command, status --json, tui --message) - #538

Draft
zfoong wants to merge 9 commits into
devfrom
feat/omarchy-support
Draft

zfoong wants to merge 9 commits into
devfrom
feat/omarchy-support

Conversation

@zfoong

@zfoong zfoong commented Nov 21, 2026

Copy link
Copy Markdown
Collaborator

What

What Omarchy needs to offer CraftBot under Install > AI and as a default agent, the way it offers OpenClaw (proposal: omacom/omarchy#19610):

  • Verified runtimes. The private Python 3.10 and Node 24 come from releases pinned in app/provision/python_downloads.json and node_downloads.json, checked against each archive's SHA-256 (Node's from its signed SHASUMS256.txt). No release index is fetched any more, by install.py or by the desktop installer, so a rate limit or a mirror cannot change what runs. A cached archive is used only when it matches the pin.
  • A launcher interface. install writes a craftbot command to ~/.local/bin on Linux and macOS (removed by uninstall, and never over a file CraftBot did not write). status --json reports whether CraftBot runs and is ready, its URL, edition, version and roots. install --no-start registers startup without starting the detached process, so a caller can run CraftBot through its systemd unit.
  • tui --message TEXT. The terminal client opens a new chat with that message once the agent can take it: after the first init, and after onboarding when it is still needed.
  • Attaching to the browser edition is a note, not an error. Only craftbot tui reaches a browser-edition backend, on purpose; the old toast told users to restart for the terminal, which would break a web app running on the same CraftBot.
  • A fix found while testing on Arch: resolve() paired Arch's /usr/bin/node (no npm of its own) with another install's npm, which npm_command cannot run, so setup downloaded the sidecar and then resolved the same unusable pair again and never finished. A PATH node is now taken only with an npm it can run.
  • assets/craftbot-mark.svg, a one-colour single-path mark (the mascot's silhouette with the eyes cut out) for icon fonts such as Omarchy's menu font, and every README translation now says the runtimes are pinned.

Why

Omarchy installs only from pinned, verified sources, and its agent launcher needs a command on PATH, a way to know when CraftBot is ready, and a way to hand it a starting prompt. The marketplace review of the CraftBot bar widget flagged the unverified runtime downloads before.

How to test

  • python -m pytest tests/test_python_downloads.py tests/test_node_downloads.py tests/test_craftbot_service.py tests/test_autostart.py tests/test_native_runtime.py tests/install_bootstrap
  • cd app/ui_layer/terminal && npx vitest run && npx tsc --noEmit -p tsconfig.json
  • cd launcher && cargo clippy --release --all-targets -- -D warnings && cargo test --release
  • End to end on Omarchy (done on an Arch/Omarchy machine with a payload built by scripts/package_source.py): unpack the payload to ~/.local/share/craftbot/source, stamp it managed, run python3 craftbot.py install --no-start --no-open-browser, then systemctl --user start craftbot, craftbot status --json until ready, and craftbot tui --message "Reply with just the word OK.".

Screenshots / Logs

$ craftbot status --json
{"running": true, "pid": 156249, "ready": true, "url": "http://localhost:7925", "edition": "browser", ...}

The terminal client attached to that browser-edition CraftBot showed the new note, opened a new chat with the message and got the reply.

🤖 Generated with Claude Code

zfoong and others added 9 commits November 21, 2026 09:35
The installer downloaded the newest python-build-standalone release and
the newest Node 24 from nodejs.org's index, trusting TLS alone. Both now
come from a release pinned in app/provision (python_downloads.json and
node_downloads.json) and are checked against the SHA-256 each release
publishes for its archives (Node's from its signed SHASUMS256.txt), so a
mirror or a compromised download can't change them and resolving the URL
needs no network. A cached archive is used only when it matches the pin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zfoong <tham_yikfoong@outlook.com>
A launcher that starts CraftBot with a prompt (Omarchy's agent key and its
starter prompts) needs the terminal edition to take one. --message opens a
new chat with it once the agent can answer: after the backend's first
init and, when the agent still needs onboarding, after onboarding, so it
never reaches an agent with no model yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zfoong <tham_yikfoong@outlook.com>
…no-start

What a desktop launcher such as Omarchy needs to run CraftBot:

- install writes ~/.local/bin/craftbot on Linux and macOS, which runs this
  install's craftbot.py with its state root; uninstall removes it, and a
  file there CraftBot did not write is left alone.
- status --json says whether CraftBot runs and is ready, where it answers,
  its version and roots, so a launcher opens the UI only once it serves.
- install --no-start registers startup without starting the detached
  process, so a caller can run CraftBot through its systemd unit.
- tui --message passes a starting message to the terminal client.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zfoong <tham_yikfoong@outlook.com>
A single-path, one-colour CraftBot mark: the mascot's silhouette from
mascotPaths.ts as CraftBotMascot.tsx draws it, with the eyes cut out.
Icon fonts that recolour a glyph with the theme (Omarchy's menu font) need
exactly this shape, which the multi-colour logos cannot give.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zfoong <tham_yikfoong@outlook.com>
On Arch, the nodejs package ships node without npm, so the npm on PATH can
belong to another install, such as a version manager's. resolve() took that
pair because both were found, but npm_command cannot run one with the other,
so the Node stage downloaded the sidecar and then resolved the same unusable
pair again: setup never finished. A PATH node is now taken only with an npm
it can run; otherwise the sidecar is used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zfoong <tham_yikfoong@outlook.com>
Only `craftbot tui` reaches a backend of the other edition, and it does so on
purpose: it attaches to the CraftBot already running, which a launcher such
as Omarchy's runs as the browser edition for its web app. The client called
that an error and said to restart for the terminal, which there would break
the web app. It is now a passing note that chats are shared with the browser
and that pages CraftBot makes show only there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zfoong <tham_yikfoong@outlook.com>
The English README was updated with the pinned Python and Node runtimes;
the translations still told readers to trust their mirror for them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zfoong <tham_yikfoong@outlook.com>
The Rust launcher still asked GitHub for the newest python-build-standalone
release and downloaded it unchecked, while install.py now takes only the
release python_downloads.json pins. The launcher reads the same pins: it
downloads that release's archive for this platform and refuses one whose
SHA-256 differs, and no longer fetches a release listing, so the two
install paths agree again and a rate limit cannot stop an install.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zfoong <tham_yikfoong@outlook.com>
Windows' expanduser reads USERPROFILE, not HOME, so the command landed in
the runner's own home and the uninstall test looked for it in vain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: zfoong <tham_yikfoong@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant