SAPWOOD_

// the management console for Heartwood

Shape your signer.

Sapwood is the console for the Heartwood signer, in the browser and at the shell prompt: flash firmware, provision masters, derive identities, set policies, approve requests, take backups. The web app is a static page with no account, no server and no analytics, talking to the signer over USB, end-to-end encrypted relay commands, or the keyless bridge daemon on your own network; the CLI speaks the same frame protocol over the same cable from a terminal on Linux, macOS and Windows. Once provisioned, your keys stay on the device; the console only ever shapes what the device will agree to do.

web console + CLI  ·  Web Serial  ·  keys stay on the device  ·  MIT

sapwood cli · usb
$ sapwood device
 HEARTWOOD v0.13.7 · heltec-v4
  identities 2 · connected apps 5

$ sapwood derive forge
 derived 'forge' under 'default'
  npub1q3k…x7d0 · the same name always derives the same key

$ sapwood apps
IDENTITY  SLOT  APP     METHODS  KINDS  AUTO  PAIRED
default   0     gossip  6        all    yes   yes

$ sapwood firmware update heartwood-v4.bin
Waiting for approval. Hold the button on the device.
 Firmware verified. The device is rebooting into it.
01

EVERYTHING THE SIGNER NEEDS. NOTHING IT SHOULDN'T.

02

WHAT A COMPROMISED BROWSER GETS: NOTHING

No keys to take
Master secrets never leave the ESP32. Sapwood holds a management credential, not signing power. A hostile page with full control of the console still cannot extract a key or sign an event.
Every change is challenged
Remote mutations require the operator key, a device-issued one-time challenge, and the current client credential, so a captured command replays as garbage.
The button outranks the browser
Provisioning, seed and PIN changes, factory reset and the start of any firmware update need a physical press on the device. Software can ask; only your thumb can insist.
Bounded operator
The operator credential can shape policies and connectivity. It cannot read or replace seeds, change the PIN, or push firmware. By design, not by promise.
03

THREE PATHS, ALL YOURS

USB. Plug the board in and Sapwood speaks to it directly over Web Serial: flashing, provisioning, recovery, logs. The CLI drives the same cable from a terminal. Everything stays on your desk; nothing needs a network at all.

RELAYS. Day to day, management commands travel as end-to-end encrypted Nostr events to the signer's own outbound connection. No inbound port, no port forwarding, no cloud account, no management server. The relay carries ciphertext it cannot read.

BRIDGE. A signer tethered to a Pi or any Linux box is reachable through the keyless bridge daemon on your LAN: the same console, plus daemon health and restarts, with verified firmware pushed down the tether.

Honest requirements: Web Serial means a Chromium browser (Chrome, Edge or Opera) for the USB path. Firefox and Safari don't ship it. The CLI has no browser requirement at all.

04

THE SAME CONSOLE, AT A SHELL PROMPT

The sapwood CLI ships in the same repo and speaks the same frame protocol over the same cable, on Linux, macOS and Windows. Build it with npm run build:cli, put it on PATH with npm link, and the console is a command away: 36KB bundled, about 30ms to start, --json on every command for scripts.

ports finds the signer; device, identities and apps read its state; derive mints an identity on-device from a name; identities remove retires one behind a typed-name confirmation; logs streams the device log; firmware update pushes a signed release, approved by the physical button. The security model does not move: management frames only, and no secret ever crosses the cable.

05

FIRST BOOT IN MINUTES

  1. 01

    Plug a supported board into USB. See the boards.

  2. 02

    Open sapwood.forgesworn.dev in a Chromium browser and follow the flasher wizard.

  3. 03

    Provision a master (new mnemonic or existing nsec) and name your first identity.

  4. 04

    Connect an app: Sapwood issues the bunker:// pairing for Bark, Cambium, or any NIP‑46 client.

Want every step with real screenshots? The web guide walks the whole console, from first flash to phone pairing. Terminal person? The CLI guide covers every command, with output.

§

THE WHOLE TREE