Deadbolt's desktop UI (crates/app, binary deadbolt-ui), built in
Rune.
- A thin client of the daemon.
deadbolt-uispeaks the daemon's Unix socket protocol (crates/proto,crates/client) and starts the daemon if none runs. It holds no vault keys and reads no store files: unlock, items, devices, health, and pairing are all daemon requests. Quitting the app leaves the daemon and its unlock session running. - Separate headless CLI and UI binaries.
deadbolt(crates/cli) never links Rune,wgpu, orwinit. Users rundeadbolt app(see One command), which locates and launchesdeadbolt-uiin its own process. On Linux, Rune loads Wayland, X11, and GPU drivers dynamically when a window opens. - Finding the daemon binary (
crates/app/src/binary.rs). Inside.app/Contents/MacOS(after resolving symlinks), the app always uses../Helpers/deadbolt; a missing helper fails closed without falling back. Outside a bundle, it checksDEADBOLT_BIN, a siblingdeadbolt, thenPATHand standard user/Homebrew/Cargo bin directories, verifying the Touch ID helper againstdeadbolt_enclave::SHA256. - Threads & live state. One worker thread (
crates/app/src/daemon/worker.rs) sends daemon requests on a current-thread Tokio runtime, coalescing stale selectionGets and running read-aheadPeeks last across up to three concurrent item lanes. A second thread holds the daemon'swatchstream open with exponential reconnect backoff (100 ms to 2 s, never auto-starting a stopped daemon). Locking or daemon exit immediately wipes cached values and returns to the lock screen;activatebrings the main window forward. - Secrets in memory & clipboard. Passphrase and secret inputs use Rune's
TextEdit::secure()(masked, no undo/copy/IME, macOS Secure Event Input while focused, wiped on exit or drop) and move throughZeroizing<String>buffers. Item secrets are fetched one item at a time (item-get); the 32-page read-ahead cache (crates/app/src/cache.rs) stores only non-secret fields and current TOTP codes, never secret values. Secret copies go throughTx::copy_secret(org.nspasteboard.ConcealedTypeon macOS) and clear after the configured timeout (10 s–5 min, default 30 s), on lock, or on quit. - Look & layout. Uses
rune-theme-opencode(kit(dark), Inter + IBM Plex Mono) inrune_kit::shell::SplitView(crates/app/src/vault.rs,crates/app/src/vault/page.rs): immediate state changes (Tx::instant), ~0.15 s motion only where elements travel, no hover fades or focus rings, and zero layout reflow when async data arrives.
- First run (
crates/app/src/onboarding.rs): Create or Join on a dedicated worker thread. Create sets device name, vault name, and passphrase (checked withzxcvbnviadeadbolt_proto::daemon::passphrase_strength;< 8characters refused). Join sets up the device first, displays the single-use 5-minute five-word pairing code and copyabledeadbolt approve <code>command (cleared from clipboard on pair, cancel, or close), and syncs the vault. - Unlock: Passphrase field plus Use Touch ID or Unlock with this Mac
when quick unlock is ready (
docs/touch-id.md). Auto-prompts once on focused launch, quick-panel summon, refocus after a background lock, or screen unlock while frontmost (Change::ScreenUnlocked), never right after an explicit⌘Lor frontmost idle lock. Explains expired or reset slots in place. - List & search: Search-first virtualized 46 pt rows showing kind icon,
label, muted star for favorites, detail line, active risk dot, and
⌘1–9on the selected row. Supports#tag(matchingtagandtag/*),#"tag with spaces", andis:favoritequeries; favorites sort first. - Item detail (
crates/app/src/vault/page.rs): Schema-ordered fields, masked secrets (Showreveals in place via secure read-only labels), per-rowCopy,Save…(0600) for file fields, live3+3TOTP codes (ItemCodepolled once per period without delayingunlock_timeout),#tagchips, and health callouts. - Passkey: Shows
Site,Username,Created, andNotes(private keys never leave the daemon; passkey fields are not editable in⌘E). - Add / edit (
crates/app/src/edit.rs):⌘Nopens with the filterable 17-type picker focused (edit/types.rs);⌘Eedits in place. Unrevealed OTP, secure-note body, and SSH private-key fields stayKeptuntil replaced or explicitly revealed viaShow.edit/tags.rsedits tags with prefix completions. Emits a minimalItemSetdiff; concurrent remote edits surface a conflict banner with Show theirs. - Generate (
crates/app/src/edit/generator.rs): Fills new logins fromCommand::Generate(24 chars with symbols by default; 16/20/24/32/64 and symbols controls; honors site rules when fixing a login). - Import (
crates/app/src/import.rs): Drag-and-drop or⇧⌘Ifor 1Password.1pux/.csv(including idempotent in-place re-import updates), Apple Passwords.csv, or Bitwarden.jsonwith a secret-free dry-run preview before committing. - Security (
crates/app/src/health.rs,docs/password-health.md):⇧⌘H,⌘K › Security, or the header risk count swaps in category tabs (1–6plus7 Ignored: Risks, Breached, Reused, Weak, 2FA, Passkeys), Check breaches, and per-findingFix(↵),Open site(O), andIgnore(I). - Settings (
crates/app/src/settings.rs):⌘,editsconfig.tomlsettings viaCommand::SettingsSet(Quick unlock: Passphrase / Touch ID / With this Mac, Require passphrase interval, Auto-lock, Lock on sleep, Clear copied secrets, HIBP breach checks, Quick panel shortcut recorder) and shows Devices, Updates, Activity (crates/app/src/activity.rs), and Keyboard shortcuts. - Recently Deleted (
crates/app/src/trash.rs):⇧⌘⌫lists soft-deleted items newest first, opens them read-only, and restores with⌘Racross all synced devices.
crates/app/src/keys.rs (SHORTCUTS, verified by tests/app/keymap.rs) works
regardless of which control holds focus:
| Key | Action |
|---|---|
| typing | Filters the list (#tag, is:favorite, plain words); unfocused printable keys (except J, K, O) return to search |
↑ ↓, J K |
Move selection (J/K when search is unfocused) |
⌘1–9 |
Select the first nine visible rows |
↵ / ⇧↵ / ⌥↵ |
Copy primary field / login username / current TOTP code |
O, ⌘O |
Open item's http(s) URL or passkey RP |
⇥ |
Step into item fields (↑↓ move, ↵ copy, Space show/hide, Esc back) |
⌘F |
Focus search (and reopen a hidden sidebar) |
⌘D |
Toggle favorite on selected item or open form |
⌘K / ? |
Open Actions palette (including Filter by tag…) / shortcut sheet |
⇧⌘H / ⌘, / ⇧⌘⌫ |
Security / Settings / Recently Deleted |
⇧⌘B, ⌃⌘S |
Toggle sidebar |
⇧⌘I |
Import Passwords… |
⌘N / ⌘E / ⌘⌫ |
New item (⌃⇥/⌘T switch type) / Edit item / Delete item |
⌘S, ⌘⏎, ⏎ |
Save form (⏎ inserts newline in multi-line fields); Esc cancels |
⇧⌘Space |
Summon Quick Panel globally (configurable in Settings) |
⌘L / ⌘Q |
Lock vault / Quit app |
Rune suppresses first-paint animations, honors system --reduced-motion, and
retargets springs mid-flight:
| Change | Motion |
|---|---|
| Whole-screen swap (lock ↔ vault, item ↔ form, import) | Blur (σ 1.5), scale .96, fade (.3/0 in, .24–.25/0 out) |
Typing filter, Esc, selection change, ⌘K, ? |
Instant (Tx::instant); read-ahead pages swap in place, holding up to 0.15 s on cache miss |
| Synced row additions / removals | Surviving rows slide (.4/0); entering/leaving rows fade in place |
| Copy notice & TOTP rollover | Notice rises 12 pt (.3/0); changing digits roll via RollingText (tabular figures); period/countdown bars run on linear render-thread tweens |
| Delete confirm | Trash button morphs into dim red confirm (.3/0, fade under reduced motion) |
| Vault created or joined | Keyhole bolt throws into strike (.3/.3), ember flash cools over 1.1 s, vault opens at 1.5 s |
⇧⌘Space (Ctrl+Shift+Space off macOS, saved in app-shortcut) toggles a
borderless, non-activating 688×448 WindowOptions::launcher_panel window
(crates/app/src/panel/, 640×400 card inset 24 pt with macOS window shadow
off so WindowServer draws no outer rectangular frame; verified by
tests/app/window_server.rs with -- --ignored) centered 160 pt below the top
of the pointer's display.
- Flow: Summon -> type query ->
⏎copies primary field (⇧⏎username,⌥⏎TOTP), rolls footer into"Copied, clears in 0:30"for1.1 s, then fades out and wipes every query and item value from memory. - Programmatic approvals (
panel/ask.rs): Also rendersdeadbolt askconfirmation cards (such as brokered command requests, above an inline unlock prompt when locked). --panelflag: Starts hidden without a Dock icon for background shortcut use and headless panel tests; opening the main window restores the Dock icon and macOS app menu. Off macOS, where native menus areUnsupported, the main window footer keeps a clickable Quick panel hint (window::entry).
cargo build -p deadbolt-cli && cargo run --release -p deadbolt-app
cargo build -p deadbolt-cli -p deadbolt-app && target/debug/deadbolt app
cargo test -p deadbolt-cli -p deadbolt-app
cargo test -p deadbolt-app --test app panel::
crates/app/scripts/snap.sh
crates/app/scripts/hold-down.sh out.mp4
cargo run -p deadbolt-app -- --scene copied --at 2.4 --snap copied.png
cargo run -p deadbolt-app -- --window panel --scene filtering --snap panel.pngTooling runs (--snap, --tree, --trace, --frames, --script, --scene,
defined in crates/app/src/scenes.rs) use synthetic fixtures only, never touch
the real daemon, clipboard, global shortcuts, or app-shortcut.
Users run deadbolt in a terminal for the CLI, or deadbolt app (or bare
deadbolt launched outside a TTY with a display and without SSH_CONNECTION
or DEADBOLT_NO_UI=1; crates/cli/src/app.rs) to open deadbolt-ui.
- Discovery order (
app::find_ui):DEADBOLT_UI_BIN; enclosingDeadbolt.appbundle (linking~/Applications/Deadbolt.appif needed); siblingdeadbolt-ui;/Applications/Deadbolt.appor~/Applications/Deadbolt.app; Launch Servicesanomaly.deadbolt;PATH. - Single window activation: Outside macOS
open,deadbolt appsendsapp-activate(forwardingXDG_ACTIVATION_TOKENorDESKTOP_STARTUP_ID) so an already-running main window comes forward instead of spawning a duplicate; a 5 swatchers::STARTINGreservation serializes double-clicks. On first Linux launch,desktop::ensureinstalls~/.local/share/applications/anomaly.deadbolt.desktopand its icon (deadbolt desktop install/uninstall).
Deadbolt.app/Contents/
Info.plist anomaly.deadbolt; version from Cargo
MacOS/Deadbolt deadbolt-ui, signed as anomaly.deadbolt
Helpers/deadbolt headless CLI & background daemon
Helpers/deadbolt-enclave Secure Enclave Touch ID helper (anomaly.deadbolt.enclave)
Resources/Deadbolt.icns generated headlessly
deadbolt_client::ensure_running ensures the app and CLI share one daemon
without fighting:
| Running daemon protocol | Client action |
|---|---|
Matches DAEMON_PROTOCOL_VERSION |
Reuses the running daemon regardless of which install started it |
| Older | Stops it cleanly, then starts this client's deadbolt binary |
| Newer | Refuses without stopping it and advises updating this client or running deadbolt debug daemon stop |
Once unlocked, if no deadbolt CLI is on PATH (or a bundle symlink broke
after moving the app), a quiet card in the vault offers Install… /
Repair… (crates/app/src/install.rs), linking Contents/Helpers/deadbolt
into writable ~/.local/bin, /opt/homebrew/bin, or /usr/local/bin (or
showing the exact sudo ln -sfh command without ever invoking sudo).
hivemind run --kind cargo --fetch .lab-output -- bash crates/app/scripts/bundle.sh
hivemind run --kind cargo --fetch .lab-output -- bash crates/app/scripts/bundle.sh --universalRelease builds (docs/releasing.md) compile against a Developer ID-signed
DEADBOLT_ENCLAVE_PREBUILT helper so deadbolt and deadbolt-ui pin its
exact signed bytes, then sign, notarize, and staple Deadbolt.app for the
desktop release manifest, GitHub releases, and Homebrew cask.
- Menu-bar item: whether to add an optional macOS menu-bar extra alongside
the main window and
⇧⌘Spacequick panel. ⌘Cin the vault list: whether⌘Cwith an empty search selection should copy the selected item's primary secret.- Strict weak-passphrase gate: onboarding currently refuses passphrases
under 8 characters and warns on low
zxcvbnscores; whether to refuseWeakscores outright.