Expand description
The command line: which command to run, with its options.
- [
entries]: commands that read or change entries by id, for agents and scripts. - [
mod@init]: a project’s.brain/, and the section telling its agents about it;deinitundoes it. - [
claude]: the Claude Code hooksinitadds: the context at each session start, and [hook]’s checks. - [
hook]:kb hook prompt|stop|edit|tool, which hold an agent to describing an undescribed project first, to commenting on the tasks it started, and tokbfor the brain’s files, and tell it of the user’s comments. - [
completions]:kb completions SHELL, tab completion, and the ids, projects and tags it offers. update:kb updateand the app’s, the latest release over this one, through the installer, once no agent is working.
What the command line parses to (Command, EntryCommand, their variants and parts) is #[non_exhaustive],
so a new command, or a new option of one, isn’t a breaking change of this crate’s API.
Modules§
- update
kb update, and the app’s update: installs the latest release over this one, by running the installer the README gives, which downloads it, checks its checksum and replaces the binaries, then runs the new version’sinit --all, so none of that is repeated here. Never while an agent works on a task:init --allwould rewrite its instructions and a migration its data mid-session.
Structs§
- AddArgs
- Options of
add. - Entry
Args - One of the entry commands, and whether to print JSON.
- List
Args - Options of
kb list. - Program
- The binary running the command line, named in the usage text and
--version. - Report
Args - Options of
kb report. - Step
- One thing a change to projects did, as
kbsays it on a line of its own, with what it was when a caller acts on it: the kanban app says a move, or the deletion of the tasks, rather than the first line.
Enums§
- Command
- What to do, as chosen on the command line.
- Entry
Command - What to do to which entry.
- Project
Change - What
projectchanges. - Project
Part - What
projectchanges in one of its texts. - Step
Kind - What a
Stepwas, for the steps a caller acts on; any other isStepKind::Other. - TagChange
- A change
tagmakes to an entry’s tags. - Text
- Text given on the command line, or
-to read it from stdin (for multi-line markdown).
Functions§
- init
Deprecated init_steps, each step as its line.- init_
steps - Makes
roota repository of projectname(else the one its card names, else one named after the folder), namedrepoin it (else asprojects::repo_namepicks): creates its.brain/and card, registers it incentral(joining the project’s other repositories if it has some), creates the project’s shared card if it’s new, and writes or refreshes the section in each agent file ofroot(creatingCLAUDE.mdif there’s none). Returns what it did, aStepa line. - move_
repo Deprecated move_repo_steps, each step as its line.- move_
repo_ steps - Moves the repository whose
.brain/isdirto projectto, created if new, askb init tothere would. Links between it and its old project’s repositories are dropped on both sides: they’d name repositories of another project. Returns what it did, aStepa line. - remove_
project Deprecated remove_project_steps, each step as its line.- remove_
project_ steps - Takes every repository of
projectout, asremove_repodoes each, which removes the project’s card with the last. Returns what it did, aStepa line. - remove_
repo Deprecated remove_repo_steps, each step as its line.- remove_
repo_ steps - Takes the repository whose
.brain/isdirout of its project, askb deinitdoes, and drops its old siblings’ links to it. Withpurge, its.brain/goes too: its tasks, notes and decisions. Returns what it did, aStepa line. - rename_
project Deprecated rename_project_steps, each step as its line.- rename_
project_ steps - Renames project
oldtonew: the registry, its shared card, and each of its repositories’ cards. Returns what it did, aStepa line. - rename_
repo Deprecated rename_repo_steps, each step as its line.- rename_
repo_ steps - Renames the repository whose
.brain/isdirtonewin its project, and rewrites its siblings’ links to it (old#3becomesnew#3). Returns what it did, aStepa line. - usage
- Printed by
--helpand after a command-line error. The status, period and group names come fromStatus,UnitandGroup, so they’re only written there.