Alexandria
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.
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."
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"
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.
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.
Every akb list is paginated: 10 entries by default, with --limit and --offset to page through the rest. --sort-by applies to notes and tags only — the other listings below have exactly one meaningful order.
akb list notes --limit 25
akb list notes --limit 10 --offset 10
akb trash "Old Meeting Notes"
akb list trashed
akb restore-from-trash 3f3fbf69
akb delete-from-trash 3f3fbf69
akb empty-trash --yes
Trashing a note takes its children with it, and restoring brings the whole subtree back. empty-trash deletes everything for good, so it refuses to run without --yes. See Trash.
akb add-favorite "Project Roadmap"
akb list favorites
akb remove-favorite "Project Roadmap"
akb show "Project Roadmap"
akb list recent --limit 20
Favorites and recents live in the synced preferences.json, so they are the same lists the desktop and Android sidebars show. akb show records the note in recents by default; pass --skip-record-access to look without touching the list.
akb domain list
akb domain enable expenses
akb domain inspect expenses
akb rows Expenses
akb rows Purchases --where "title~pizza" --sort unit_price
akb rows Expenses --where "total>=EUR 30" --sort total
A domain is a ready-made set of tables; enabling one is idempotent, and is also
how a damaged table is repaired. --where is repeatable, a money column takes
its currency inline, and a relation column matches the note id it points at.
akb receipts commit draft.json --image IMG_1234.jpg
akb receipts commit draft.json --image IMG_1234.jpg --force
Stores one receipt as an expense, the place it was incurred at and the items
purchased. source + external_id in the draft are its identity, so committing
the same pair again updates those rows instead of filing a second copy. --force
overwrites a field you have since edited by hand. See
Expenses & receipts for the draft format.
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.
akb --root ~/akb/mykb vault create --name mykb
akb --root ~/akb/mykb vault unlock
akb --root ~/akb/mykb vault status
akb --root ~/akb/mykb vault ttl 12h
akb --root ~/akb/mykb vault lock
Encryption works with no server configured. Sync borrows the key from the unlocked vault.
The vault also stores secrets — API keys and similar values — encrypted alongside the workspace, and syncs them to your other devices:
akb --root ~/akb/mykb vault secret set azure_ocr --description "receipt OCR"
akb --root ~/akb/mykb vault secret get azure_ocr
akb --root ~/akb/mykb vault secret list
akb --root ~/akb/mykb vault secret rm azure_ocr
The value is typed at a hidden prompt or piped in, never passed as an argument, and list prints names and descriptions only.
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.
This page is a quick reference. The full CLI reference lives in the project at docs/cli-reference.md.