Documentation
ΒΆ
Overview ΒΆ
Command bonsai is a git worktree manager TUI. main wires the core layer (config, state, git discovery) into the Bubble Tea presentation layer.
Directories
ΒΆ
| Path | Synopsis |
|---|---|
|
internal
|
|
|
cli
Package cli implements bonsai's non-interactive subcommands.
|
Package cli implements bonsai's non-interactive subcommands. |
|
core/agentsetup
Package agentsetup runs profile setup and sign-in for the web: each job owns a terminal stream for the provider's login commands and a secret prompt the browser answers.
|
Package agentsetup runs profile setup and sign-in for the web: each job owns a terminal stream for the provider's login commands and a secret prompt the browser answers. |
|
core/agentterminal
Package agentterminal owns API-lifetime provider processes and bounded terminal streams.
|
Package agentterminal owns API-lifetime provider processes and bounded terminal streams. |
|
core/browser
Package browser opens a URL in the user's default web browser.
|
Package browser opens a URL in the user's default web browser. |
|
core/clipboard
Package clipboard copies text to the system clipboard via the first available external tool.
|
Package clipboard copies text to the system clipboard via the first available external tool. |
|
core/config
Package config loads the .bonsai.yaml project config via viper and persists mutable state (file-copy frequency, aliases) to the user config directory.
|
Package config loads the .bonsai.yaml project config via viper and persists mutable state (file-copy frequency, aliases) to the user config directory. |
|
core/editors
Package editors discovers GUI editors for the environment running Bonsai: commands on PATH and a few well-known user directories on Linux, PATH plus standard application bundles on macOS, and PATH plus the standard install folders on Windows.
|
Package editors discovers GUI editors for the environment running Bonsai: commands on PATH and a few well-known user directories on Linux, PATH plus standard application bundles on macOS, and PATH plus the standard install folders on Windows. |
|
core/exec
Package exec manages independent background subprocesses.
|
Package exec manages independent background subprocesses. |
|
core/fs
Package fs handles fuzzy file search over the main repo tree and copying files from the main repo into a worktree.
|
Package fs handles fuzzy file search over the main repo tree and copying files from the main repo into a worktree. |
|
core/gh
Package gh wraps the GitHub CLI (`gh`) for the operations bonsai needs.
|
Package gh wraps the GitHub CLI (`gh`) for the operations bonsai needs. |
|
core/git
Package git wraps the Git CLI.
|
Package git wraps the Git CLI. |
|
core/notify
Package notify sends best-effort desktop notifications.
|
Package notify sends best-effort desktop notifications. |
|
core/pkgmgr
Package pkgmgr discovers project/build commands from package managers and build tools.
|
Package pkgmgr discovers project/build commands from package managers and build tools. |
|
core/portowner
Package portowner names the process listening on a loopback TCP port, so a port conflict can say "pid 4242, node" instead of only "in use".
|
Package portowner names the process listening on a loopback TCP port, so a port conflict can say "pid 4242, node" instead of only "in use". |
|
core/procstore
Package procstore owns bonsai's on-disk process state.
|
Package procstore owns bonsai's on-disk process state. |
|
core/trace
Package trace provides opt-in timing spans and process-spawn counters for the sync pipeline.
|
Package trace provides opt-in timing spans and process-spawn counters for the sync pipeline. |
|
core/updater
Package updater downloads and verifies official Bonsai releases.
|
Package updater downloads and verifies official Bonsai releases. |
|
daemon/client
Package client talks to a repo's bonsai daemon over its Unix socket.
|
Package client talks to a repo's bonsai daemon over its Unix socket. |
|
daemon/gitbridge
Package gitbridge is the allowlisted, outbound-only Git bridge.
|
Package gitbridge is the allowlisted, outbound-only Git bridge. |
|
daemon/protocol
Package protocol defines the wire format between bonsai clients (TUI, CLI) and the per-repo daemon.
|
Package protocol defines the wire format between bonsai clients (TUI, CLI) and the per-repo daemon. |
|
daemon/server
Package server implements the per-repo bonsai daemon.
|
Package server implements the per-repo bonsai daemon. |
|
daemon/watcher
Package watcher accelerates reconciliation with filesystem notifications.
|
Package watcher accelerates reconciliation with filesystem notifications. |
|
git
Package git defines Bonsai's transport-independent Git domain.
|
Package git defines Bonsai's transport-independent Git domain. |
|
git/github/app
Package app implements GitHub's domain API without a gh executable.
|
Package app implements GitHub's domain API without a gh executable. |
|
git/github/ghcli
Compatibility names preserve CLI/TUI behavior while the daemon and web use the context-aware domain interfaces.
|
Compatibility names preserve CLI/TUI behavior while the daemon and web use the context-aware domain interfaces. |
|
git/local
Compatibility names preserve CLI/TUI behavior while the daemon and web use the context-aware domain interfaces.
|
Compatibility names preserve CLI/TUI behavior while the daemon and web use the context-aware domain interfaces. |
|
livehooks
Package livehooks keeps one Bonsai repository webhook per live-updates repository pointed at the current tunnel: find it (stored ID, else the ?bonsai=<install-id> marker), create it when missing, re-point it when the public URL or secret changes, and read its health from GitHub's last delivery.
|
Package livehooks keeps one Bonsai repository webhook per live-updates repository pointed at the current tunnel: find it (stored ID, else the ?bonsai=<install-id> marker), create it when missing, re-point it when the public URL or secret changes, and read its health from GitHub's last delivery. |
|
providers/codex
Package codex runs the OpenAI Codex CLI.
|
Package codex runs the OpenAI Codex CLI. |
|
server/runtime
Package runtime keeps a narrow compatibility wrapper for callers that used the original local API entrypoint.
|
Package runtime keeps a narrow compatibility wrapper for callers that used the original local API entrypoint. |
|
server/webhooks
Package webhooks verifies and durably queues GitHub deliveries before replying.
|
Package webhooks verifies and durably queues GitHub deliveries before replying. |
|
server/webui
Package webui serves the web UI bundle from the local API, on the API's own origin.
|
Package webui serves the web UI bundle from the local API, on the API's own origin. |
|
storage/git
Package git provides a durable metadata store.
|
Package git provides a durable metadata store. |
|
ui
Package ui is the Bubble Tea presentation layer.
|
Package ui is the Bubble Tea presentation layer. |
|
ui/components/modals
Package modals provides a single reusable centered overlay that operates in one of several modes: free text input, static selection, live fuzzy search, or yes/no confirmation.
|
Package modals provides a single reusable centered overlay that operates in one of several modes: free text input, static selection, live fuzzy search, or yes/no confirmation. |
|
ui/components/prefs
Package prefs is the in-app preferences overlay: theme preset picker with live apply, a full keybinding editor, and behavioral defaults.
|
Package prefs is the in-app preferences overlay: theme preset picker with live apply, a full keybinding editor, and behavioral defaults. |
|
ui/components/terminal
Package terminal is the right-pane viewport showing process output or git log.
|
Package terminal is the right-pane viewport showing process output or git log. |
|
ui/components/worktreelist
Package worktreelist is the left-pane list of git worktrees.
|
Package worktreelist is the left-pane list of git worktrees. |
|
ui/theme
Package theme centralizes the UI color palette so the whole TUI can be restyled from one place, driven by config (a preset plus per-role overrides).
|
Package theme centralizes the UI color palette so the whole TUI can be restyled from one place, driven by config (a preset plus per-role overrides). |
|
ui/websetup
Package websetup is the `bonsai web setup` terminal UI: the first-run wizard and the edit-mode dashboard.
|
Package websetup is the `bonsai web setup` terminal UI: the first-run wizard and the edit-mode dashboard. |
|
version
Package version holds metadata injected by GoReleaser.
|
Package version holds metadata injected by GoReleaser. |
|
websetup
Package websetup is the model behind `bonsai web setup`: what the user is choosing (a Draft), what applying it changes (a Plan) and the words used to explain each choice.
|
Package websetup is the model behind `bonsai web setup`: what the user is choosing (a Draft), what applying it changes (a Plan) and the words used to explain each choice. |
|
websetup/checks
Package checks inspects what `bonsai web` needs on this computer: git, the GitHub CLI and its login, project folders, the API port and the tunnel tools that live updates will use.
|
Package checks inspects what `bonsai web` needs on this computer: git, the GitHub CLI and its login, project folders, the API port and the tunnel tools that live updates will use. |
|
webtunnel
Package webtunnel describes the tunnels `bonsai web` can run for live updates: the argv for each preset, how its public URL is learned, and the argv validation that keeps the tunnel pointed at the webhook receiver and nothing else.
|
Package webtunnel describes the tunnels `bonsai web` can run for live updates: the argv for each preset, how its public URL is learned, and the argv validation that keeps the tunnel pointed at the webhook receiver and nothing else. |
Click to show internal directories.
Click to hide internal directories.