Knowledge Base (KB)

The Knowledge Base stores curated project knowledge (architecture decisions, coding conventions, and gotchas) in a hierarchical structure.

View the KB Tree

$ metateam kb

Show full entry content in the tree:

$ metateam kb --full
# or
$ metateam kb list --full

Read an Entry

$ metateam kb show <project/compartment/entry>
# shorthand:
$ metateam kb <project/compartment/entry>

Search Entries

$ metateam kb search "query"

Create or Update an Entry

$ metateam kb set <project/compartment/entry> -t "Title" -m "Body content"
Flag Purpose
-t, --title Entry title (optional)
-m, --message Entry content inline
-e, --edit Open $EDITOR to write content
-i, --important Mark entry as important
--not-important Remove important flag

Examples:

$ metateam kb set metateam/gotchas/commit-style -t "Commit Style" -m "Keep commit messages concise."
$ metateam kb set metateam/gotchas/commit-style -t "Commit Style" -i -m "Important guidance."
$ metateam kb set metateam/gotchas/commit-style -t "Commit Style" -e

Edit an Entry in Your Editor

$ metateam kb edit <project/compartment/entry>

Patch an Entry

Use targeted replacement:

$ metateam kb patch <project/compartment/entry> --old "old text" --new "new text"

Alternative inputs and behavior:

$ metateam kb patch <project/compartment/entry> --old-file old.txt --new-file new.txt
$ metateam kb patch <project/compartment/entry> --old "foo" --new "bar" --all
$ metateam kb patch <project/compartment/entry> --old "foo" --new "bar" --preview

Version History and Recovery

$ metateam kb log <project/compartment/entry>           # Show all versions
$ metateam kb diff <project/compartment/entry> [V1] [V2]
$ metateam kb rollback <project/compartment/entry> [V] [-y]

Delete an Entry

$ metateam kb delete <project/compartment/entry> [-y]

Pass -y to skip confirmation.

List Entries with Optional Path Filter

$ metateam kb list
$ metateam kb list <project>
$ metateam kb list <project/compartment>

Manage Compartments

$ metateam kb compartment create <project/compartment>
$ metateam kb compartment rename <project/compartment> <new_slug>
$ metateam kb compartment delete <project/compartment> [-f] [-y]