Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

Β 

History

85 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

beads.nvim

Neovim front end for the beads issue tracker (bd). Commands: :Beads tree [left|right|bottom|top]|deps|ready|list|search|needs|epics|questions|show <id>|create|cd <path>|poke [pick]|output|chat. poke, output and chat pass through to agent-poke.nvim (a hint is shown when it is not installed); poke resends the threads waiting on the agent, poke pick chooses a target.

Requirements and install

  • Neovim 0.10+ and the bd CLI (1.2.2 or newer; :checkhealth beads checks both).
  • Optional: fzf-lua (pickers; the plugin falls back to vim.ui.select), agent-poke.nvim (sends questions to an agent), render-markdown.nvim (see the end).

lazy.nvim:

{
  "muzomer/beads.nvim",
  config = function()
    require("beads").setup({})
  end,
}

vim.pack (Neovim 0.12+):

vim.pack.add({ "https://github.com/muzomer/beads.nvim" })
require("beads").setup({})

Options

These are the defaults; pass only what you want to change.

require("beads").setup({
  tree = { layout = "full", position = "left", width = "auto", height = "auto" }, -- also max_width, max_height
  keymaps = {},          -- every key can be changed, given a list, or set to false (see Keymaps)
  mouse = true,          -- tree: click selects, opens and folds; false installs no mouse maps
  fzf = "auto",          -- fzf-lua pickers when installed; false uses vim.ui.select
  glyphs = {},           -- status glyph overrides, or "ascii"
  type_icons = false,    -- or { epic = "E", bug = "B", ... }
  flash_ms = 350,        -- jump flash duration; false disables
  notify = true,         -- false silences the "changed externally" notes
  notify_group_ms = 1500, -- external changes inside this window are one note
  ask = { open_after_send = true }, -- open the new thread's float after sending a question
})

Keymaps

Configure with require("beads").setup({ keymaps = { ... } }). Every entry is a key, a list of keys or false (disabled); keymaps = false creates no maps at all. Every map has a desc (which-key). <leader>bd is never mapped by the plugin.

Global

key config action
<leader>bt tree toggle the tree
<leader>br ready ready picker
<leader>bl list list picker
<leader>bs search search picker (prompts for the query)
<leader>bn needs needs-me picker
<leader>be epics epics picker
<leader>bq questions questions waiting on you
<leader>bc create create a bead
<leader>b? help the keys that work where you are
<leader>bp poke poke the agent about threads waiting on it (:Beads poke)
<leader>bP output show the agent output (:Beads output)

Detail buffer (beads://<id>)

The buffer opens in VIEW mode (read-only, vim.b.beads_mode == "view"). require("beads").mode() returns the mode for a statusline.

key config (keymaps.detail.view.*) action
e, i edit switch to EDIT mode
x close_bead close the bead (asks for a reason)
C claim claim
<CR> open_thread open the question thread under the cursor (## Questions)
]u, [u next_waiting, prev_waiting jump to the next / previous thread waiting for you
]b, [b next_bead, prev_bead open the next / previous bead in this window, in the order of the view the bead was opened from: deps view row order (wave by wave, then the cycle group, same filter) when opened from :Beads deps, else tree order (follows the open tree's sort, filter and H); a count works
gd peek peek the bead id under the cursor in a floating read-only detail (see "Peek floats"); other words fall back to Vim's gd
K details bead details (peek float) for the bead id under the cursor; does nothing elsewhere
n note append a note (float)
c comment add a comment (float)
a ask ask a question about the section under the cursor (or the visual selection)
yy yank_id yank the bead id
yr yank_run yank the workflow run command
q close close the window
?, g? help help float

EDIT mode (keymaps.detail.edit.*) is normal Vim editing; :w saves and returns to VIEW mode (a failed or refused save stays in EDIT). beads://new opens in EDIT mode.

key config action
<C-s> save save (normal and insert)
<Esc><Esc> view back to VIEW mode; asks before discarding edits
g? help help float

Thread float

keymaps.thread.*: r / i reply (reply), x resolve (resolve; the whole thread is saved once as one bead comment via bd comments add, retried on the next x if bd failed), a apply the proposal as an unsaved edit of the detail buffer (apply), n / p next / previous thread (next, prev), yr yank the run command of a human thread (yank_run), K peek the bead id under the cursor (details), ? / g? help, q / <Esc> close (close).

Peek floats (gd)

gd on a bead id (detail VIEW, tree, thread float) opens that bead in a floating, read-only detail view with the same rendering and highlighting. It follows live updates (the watcher is held while any peek float is open). Floats stack, offset down and right; gd on a bead already open focuses it. keymaps.detail.view.peek, keymaps.tree_view.peek and keymaps.thread.peek set the gd key (false disables).

A float has the detail view's keys, and they act on the float's bead. The keys come from keymaps.detail.view.*; keymaps.peek.* (same action names) overrides them for floats. Actions that change the bead refresh the float.

key config action in a float
e, i edit open the bead in the main window in EDIT mode and close the floats
x close_bead close the bead
C claim claim
n, c, a note, comment, ask note, comment, ask
<CR> open_thread on a question line, open its thread; elsewhere open the bead in the main window and close all floats (open)
]u, [u next_waiting, prev_waiting jump between threads waiting for you
]b, [b next_bead, prev_bead replace the float's bead with the next / previous in the order of the view it was opened from (deps view order for K / gd in :Beads deps, else tree order; a count works)
K, gd details, peek peek the bead id under the cursor
yy, yr yank_id, yank_run yank the id / run command
?, g? help help float
q, <Esc> close close the top float (float only)
Q close_all close all floats (float only)

Tree

tree.layout picks the default view. "full" (the default): the tree fills the current window (like a file explorer); <CR> or a click on a bead opens its detail in a window above and the tree below (tree.height, default about 40% of the lines), and closing the detail (q) returns to the tree only; K shows the details float without changing the layout; closing the tree restores the window's previous buffer. "split": the tree opens as a split at tree.position and <CR> opens the bead in the other window. :Beads tree left|right|bottom|top always opens a split.

tree.width (left/right) and tree.height (bottom/top) default to "auto": the tree fits its longest visible line (at least 24 columns) or its visible row count (at least 6), refitting after every render and on VimResized. tree.max_width (default half the columns) and tree.max_height (default 40% of the lines) cap the auto size. A number keeps a fixed size. Resizing the tree window by hand stops auto-fit until the tree is reopened.

keymaps.tree_view.*:

key config action
<CR> open open the bead
a add a child
x, C close, claim
R refresh
H toggle closed beads
B toggle_blockers toggle the full β›” blocked by <id> text for every open blocker (off by default, per tree)
L cycle the layout (left, bottom, right, top)
f filter: free text plus status:, label:, assignee:, type: tokens; empty clears
s cycle the sort (priority, updated, id, deps; deps lists a blocker before the siblings it blocks)
gd, K peek, details peek float for the cursor row (K false disables)
yy, yr yank id, yank run command
za, zo, zc fold
q close
?, g? help

The header counts what needs you, for example 3 need you (2πŸ’¬ 1πŸ‘€): beads with a question waiting on you and beads that need a human.

Selection: m toggles a mark (▍, BeadsMarked, mark) and moves the cursor down to the next bead; 3m marks three beads and steps over closed folds. M clears all marks (clear_marks). A opens the action menu (actions): close, claim, reopen, yank ids, yank run commands, set priority, set status, set assignee, set type, add label, remove label, move under epic, remove parent, blocked by, remove dependency.

x, C, yy and yr act on the marked beads, else on the visual line range, else on the cursor bead (yanks put one id or run command per line). More than one bead asks Close 3 beads? [y/N]; closing runs one bd batch, reopening one bd reopen. Marks are kept by bead id across refresh, folds, filters and layout moves. A mark hidden by a filter or by H is skipped, with one Beads: skipped n hidden marks note. Failed beads stay marked and one Beads: n of m failed: <ids> note is shown.

Deps

:Beads deps toggles a left split that answers "what can I do next and what does it unblock". Open beads are listed once each, grouped in waves: WAVE 1 Β· can start now (N) holds the beads with no open blocker, and a bead in wave n waits only for beads in earlier waves. Each wave is one fold. A row ends with ← and the ids of the open beads it waits for (4 ids, then +N). Ids lose the prefix that all visible rows share; the header shows that prefix and, when all rows share one parent epic, its title. Moving the cursor marks the beads the cursor bead waits for with an amber ↑ and the beads it unblocks with a green ↓. [d jumps to a bead the cursor bead waits for and ]d to a bead it unblocks (press again to cycle); B shows the full ← list on every row. Closed beads are hidden; beads in a blocking cycle are listed under ── cycle ──. The filter f is the tree's: it only hides rows and never moves a bead to another wave, and a blocker it hides stays in the ← list, dimmed.

keymaps.deps_view.*:

key config action
<CR> open open the bead
x, C, A close_bead, claim, actions close, claim, action menu for the cursor bead
R refresh refresh
<Tab>, za fold toggle fold
f filter filter: free text plus status:, label:, assignee:, type: tokens; empty clears
[d, ]d prev_blocker, next_unblocked jump to a bead the cursor bead waits for / unblocks (repeat to cycle)
B toggle_blockers toggle the full ← blocker list on every row
gd, K peek, details peek the bead id under the cursor / the cursor row
yy, yr yank_id, yank_run yank id, yank run command
q close close
?, g? help help

Asking an agent

a on a section of a bead (or on a visual selection) stores a question as a thread in <project root>/.beads-nvim/questions.json. That file is local to your machine and gitignored; unresolved threads are never written to the bead. <M-s> in the ask box saves and sends the question to the agent through agent-poke.nvim; without agent-poke (or when it fails) the prompt is copied to the " register for you to paste.

The agent answers with the beads-ask command (beads-ask reply <thread> <body>, in the plugin's bin/). setup() puts that directory on nvim's PATH, and every question tells the agent how to call it, so you do not configure anything. The reply appears live in the thread float, the Questions section and the badges.

Resolving a thread with x saves it once to the bead as one comment (the thread id, its section and every message, in order) with bd comments add, so the answers sync with the bead and other tools can read them.

Input floats (ask, reply, note, comment)

a in detail VIEW mode (and r in a thread float) opens a multi-line ask box titled with the bead id and the section or quote. keymaps.input.*: <C-s> save (normal and insert, submit), <CR> save (normal, submit_normal), <M-s> save and send to the agent (send; without agent-poke the prompt is copied), q and <Esc> cancel (normal, cancel). Empty text saves nothing.

setup({ ask = { open_after_send = true } }) opens the new thread's float after every save (false keeps the detail buffer focused).

Replies written by beads-ask reply appear live: while a beads view is open, .beads-nvim/questions.json is watched and the Questions section, thread floats and badges refresh. Each agent reply notifies Beads: agent replied on <bead id>: <first line> (grouped within notify_group_ms, silenced by notify = false).

fzf-lua picker

keymaps.picker.*: <CR> open, ctrl-y (yank_id), alt-r (yank_run), ctrl-x (close).

Multi-select: <Tab> toggles a selection, ctrl-a opens the action menu for the selected beads. ctrl-y and alt-r yank every selected id / run command, one per line; ctrl-x closes all selected; <CR> opens the first selection and notes how many others were ignored.

nbd: open the tree from the shell

bin/nbd starts nvim on the beads tree and quits nvim when the tree closes.

nbd          # beads of the current directory (the nearest .beads)
nbd <dir>    # beads of <dir>

The plugin's bin/ is only added to nvim's own PATH, so put nbd on your shell PATH yourself:

ln -s <plugin>/bin/nbd ~/.local/bin/nbd

<plugin> is where your plugin manager put beads.nvim, for example ~/.local/share/nvim/site/pack/core/opt/beads.nvim (vim.pack) or ~/.local/share/nvim/lazy/beads.nvim (lazy.nvim).

Quit behaviour: q in the tree closes it and nvim quits with it. A detail buffer with unsaved edits makes the quit fail, so nvim stays open and nothing is lost. NBD_NVIM overrides the nvim command. Your config must load beads.nvim as usual; nbd needs no other setup.

Statusline

require("beads").status() returns a short string such as ◐ 2 β—‹ 5 ready πŸ’¬ 1 (in progress, ready, waiting on you), read from the cached store (it never spawns bd). ◐ counts every in-progress bead, including those waiting on you, which also count under πŸ’¬. For lualine:

lualine_x = { require("beads").lualine }

Highlights and glyphs

All colours come from Beads* highlight groups (BeadsId, BeadsTitle, BeadsDim, BeadsStatus{Open,InProgress,Blocked,Closed,Deferred}, BeadsPriority0..4, BeadsType{Epic,Bug,Feature,Task,Chore}, BeadsBadge{User,Agent}, BeadsBlocked, BeadsCurrent, BeadsFlash, BeadsFold, BeadsGuide, BeadsHeader, BeadsWinbar*, BeadsMode{View,Edit}). They are defined with default = true as links to standard groups, re-applied on ColorScheme; override any with :hi or :hi! link.

glyphs sets the status glyphs (defaults β—‹ ◐ ● βœ“ ❄ for open, in_progress, blocked, closed, deferred): setup({ glyphs = { open = "O" } }) overrides single ones; setup({ glyphs = "ascii" }) uses plain ASCII o ~ x v z. type_icons = { epic = "E", bug = "B", ... } enables optional type icons (off by default). Glyph and icon widths are padded automatically to the widest configured one, so ids stay aligned even when a glyph is 2 cells wide.

Symbols

Each symbol has one meaning (the exception: Β· also separates fields in the tree header and the detail winbar). The help float (?, g?, <leader>b?) lists the ones of the current view using your active glyphs; all of them are configurable (glyphs, workflow.glyphs).

Symbol Meaning
β—‹ open
◐ in progress
● blocked
βœ“ closed
❄ deferred
Β· unknown status
βœ… review clean
❌ / ❌r2 review found issues (r = review round)
🟒 gate pass
πŸ”΄ gate fail
πŸ‘€ needs a human
πŸ‘€ needs review
⏸ parked
πŸ’¬ waiting on you
β–Ύ / β–Έ tree node expanded / folded
β›” / β›”N blocked by open beads (N = count; B shows the full text); in deps sort a blocker shown above it in the same list is not counted, a parent or other-list blocker is
β”‚ β”œ β”” tree guides
WAVE n (N) deps view: beads that can start once wave n-1 is done (N = rows); WAVE 1 can start now
← deps view: the open beads this row waits for; dimmed when the filter hides them
+N deps view: N more blockers; B shows them all
↑ deps view: the cursor bead waits for this row
↓ deps view: the cursor bead unblocks this row
── cycle ── deps view: beads that block each other, or wait on such a bead
▍ marked for a group action (m / M)
[+] detail buffer modified (unsaved edits)
⚠ detail buffer changed on disk

Detail winbar, highlights and render-markdown.nvim

Detail windows get a winbar <glyph> <id> · <type> · P<n> · <status> · VIEW|EDIT, plus [+] (modified) while there are unsaved edits and ⚠ changed on disk after an external change. Frontmatter values are coloured with the Beads* groups, and comment headings show a relative time (2h ago) as virtual text. For tests the clock can be injected with setup({ now = function() return unix_seconds end }).

With render-markdown.nvim the detail buffer (filetype markdown) is rendered as usual (headings, code fences). The frontmatter stays readable: the key: value lines are not concealed or overlaid, the Beads value highlights are extmarks that stay on top, and the buffer text is never changed, so parse/render round-trips. If your setup conceals frontmatter, disable it for beads:// buffers.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages