Skip to content
DaniFdzPublic

About

HarnessUI — a Lit-based control surface for coding agent harnesses

Resources

Contributing

Security policy

Stars

5 stars

Watchers

0 watching

Forks

Latest commit

 

History

2,739 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HUI — Harness UI. A local, browser-first workspace for your coding agents.

Latest release CI status Nightly build status Node.js 24 or newer Runtime: PI License: MIT

HUI (HarnessUI) is a local, browser-first control surface for coding-agent harnesses. It gives you a focused workspace for sessions, transcripts, models, settings and gateway operations while leaving agent configuration and conversation history with PI.

HUI currently runs with full access. It does not add an approval layer. Conversation history stays with the runtime; browser-local copies are for offline reading only.

Install · Quick start · User guide · Releases · Contributing · Security

Organized sessionsGrouped, searchable sessions with persistent drafts.
Live agent workLive transcripts, streaming status, tool activity and model controls.
A gateway that keeps runningA local gateway that keeps running independently of the browser window.
One place for settingsAppearance, skills, tools, models and workspace settings in one UI.
Interactive widgetsAgents show live, sandboxed HTML/SVG widgets right in the chat, on your theme.
A browser for your agentsA dedicated, headless-by-default browser agents can drive without touching your own browser, with a live preview of its page in the chat (Settings → Tools → Browser).
Desktop appAn Electron window over the same UI and gateway, registered with Spotlight on macOS.
Safe updatesTransactional local updates with verification and rollback support.

See it in action

Kanban

The Dashboard shows what every session is doing and what needs you first; the board puts the same sessions in their stage. Agents move their own cards, a backlog item starts in its own worktree, and every session gets a task progress card.

kanban.mp4

Rich results in the chat

Interactive widgets, a browser the agent drives with a live preview, and GitHub, Slack and Datadog links that unfurl.

integrations.mp4

Work pane

A terminal you share with the agent, and the Diff, Files and VS Code views of what it changed, beside the chat.

workpane.mp4

Subagents and watchers

Parallel reviewers tracked on one card, a goal the conversation keeps pursuing, and a watcher that waits for CI and merges.

subagents.mp4

Bots

Long-lived agents with a face, one chat, a memory and routines they schedule themselves, and a Usage page that reports what all of it cost.

bots.mp4

Bots working together

Agents hand bots their pull requests and get questions back, triggers wake a bot when a page comes in, and bots tag each other.

teamwork.mp4

On your phone

Reach your gateway over Tailscale and check in on your agents, or on everything in flight, from anywhere.

phone.mp4

Install

Requirements:

  • Node.js 24 or newer and npm.
  • Git for source checkouts.
  • Optional: Google Chrome, Brave, Microsoft Edge or Chromium for the agent browser tool, on each machine that runs sessions (a remote worker included). HUI launches it with its own profile; nothing is downloaded. A container with none can get one with npx playwright install --with-deps chromium: HUI finds that Chromium too.

HUI is distributed as npm archives (.tgz), not through the public npm registry.

Stable release

Download the .tgz archive and matching .sha256 file from the latest GitHub Release, then verify and install it globally:

mkdir -p ~/Downloads/hui-release
cd ~/Downloads/hui-release
sha256sum --check hui-*.tgz.sha256  # macOS: shasum -a 256 --check
npm install --global --prefix ~/.local ./hui-*.tgz

Current main build

From a checkout of this repository, when testing unreleased work:

npm ci
npm pack
npm install --global --prefix ~/.local ./hui-*.tgz

This installs the current source commit. It is a development build, not a stable update channel.

Nix and the desktop app

On Linux, the flake builds the web and desktop packages and provides a NixOS service module; Nix supplies Node.js itself. See Nix and NixOS. On macOS, a global npm install also registers ~/Applications/HUI.app for Spotlight and the Dock; see Desktop app.

Quick start

export PATH="$HOME/.local/bin:$PATH"
hui gateway start
hui ui

Then open Settings → Models to connect a provider (details) and start a session.

Previously opened conversations can be read offline once HUI has prepared its files. Drafts stay on your device and are never sent automatically. Offline reload needs HTTPS or localhost, not a plain-HTTP tailnet address. See offline reading.

Useful lifecycle commands:

hui gateway status
hui gateway restart
hui gateway logs --lines 100
hui gateway stop
hui desktop          # open the desktop app instead of a browser tab

hui gateway logs prints the tail of the private gateway.log: gateway start-up plus every warning and error with its redacted cause, including failures the browser reported, across restarts. Settings → Logs shows the running gateway's entries, and Export diagnostics saves them as JSON.

Tab completion for bash and zsh covers every command and flag, because the program asks the CLI instead of keeping its own list. A global npm install (and the Nix package) writes it where each shell finds it; if you installed another way, add one line:

# bash: ~/.bashrc
eval "$(hui completion bash)"

# zsh: ~/.zshrc, after compinit
eval "$(hui completion zsh)"

See shell completion.

Remote workers (Settings → Workers) can be managed from a terminal too, through the running gateway. A new worker connects at once; edit changes only the fields given (a new command applies on the next connect), and --extra-path, repeatable, replaces the list:

hui workers list
hui workers add --name devbox --command "ssh -o BatchMode=yes devbox"
hui workers edit devbox --extra-path ~/.pi/agent/mcp.json
hui workers remove devbox

Scheduled tasks (Automations) work from a terminal too: a prompt HUI sends a session or a bot's chat on a schedule (hui schedules is the same command). <schedule> is an id or an exact name and <session> a session's id or exact title; edit changes only the flags given, and --until/--runs make a temporary schedule that HUI deletes after either:

hui schedule list [--bot <bot> | --session <session>] [--json]
hui schedule show <schedule> [--json]
hui schedule add --name <name> --prompt <text> (--at <ISO time> | --every <duration> | --cron <expr> [--timezone <tz>])
                 (--bot <bot> | --session <session>) [--description <text>] [--timeout <seconds>]
                 [--until <ISO time>] [--runs <n>] [--disabled] [--json]
hui schedule edit <schedule> [same flags as add] [--json]   # --bot/--session move it; --until "" / --runs "" clear them
hui schedule pause|resume|run|remove <schedule> [--json]

Bots are named agents with one forever chat each, whose memory never needs clearing. The sidebar's Agents | Bots switch shows them. A new bot starts by asking what you expect from it, then writes its persona (SOUL.md) itself; they can run routines, schedule their own (temporary ones end by themselves) and message one another. Everything the Bots tab does works from a terminal too, through the running gateway (hui bots is the same command). <bot> is an id, a handle or an exact name:

hui bot list [--archived] [--json]
hui bot show <bot> [--json]
hui bot add [--name <name>] [--title <text>] [--soul-file <path|->] [--cwd <dir>]
            [--model <provider/model>] [--thinking <level>] [--utility-model <provider/model>] [--emoji <e>]
            [--shape <shape>] [--ears <ears>] [--color <name|#rrggbb>] [--language <code>] [--call-voice <voice>] [--json]
hui bot edit <bot> [same flags as add but --soul-file] [--json]  # --model "" / --thinking "": back to the defaults; --language "": Auto; --call-voice "": Settings' voice
hui bot import <file|folder|url|-> [--worker <name|id>] [--agent <name>] [--yes] [--json]  # another platform's template
hui bot export <bot> [--out <file>] [--memory] [--yes] [--json]   # <handle>.hui-bot.zip, which import reads back
hui bot soul <bot> [--file <path|->] [--json]   # print SOUL.md, or replace it (empty: ask again)
hui bot tools <bot> [--allow <a,b>] [--deny <a,b>] [--json]   # every tool is on until you turn it off
hui bot skills <bot> [--allow <a,b>] [--deny <a,b>] [--json]
hui bot remove <bot> [--json]          # archives: its chat and memory are kept
hui bot restore <bot> [--json]
hui bot delete <bot> [--yes] [--json]  # for good: its chat leaves HUI; routines, memory and folder go
hui bot chat <bot>                     # streamed plain text; works over SSH
hui bot send <bot> <message|-> [--wait] [--timeout <seconds>] [--json]
hui bot stop <bot> [--json]
hui bot memory <bot> [--zoom <id+n>] [--html <file>] [--json]
hui bot routine list <bot> [--json]
hui bot routine add <bot> --name <name> --prompt <text> (--at <ISO time> | --every <duration> | --cron <expr> [--timezone <tz>]) [--json]
hui bot routine run <bot> <routine>
hui bot routine remove <bot> <routine> [--json]

See Bots for their soul, their tools and skills, what they remember, how routines and bot-to-bot messages work, calls with GPT-Live, importing and exporting bots (Grok Bot, OpenClaw, Claude Code, Letta, character cards, CrewAI), and the exit codes of send --wait.

On a headless host, use hui ui --no-open to print the URL without opening a browser. hui browser is an alias for hui ui, and hui browser cookies import <file> gives the running gateway a login another browser exported (a Playwright storageState document or a list of cookies), named by its absolute path, to hand to the managed browser. The development launcher is separate from an installed production gateway.

Updates

hui update --check
hui update
hui update --nightly          # the latest validated main commit
hui update --from /path/to/hui-next.tgz --sha256 <expected-sha256>
hui update --rollback
hui update --force            # replace a busy or unresponsive gateway

--nightly installs the build CI publishes for each main commit, from the rolling nightly prerelease. The badge above and the Nightly workflow show whether the current main commit passed its checks and published. Run it again to follow main; a plain hui update brings you back to stable once a newer stable release ships.

From the chat, /update opens the update flow in a dedicated HUI update session under OTHER. The command stays in the composer and is never sent to the model, so a failed update can be inspected and retried. Updates are verified before activation, only run against an idle gateway, and keep the previous release available for rollback. --force installs anyway, interrupting active sessions and terminals and replacing a gateway that cannot answer, so a wedged gateway never needs pkill. Nix installations update through Nix instead.

After an update, run hui doctor. It reports state the new version needs changed, such as sessions still on PI's worker, and hui doctor --fix changes it while the gateway is stopped. See the guide.

How it fits together

  • The gateway is a standalone local Node server. It owns HUI's session registry, settings and updates, and keeps sessions running when no window is open.
  • The browser UI and the desktop app render the same Lit application and talk to the gateway over its local API.
  • PI is the runtime backend. It owns agent configuration, skills, models and conversation transcripts.
  • The agent browser is a separate Chromium-family profile the gateway drives for agents over a private DevTools pipe.

Built with Vite, Lit, TypeScript and plain CSS with a shared design-token layer. The application lives in src/; the local API and runtime adapters live in server/.

Security and data

The gateway binds to loopback by default and has no user authentication. If you need access from another device, explicitly bind to a trusted Tailscale address or use an SSH tunnel:

hui gateway start --host tailnet

To put a reverse proxy such as tailscale serve in front of the loopback gateway instead, see Remote access. Keep the tailnet ACL tight. The browser's x-hui header is anti-CSRF, not an authentication mechanism.

HUI stores settings, its session registry, the Pi Durable session store and update metadata under $XDG_CONFIG_HOME/hui and $XDG_DATA_HOME/hui. PI continues to own agent configuration and the transcripts of sessions still on its worker.

The agent browser keeps its cookies and logins in $XDG_CONFIG_HOME/hui/browser/profile, separate from your personal browser profile. HUI controls it over a private DevTools pipe, so no debugging port is opened.

Please report security issues privately as described in SECURITY.md.

Documentation

Goal Start here
Install with Nix or run the NixOS service Nix and NixOS
Use the desktop app and Spotlight Desktop app
Connect model providers Model providers
Reach the gateway through a proxy Remote access
Run bots, their routines and memory Bots
Write a gateway extension What an extension can do
Understand the product and its contracts SPEC.md · Browser/server API
Contribute or cut a release CONTRIBUTING.md

Develop

All changes land on main through a reviewed pull request; never push main directly. Use a feature branch and the Vite development loop:

git switch main
git pull --ff-only
git switch -c feat/my-change
npm ci                         # first setup or after dependency changes
npm run dev                    # starts the Vite server and prints its URL; opens no window
npm run desktop                # build and open the Electron app against the managed gateway

Before handoff:

npm test
npm run typecheck
npm run build
npm run test:package

Then push the branch and open a pull request with gh pr create. See CONTRIBUTING.md for the pull request rules, the release workflow and the installed-package test loop.

License

HUI is available under the MIT License. Third-party attributions are listed in THIRD_PARTY_NOTICES.md.

About

HarnessUI — a Lit-based control surface for coding agent harnesses

Resources

Contributing

Security policy

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages