Skip to content
FoamSciencePublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

57 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bt

A keyboard-first terminal UI for a beads task DB. It reads the DB over SQL from the dolt sql-server bd runs on and writes through bd subcommands, in a very opninionated way; suitable most for my personal workflows.

Note

Consider this AI-slop, and not a polished product. Kind of works fine for general-purpose beads, but is really tuned for my own workflows.

Warning

From commit c009e69 on, bt needs bd in server mode: a dolt sql-server serving the beads DB (dolt_mode: server in $BEADS_DIR/metadata.json). It reads over SQL and no longer reads an embedded-mode DB. Use an earlier commit with embedded bd.

Requirements

  • bd on PATH, in server mode (see above). bt connects to the server bd is configured for: metadata.json, then BEADS_DOLT_SERVER_PORT, dolt-server.port or config.yaml dolt.port; the password from BEADS_DOLT_PASSWORD.
  • BEADS_DIR pointing at the beads directory. When it is unset, bt uses ~/tasks/.beads.
  • Go, at the version go.mod declares. With the default GOTOOLCHAIN=auto, an older local Go downloads the right toolchain on first build.
  • Optional: wl on PATH for the external-ref picker, and $EDITOR for opening code refs and formulas.

Install

make install

This runs go vet and the tests, builds bt with its version stamped in (git describe, or dev outside a git checkout), and installs it to ~/.local/bin/bt, next to bd. Pick another location with PREFIX or BINDIR:

make install PREFIX=/usr/local
make install BINDIR=~/bin

Check it with bt --version.

To update, pull or copy the new source and run make install again. On another machine, copy the repo over (rsync -a ~/repo/beads-tui/ host:repo/beads-tui/) and run make install there.

To remove the binary, run make uninstall, with the same PREFIX or BINDIR you installed with. bt leaves two small files behind, which can be deleted by hand:

  • ~/.config/bt/state.json: filters and other UI state
  • ~/.cache/bt/: the last snapshot, used for instant startup
  • ~/.config/bt/goals.accepted.toml: goal items you accepted in the Goals tab (your own goals.toml stays too)

Use

bt                  # open the TUI
bt triage           # hygiene violations as a plain list
bt triage --json    # the same, for a cleanup agent
bt triage --machine # only this host's beads (plus unlabelled); --machine <host>|all
bt goals [--json]   # the current goal cycle: goals, items, states and scores

Inside the TUI, ? lists every key. The tab row shows each view as a Nerd Font icon with its key as a superscript, so the terminal needs a Nerd Font. Views: 1 Now, 2 Activity, 3 Inbox, 4 Backlog, 5 Memories, 6 Board, 7 Workflows, 8 Graph, 9 Triage, 0 Live, @ Goals. S runs bd sync.

Develop

make build   # ./bt
make test

Tests that need a real DB are skipped unless their BT_* variable is set; see internal/ui/live_test.go. Tests of the SQL reads start a throwaway dolt sql-server and skip when dolt is not installed. BT_DIFF_BEADS_DIR=<scratch .beads> go test ./internal/bd -run TestListMatchesBDLive compares bt's reads with bd --json on a server-mode copy.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages