CLI cheatsheet

akb is Alexandria's command-line interface. Build it from the repository root:

cargo build --release
./target/release/akb --help

The release binary is ./target/release/akb. The examples below use akb; run the release binary directly or copy it somewhere on your PATH.

Identifiers can be full titles, partial title matches, full UUIDs, or partial UUIDs. Matching is case-insensitive; if multiple notes or tags match, Alexandria asks you to disambiguate.

Notes

akb create "My Important Note"
akb create "Chapter 2" --parent "Book Draft"

akb update "My Important Note" --title "Renamed Note"
akb update "My Important Note" --body "New Markdown body."
akb update "My Important Note" --title "Renamed Note" --body "New Markdown body."

Tags

akb create-tag "Work"
akb create-tag "Task" \
  --properties "priority:select" \
  --properties "status:select" \
  --properties "due_date:date" \
  --properties "completed:boolean"

akb tag "Product Ideas" "Work"
akb untag "Product Ideas" "Work"

Properties

akb set-property "Product Ideas" "Task" "priority" "high"
akb set-property "Product Ideas" "Task" "completed" "true"
akb set-property "Product Ideas" "Task" "due_date" "2025-08-15"

Property types are boolean, select, multi-select, date, number, money, and string.

Search and list

akb search "meeting"
akb search "title:meeting"
akb search "body:quarterly"
akb search "priority:high"
akb search "title:meeting priority:high"

akb list notes
akb list notes --sort-by created
akb list notes --sort-by modified
akb list tags

Property searches use the <property>:<value> form, such as priority:high.

Media

akb create-media "/path/to/image.jpg" "550e8400-e29b-41d4-a716-446655440000"

The first argument is the file path. The optional second argument associates the media item with a note ID. See Media for the mental model.

Sync

akb --root ~/akb/mykb sync clone mykb http://HOST:4000
akb --root ~/akb/mykb sync
akb --root ~/akb/mykb sync watch
akb --root ~/akb/mykb sync status
akb sync list

Sync is end-to-end encrypted and self-hostable. See Sync for setup and security details.

Full reference

This page is a quick reference. The full CLI reference lives in the project at docs/cli-reference.md.