Skip to content

Installation ​

Install the Hapimatic open-source core on your own Linux machine, check that it is ready, and set up the server.

If an operator has already set up a Hapimatic Cloud VM for you, you do not need this page: start with the Cloud User Quickstart.

Prerequisites ​

  • 64-bit Linux (x86-64 or ARM64) with systemd. macOS is planned. Windows and WSL2 follow later.
  • Command-line tools: git, python3, jq, and curl (or the GitHub CLI, gh).
  • tmux (recommended). The tmux launcher needs it, and the doctor warns when it is missing.
  • Claude Code, installed. The installer's doctor requires it even if you plan to use another agent CLI; Install Claude Code shows how, including on a remote machine. You sign your Claude account in to Hapimatic after the server is running, under Settings → Provider Accounts → Add account.
  • Any other supported agent CLI you want to use, installed and signed in with your own account. See Supported agent CLIs.

The doctor checks the command-line tools, tmux and the Claude Code CLI, and names anything that is missing. It does not check the operating system, the processor type or systemd, or the other three agent CLIs. Run before the install, it also reports hapi itself as missing and exits with an error; that is expected.

Supported agent CLIs ​

Hapimatic runs Claude Code, Codex, Gemini CLI and OpenCode. Each one is the provider's own, unmodified program, which you install and sign in to yourself. All four are supported at launch:

Agent CLIStatusHow it signs in
Claude CodeCertified on Linux.Your Claude subscription, signed in under Settings → Provider Accounts → Add account, or a workspace-scoped Anthropic API key that you add there too. See API key billing.
CodexQualification pending.Codex's own sign-in (codex login), or an OpenAI API key.
Gemini CLIQualification pending.A Google AI Studio or Vertex AI API key only — never the Gemini CLI's own Google sign-in.
OpenCodeQualification pending.An API key for the model provider you use with OpenCode.

You sign in to each agent CLI with your own account or API key, and each provider's own terms and usage limits apply to your accounts. For Gemini CLI and OpenCode sessions that you start from the web app, add the key in Provider API Keys under Settings → Provider Accounts and choose its provider there; for Gemini CLI, GEMINI_API_KEY set in the environment you start the daemon from also works. A session you start from a terminal (hapi gemini, hapi opencode) runs the agent CLI with that terminal's environment.

Restarting the Hapimatic background service (the daemon), with hapi daemon stop and then hapi daemon start, does not end running Claude Code sessions, and neither does restarting hapi server: the sessions keep running and stay connected to the web app. tmux persistence, which is off by default, does not decide whether sessions survive; it decides whether the restarted daemon takes them back. With it off, the restarted daemon leaves the running sessions alone and does not count them in hapi daemon status. With HAPI_TMUX_PERSISTENCE=true set in the environment you start the daemon from, the Claude Code sessions the daemon starts (the ones you start from the web app) run inside tmux, and the restarted daemon takes them back. The daemon then saves the setting in ~/.hapi/settings.json and keeps it on at later starts, even without the variable; to turn it off, delete tmuxPersistenceEnabled from that file and restart the daemon.

The installer's doctor currently treats the Claude Code CLI (claude) as required: if you use only Codex, Gemini CLI or OpenCode, it reports claude as missing. The install itself still completes.

Install Claude Code ​

Install the Claude Code CLI with Anthropic's installer:

bash
curl -fsSL https://claude.ai/install.sh | bash

Hapimatic sessions do not use a sign-in you make with claude in a terminal: that login, in ~/.claude, is for terminal claude only. Each Claude account runs Hapimatic sessions from its own folder, and you add it in the web app. Once the server and the daemon are running (see Server setup), open Settings → Provider Accounts → Add account, choose Claude, and follow the sign-in. Until an account is signed in there, a new Claude session does not start: it reports that no Claude account can run it and names the same page.

Machine requirements ​

Hapimatic's session load tests measured these figures:

MinimumRecommended
CPUs24
Memory8 GB16 GB
Disk40 GB50 GB
Open sessions612

Minimum is the smallest machine Hapimatic supports. A machine with 1 CPU and 4 GB of memory is below it: Hapimatic allows it 4 open sessions and suggests 3, and in the test it slowed sharply as soon as a second session ran repository tools beside the first. On a machine below the minimum, the installer's doctor prints a machine spec warning. The warning does not stop the install, and Hapimatic still runs, but fewer sessions run reliably. For this warning, the doctor checks your CPUs, your memory, and the size of the filesystem that holds your home folder. In a container, it uses the container's CPU and memory limits.

Recommended is the machine to choose for regular use: it kept 13 sessions healthy under the same workload, and Hapimatic suggests 12, twice the minimum's 6.

Open sessions are counted per Hapimatic instance (one server and its background service). Each session in the test ran Claude Code with two MCP servers, Playwright and sequential-thinking, and took about 350 MB of memory. The counts in the table are the sessions that stay healthy while a third of them run builds in a loop, with about 20 seconds between builds, and another third run repository tools. That mix is deliberately heavy; sessions that build only now and then leave more headroom. Hapimatic also sets a ceiling on open sessions: 12 on the minimum machine and 28 on the recommended one. An open session keeps its memory whether or not it is working, so the ceiling counts idle sessions too.

On your own machine, Hapimatic works out both numbers from that machine's memory and CPUs. The suggested number is the smaller of (memory − 1.5 GB) ÷ 768 MB and 3 per CPU. The ceiling is the smaller of (memory − 1.5 GB) ÷ 512 MB and 17 per CPU, and never more than 50. Hosted Hapimatic Cloud VMs use fixed numbers for each tier instead (lite 2 and 4, standard 6 and 12, pro 12 and 19); a machine you install yourself does not. A language server adds to each session: TypeScript's held about 1.1 GB per session on Hapimatic's own repository. If your sessions use one, expect fewer sessions, and set a lower limit in Preferences.

Disk is a base of about 8.4 GiB, plus about 0.75 GiB for each open session, rounded up to the next 10 GB. The base covers the operating system and Hapimatic, plus one working copy of the test project (Hapimatic's own repository) with its dependencies installed. Each session's share is one more working copy of that project with its dependencies; smaller projects need less. The table's disk figures leave room beyond the session ceilings above. These figures count open sessions only. An archived session keeps its working copy on disk, so each one you keep adds the same 0.75 GiB. In an earlier test, the minimum machine went past 40 GB with 8 sessions open, because 33 archived sessions were still on disk. Deleting an archived session frees its space: Hapimatic keeps a deleted session's working copy for 10 days, then removes it the next time a new session with its own working copy starts in that project.

The figures were measured on 64-bit ARM Linux:

PlatformSupport in version 1Figures
Linux, ARM64, with systemdSupportedMeasured (Ubuntu 24.04)
Linux, x86-64, with systemdSupportedThe same figures, not measured
macOS (Apple silicon)PlannedNone yet (not tested)
Windows (WSL2 or native)Not supported; follows laterNone (not tested)

One suggested setup: a Raspberry Pi 5 with 16 GB of RAM, booting from an NVMe SSD on an M.2 HAT, with the active cooler. It is the setup Hapimatic runs on every day, and it is one choice among many: any 64-bit Linux machine with systemd that meets the minimum above can run Hapimatic.

Install ​

One command installs Hapimatic:

bash
curl -fsSL https://github.com/SolidPD/hapimatic-core/releases/latest/download/install-hapimatic-v1.sh | bash

The installer:

  1. checks your machine with the doctor and lists anything that is missing;
  2. downloads the hapi program for your machine and verifies it against the release's checksums.txt;
  3. installs it as ~/.local/bin/hapi and adds ~/.local/bin to your PATH in your shell's startup files (~/.profile and ~/.bashrc for bash, ~/.zprofile and ~/.zshrc for zsh), between marker lines it can find again;
  4. downloads the toolkit core tier into ~/.hapi/claude-toolkit, checks that the toolkit tag resolves to the commit the installer pins (it stops if it does not), and copies it into ~/.claude/, Claude Code's configuration directory;
  5. records what it installed in ~/.hapi/install-hapimatic.json.

Open a new shell afterwards so that hapi is on your PATH.

To preview the install without changing anything, pass --dry-run:

bash
curl -fsSL https://github.com/SolidPD/hapimatic-core/releases/latest/download/install-hapimatic-v1.sh | bash -s -- --dry-run

The preview lists the hapi install, the toolkit steps and the install record. It does not run the doctor, and it does not yet list the PATH lines from step 3.

The same script also runs the doctor, updates Hapimatic and uninstalls it. To keep a copy for those, download it and run it from the folder you saved it in:

bash
curl -fsSLO https://github.com/SolidPD/hapimatic-core/releases/latest/download/install-hapimatic-v1.sh
bash install-hapimatic-v1.sh

Verify the download ​

Every file in a Hapimatic release, the installer included, carries a build-provenance attestation from the public release workflow. Checking it proves that the file you downloaded was built by that workflow from the public source of that release's tag, and not replaced afterwards. It does not review the code itself.

The check needs the GitHub CLI signed in (gh auth login), because gh attestation verify reads the attestation through the GitHub API. Download the installer from the latest release, verify it, and run it only if the check passes (the && stops at the first failing step):

bash
TAG=$(gh release view --repo SolidPD/hapimatic-core --json tagName -q .tagName) &&
gh release download "$TAG" --repo SolidPD/hapimatic-core --pattern install-hapimatic-v1.sh --clobber &&
gh attestation verify install-hapimatic-v1.sh --repo SolidPD/hapimatic-core \
  --signer-workflow SolidPD/hapimatic-core/.github/workflows/release.yml \
  --source-ref "refs/tags/$TAG" --deny-self-hosted-runners &&
bash install-hapimatic-v1.sh

The same gh attestation verify command checks a downloaded hapi-<os>-<arch>.tar.gz archive. The installer itself checks the archive against the release's checksums.txt, and checks the toolkit against its pinned commit.

What gets installed ​

  • The open-source core: one program, hapi, which contains the server, the web app, the command line and the background service (the daemon) that starts sessions. It is licensed under AGPL-3.0, and its source is the hapimatic-core repository. On first run it unpacks its bundled tools into ~/.hapi/runtime/.
  • The toolkit core tier: the guidance files, generated settings and hook dispatcher that shape how agent sessions behave. It is licensed under MIT and comes from the hapimatic-toolkit repository; its README explains what it adds to ~/.claude/ and how that works.

The Hapimatic Pro plugin packs are not part of this install.

Check your machine: the doctor ​

With a saved copy of the installer:

bash
bash install-hapimatic-v1.sh doctor

Without one:

bash
curl -fsSL https://github.com/SolidPD/hapimatic-core/releases/latest/download/install-hapimatic-v1.sh | bash -s -- doctor

The doctor prints one line per check, marked [ OK ], [WARN], [MISS] or [info]. It exits with an error only when a required item is missing: the hapi program, git, python3, jq, the Claude Code CLI (claude), or a downloader (curl or gh). The installer runs the same checks first, but only as a report: it lists anything missing and installs anyway. The other lines never make the doctor exit with an error:

  • the toolkit core tier and its version;
  • tmux;
  • where Hapimatic sessions get their Claude accounts (Settings → Provider Accounts), whether an ANTHROPIC_API_KEY is set, and an information line when a Gemini API key is set;
  • the machine spec line, which compares your CPUs, memory and disk with the minimum;
  • the four portable machine conventions, each with its fix;
  • uv and pytest, which only the hook test suite uses;
  • bun and gitleaks, which only building and maintaining Hapimatic from source use (information only).

It reads no credential file and prints no secret value.

Update ​

Run the installer again, with the same command you installed it with:

bash
curl -fsSL https://github.com/SolidPD/hapimatic-core/releases/latest/download/install-hapimatic-v1.sh | bash

It downloads the latest hapi release and replaces the installed copy only if it differs; anything already current is left unchanged, so it is safe to repeat. The toolkit core tier stays at the version the installer pins (v1.2.0) from installer 1.7.0 on, and a re-run checks the fetched toolkit against the pinned commit before it changes the checked-out files in ~/.hapi/claude-toolkit. To move it to another release, run the installer with --toolkit-tag <tag>; v1.0.0, v1.1.0 and v1.2.0 are checked against their commits, and any other tag installs with a warning that it was not verified. v1.0.0 and v1.1.0 do not have the lint-on-write change described below.

Updating from toolkit v1.0.0. Installers before 1.7.0 install toolkit v1.0.0, which links its files into ~/.claude/; v1.2.0 copies them. A re-run with installer 1.7.0 or later replaces those links with copies and adds the file the new release ships. A saved copy of the installer keeps installing the toolkit release it shipped with, so download the installer again (or use the command above) and check that the first line it prints reads install-hapimatic v1.7.0 or later. Then check these:

  • lint-on-write 2.0.0 runs ESLint only in a project root you list in ~/.claude/lint-on-write-trusted-roots.txt, so until you list one, no JavaScript or TypeScript file is linted. The toolkit README explains the file and what listing a root trusts.
  • An edit you made to a toolkit file through its link is in the toolkit tree, ~/.hapi/claude-toolkit (or under $HAPI_HOME if you set it). When the new release changes that file, the re-run stops and says so: see what is in the way with git -C ~/.hapi/claude-toolkit status --short, save every edit with git -C ~/.hapi/claude-toolkit diff > <file>, then discard the edits with git -C ~/.hapi/claude-toolkit checkout -- ., which discards every edit in the tree, and run the installer again. When the new release does not change that file, the edit is carried into the installed copy.
  • A file the toolkit did not write is never replaced without asking. In a terminal, also when you pipe the installer into bash, you are asked whether to keep, replace, skip or compare it; with no terminal (over ssh without -t, from cron or CI, or from an agent session) it is skipped. The installer's summary line counts what it left unchanged, and a file left there keeps its old content: an old hooks/lint-on-write.py, for example, keeps the unfixed hook. The installer and the doctor warn about each hook under ~/.claude/hooks that is not the toolkit's version, and the warning names the file and the command that replaces it.

To go back to v1.0.0 after a later release, uninstall first: v1.0.0 does not have the lint-on-write change, and without the uninstall its installer asks about each of the 44 copies in a terminal and skips them without one.

Then restart the server and the daemon so that they run the new version. If they run as systemd user services (see Keep the server running), run systemctl --user restart hapimatic-server hapimatic-daemon. Otherwise, stop hapi server (Ctrl+C in its terminal) and start it again, and run hapi daemon stop, then hapi daemon start. Running Claude Code sessions keep running through the restart, on the version they started with; start a new session to use the new version.

Uninstall ​

Before you uninstall, stop the daemon (hapi daemon stop) and the server (Ctrl+C in the terminal running hapi server), especially before --purge, which deletes the database the server has open.

If they run as systemd user services (see Keep the server running), stop and remove the services instead. The uninstaller does not know about them, and once it has removed hapi, they would keep trying to start it:

bash
systemctl --user disable --now hapimatic-daemon hapimatic-server
rm ~/.config/systemd/user/hapimatic-server.service ~/.config/systemd/user/hapimatic-daemon.service
systemctl --user daemon-reload

If no other service of yours needs to run while you are logged out, also turn lingering off with sudo loginctl disable-linger "$USER".

Then run the uninstaller:

bash
bash install-hapimatic-v1.sh uninstall

Without a saved copy, pipe the installer to bash -s -- uninstall, as for the doctor.

This removes ~/.local/bin/hapi, the marked PATH lines from your shell startup files, ~/.hapi/runtime/ and the install record, and runs the toolkit's own uninstaller, which removes what it installed into ~/.claude/. It keeps your Hapimatic home directory (~/.hapi, or $HAPI_HOME if you set it), which holds your access token and session database. To remove that as well:

bash
bash install-hapimatic-v1.sh uninstall --purge

WARNING

--purge deletes your access token and every recorded session. It cannot be undone.

Server setup ​

The server can be deployed on:

  • Local desktop (default) - Run on your development machine
  • Remote server - Deploy on a VPS, cloud server, or any machine with network access

Start the server:

bash
hapi server

The server listens on port 3006 on every network interface (*:3006 in ss -ltn), so any device that can reach this machine can load the sign-in page. The web app's files and a few status endpoints (/api/health, /api/version) answer without a token; everything else needs the access token. On this machine, open http://localhost:3006. To use another port, set WEBAPP_PORT. From another device, see Remote access, and read the Security notes before you open the port to the internet.

On first run, the server generates a secure access token, prints it, and saves it to ~/.hapi/settings.json. The installer has already created ~/.hapi/.

Keep the server running ​

hapi server stops when its terminal closes, and neither it nor the daemon (hapi daemon start) starts again after a reboot. To keep both running and bring them back after a reboot, run them as systemd user services.

First stop any copy you started by hand: press Ctrl+C in the terminal running hapi server, and run hapi daemon stop. Then create ~/.config/systemd/user/hapimatic-server.service:

ini
[Unit]
Description=Hapimatic server

[Service]
Environment=PATH=%h/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
ExecStart=%h/.local/bin/hapi server
Restart=on-failure
RestartSec=5

[Install]
WantedBy=default.target

and ~/.config/systemd/user/hapimatic-daemon.service:

ini
[Unit]
Description=Hapimatic daemon
After=hapimatic-server.service
Wants=hapimatic-server.service

[Service]
Environment=PATH=%h/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
KillMode=process
ExecStartPre=/bin/sh -c 'for i in 1 2 3 4 5 6 7 8 9 10; do curl -sf http://localhost:3006/api/health >/dev/null && exit 0; sleep 1; done; exit 1'
ExecStart=%h/.local/bin/hapi daemon start-sync
Restart=on-failure
RestartSec=5

[Install]
WantedBy=default.target

Turn them on, and let them run without you logged in:

bash
systemctl --user daemon-reload
systemctl --user enable --now hapimatic-server hapimatic-daemon
sudo loginctl enable-linger "$USER"

Without enable-linger, your user services stop when you log out and do not start at boot. The PATH line lets both services find the agent CLIs in ~/.local/bin, where the Claude Code and Codex installers put them: systemd's own PATH leaves that directory out, so without the line the daemon cannot start a Codex session. An Environment=PATH= line replaces your user services' PATH rather than adding to it, so it also lists the usual system directories, including /snap/bin for tools installed with snap. Run systemctl --user show-environment | grep '^PATH' first: if it shows other directories (as NixOS does, or a ~/.config/environment.d file you added), add them to the line too. If you install an agent CLI after the services are running, restart them. KillMode=process makes a daemon restart stop only the daemon, so running sessions keep running (see Supported agent CLIs). The daemon's health check uses curl, so install it if you chose gh as your downloader. To use another port, add Environment=WEBAPP_PORT=<port> to the server unit, and Environment=HAPI_SERVER_URL=http://localhost:<port> plus that port in the health check to the daemon unit: the daemon finds the server through HAPI_SERVER_URL, not WEBAPP_PORT.

Once systemd runs them, start, stop and restart both with systemctl --user (for example systemctl --user restart hapimatic-server hapimatic-daemon), not with hapi daemon start and hapi daemon stop: hapi daemon stop ends the daemon cleanly, so systemd does not start it again, and hapi daemon start then starts a copy that systemd does not manage. The services also do not see variables you export in your shell. Put any setting the server reads from its environment (see the environment variables below and Telegram setup) in the server unit as an Environment= line. A setting the daemon reads, such as GEMINI_API_KEY or HAPI_TMUX_PERSISTENCE, goes in the daemon unit, and a HAPI_HOME or CLI_API_TOKEN you set goes in both. For a secret such as TELEGRAM_BOT_TOKEN or GEMINI_API_KEY, add EnvironmentFile=%h/.config/hapimatic/hapimatic.env under [Service] in the unit that reads it (the server unit for TELEGRAM_BOT_TOKEN, the daemon unit for GEMINI_API_KEY; both units may load the same file), write the file as plain NAME=value lines with no export (systemd skips a line that starts with export), and make it readable only by you with chmod 600.

Read the access token with jq -r .cliApiToken ~/.hapi/settings.json, and the logs with journalctl --user -u hapimatic-server and journalctl --user -u hapimatic-daemon.

For a quick test, tmux also keeps the server running after you log out, but not after a reboot:

bash
tmux new -d -s hapimatic 'hapi server'
Config files
~/.hapi/
├── settings.json           # Main configuration, including the access token
├── hapi.db                 # SQLite database (server)
├── daemon.state.json       # Daemon process state
├── logs/                   # Log files
├── claude-toolkit/         # The toolkit core tier (installer)
├── runtime/                # Tools that hapi unpacks on first run
└── install-hapimatic.json  # What the installer installed
Environment variables
VariableDefaultDescription
CLI_API_TOKENAuto-generatedShared secret for authentication
HAPI_SERVER_URLhttp://localhost:3006Server URL for CLI
WEBAPP_PORT3006HTTP server port
HAPI_HOME~/.hapiConfig directory path
DB_PATH~/.hapi/hapi.dbDatabase file path
CORS_ORIGINS-Allowed CORS origins

CLI setup ​

If the server is not on localhost, set these before running hapi:

bash
export HAPI_SERVER_URL="http://your-server:3006"
export CLI_API_TOKEN="your-token-here"

Or use interactive login:

bash
hapi auth login

hapi api, hapi capabilities and hapi federation use the saved token only for a server on this machine (HAPI_SERVER_URL unset or a loopback address). For a remote server, set CLI_API_TOKEN.

Authentication commands:

bash
hapi auth status
hapi auth login
hapi auth logout

Each machine gets a unique ID stored in ~/.hapi/settings.json. This allows:

  • Multiple machines to connect to one server
  • Remote session spawning on specific machines
  • Machine health monitoring

Portable machine conventions ​

Hapimatic's issue workflow and escalation plugins rely on four per-machine conventions. Each is resolved via $HOME — no machine-specific absolute path is ever baked in — so a checkout behaves identically on any machine. None of the four is required to run a session; a fresh machine spawns sessions without them. They gate the issue workflow (committing, escalation, pre-commit gates, GitHub operations), so the open-core installer's readiness doctor reports each as a non-fatal line with a fix rather than a hard install failure:

bash
bash install-hapimatic-v1.sh doctor

Git identity (G1) ​

Every skill that commits needs a git identity. The doctor reads it from git config at any scope (and prints --show-origin so an inherited identity is visible); it never reads it from ~/.config/hapimatic/env — that file is the Anthropic credential store, not an identity source. If user.name or user.email is unset, the doctor reports git identity: unset with the fix:

bash
git config --global user.name "Your Name"
git config --global user.email "you@example.com"

Nothing commits silently as an unknown identity. If git cannot parse one of its config files, or refuses to run in the current repository, the identity and hooks lines name the error instead of reporting a false state.

Secrets file (G4) ​

The escalation and issue-workflow plugins (notify-pm, the inbox poller, …) read their API secrets from ONE per-user location, resolved via $HOME through a single shared helper, resolve_hapimatic_secrets, which tries these candidates in order:

  1. $HAPIMATIC_SECRETS_FILE — explicit override
  2. $HOME/.config/hapimatic/secrets.env — the recommended home, alongside Hapimatic's other per-user config
  3. $HOME/.bashrc.d/99-api-secrets.sh — the operator-provisioning delivery path

When none of the candidates exists, the helper prints a loud but non-fatal message to stderr naming every path it tried, then returns non-zero without exiting the caller — so a consumer such as notify-pm still falls through to any delivery tier that does not need the file, and fails only when no tier delivers. A missing secrets file is never a silent no-op.

The doctor's secrets line is tiered:

  • No consumer installed (the free tier): informational — n/a on the free tier with no file, or the file found.
  • The resolve_hapimatic_secrets helper installed: a missing file is a non-fatal warning that names all three candidate paths, and a present file reports OK. A candidate that exists but is not a readable file (unreadable, a directory, a dangling symlink) ahead of the one being used is also a warning, because consumers skip it.
  • notify-pm or the inbox poller installed without the helper (copies from before the helper existed): those read only $HOME/.bashrc.d/99-api-secrets.sh, so the doctor checks only that file.
  • An explicit $HAPIMATIC_SECRETS_FILE that is not a readable file is always a warning: consumers fall through to the other candidates, so a typo in that path would otherwise go unnoticed.

The resolve_hapimatic_secrets helper and its consumers live in Hapimatic's dotfiles tier, outside this repository; this guide documents the convention they implement.

Git hooks (G6) ​

Hapimatic's global pre-commit dispatcher lives in a $HOME-relative hooks directory. On a machine where the dotfiles tier is deployed, the committed git config points core.hooksPath at ~/.githooks (and excludesfile at ~/.gitignore_global) — tilde-relative, so the dispatcher resolves on every machine regardless of the home-directory path.

There is deliberately no per-repo core.hooksPath step: a repo-local core.hooksPath overrides the global dispatcher (its gates stop firing in that repo) and, where the pointed-at directory is absent, silently disables .git/hooks/ entirely. Repositories that ship their own hooks install them into .git/hooks/, and the global dispatcher chains them.

The doctor checks that the effective core.hooksPath resolves to an existing directory; if it is set but points at a missing directory it reports hooks silently disabled — the exact failure the ~/.githooks relativization prevents. A relative value is resolved against the repository's top level, as git does, and an empty value is a warning, because git then runs no hooks at all. With no core.hooksPath set, the doctor checks that the repository's pre-commit hook exists and is executable, because git skips a hook that is not executable.

GitHub auth (G7) ​

The issue workflow uses the GitHub CLI. Authenticate once:

bash
gh auth login

The free tier runs sessions without gh; only the issue-workflow features need it, so the doctor reports gh: not authenticated — needed for the issue workflow only as a non-fatal line.

Operations ​

Remote access ​

If the server is deployed on a machine with a public IP, you can access it directly via http://your-server-ip:3006. Use HTTPS (via reverse proxy like Nginx or Caddy) for production.

Cloud VM (Oracle Cloud, AWS, Google Cloud, Azure)

On a cloud VM, two firewalls stand between your browser and port 3006, and you need to open both:

  1. The provider's network rule. Add an ingress rule for TCP port 3006: on Oracle Cloud, in the subnet's security list or the instance's network security group; on AWS, in the instance's security group; on Google Cloud, as a VPC firewall rule; on Azure, in the network security group. Limit the rule's source to your own address where you can.

  2. The VM's own firewall. Ubuntu images on Oracle Cloud ship iptables rules that reject everything except SSH (port 22). Open port 3006 and keep the rule after a reboot:

    bash
    sudo iptables -C INPUT -p tcp --dport 3006 -j ACCEPT 2>/dev/null || sudo iptables -I INPUT -p tcp --dport 3006 -j ACCEPT
    sudo netfilter-persistent save

    Other images may use ufw or firewalld instead; open TCP 3006 in whichever one is active.

Then check from your own computer:

bash
curl http://<public-ip>:3006/api/version

This address is plain HTTP over the internet, so the access token crosses it unencrypted when you sign in. Use it for a quick test only. For regular use, use Tailscale (below), which needs no open port at all, or put an HTTPS reverse proxy in front of the server.

If the server is behind NAT, use one of these options:

Cloudflare Tunnel

https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/

bash
export WEBAPP_URL="https://your-tunnel.trycloudflare.com"
Tailscale

https://tailscale.com/download

bash
sudo tailscale up

Access via your Tailscale IP:

http://100.x.x.x:3006

That address is plain HTTP. Tailscale's WireGuard connection encrypts the traffic between your devices, but the address is not HTTPS, and installing the app needs HTTPS.

For HTTPS, share the port with your tailnet through Tailscale Serve:

bash
sudo tailscale serve --bg 3006

The web app is then at https://<machine-name>.<tailnet-name>.ts.net, reachable only from devices on your tailnet. TLS ends on your own machine, so no provider can read the traffic or the access token, and because the address is HTTPS you can install the app from it. Serve needs HTTPS certificates turned on for your tailnet; if they are off, the command prints a link to turn them on. To stop sharing, run sudo tailscale serve reset. On Linux, Tailscale Serve needs root, which is why both commands use sudo; to run them without sudo, run sudo tailscale set --operator=$USER once.

ngrok
bash
ngrok http 3006

A tunnel provider carries the traffic between your browser and your server. Cloudflare Tunnel and ngrok's HTTPS endpoints end TLS at the provider's edge, so the provider can read that traffic, including the access token you sign in with; Tailscale (including Funnel) ends TLS on your own machine.

Telegram setup ​

Enable Telegram notifications and Mini App access:

  1. Message @BotFather and create a bot
  2. Set the bot token and public URL
  3. Start the server and bind your account
bash
export TELEGRAM_BOT_TOKEN="your-bot-token"
export WEBAPP_URL="https://your-public-url"

hapi server

Then message your bot with /start, open the app, and enter your CLI_API_TOKEN.

Daemon setup ​

Run a background service for remote session spawning:

bash
hapi daemon start
hapi daemon status
hapi daemon logs
hapi daemon stop

If the daemon runs as a systemd user service (see Keep the server running), start, stop and restart it with systemctl --user and hapimatic-daemon instead of hapi daemon start and hapi daemon stop.

With the daemon running:

  • Your machine appears in the "Machines" list
  • You can spawn sessions remotely from the web app
  • Sessions persist even when the terminal is closed

Security notes ​

  • Keep tokens secret and rotate if needed
  • The server listens on every network interface (see Server setup). On a machine with a public address, limit the source of the port-3006 rule to your own address, or reach the server through Tailscale instead of opening the port
  • Use HTTPS for public access
  • Restrict CORS origins in production
Firewall example for a home network (ufw)
bash
ufw allow from 192.168.1.0/24 to any port 3006

The self-hosted core is licensed under AGPL-3.0.