driftlog

Command reference

Run driftlog help <command> for the same text in your terminal.

CommandWhat it does
newCreate a new entry in $EDITOR.
listList entries, newest first, with filters.
showPrint one or more entries to stdout.
searchFull-text search across the journal.
editRe-open an existing entry.
tagAdd or remove tags on an entry.
exportRender the journal to Markdown, HTML, or JSON.
statsCounts, streaks, and tag frequency.
reindexRebuild the search index from the files on disk.

driftlog new

driftlog new [--tag TAG]... [--date DATE] [--stdin]

  --tag TAG     Attach one or more tags to the new entry.
  --date DATE   Backdate the entry (e.g. "yesterday", 2026-06-01).
  --stdin       Read the entry body from stdin instead of $EDITOR.

driftlog list

driftlog list [--tag TAG]... [--since DATE] [--until DATE] [--limit N] [--oneline]

  --since, --until   Accepts natural dates ("last monday", "3 days ago") or ISO dates.
  --limit N          Show at most N entries (default 50).
  --oneline          One entry per line: date, time, tags, title.

driftlog search

driftlog search QUERY [--tag TAG]... [--since DATE] [--context N]

  QUERY        Words to match; quote for phrases. Ranked by relevance.
  --context N  Show N lines of surrounding text around each match.

driftlog export

driftlog export [--format md|html|json] [--out PATH] [--tag TAG]... [--since DATE]

  --format     Output format. Default: md.
  --out PATH   Write to a file instead of stdout.

HTML export produces a single self-contained file with a table of contents โ€” handy for printing a year of entries or handing them to someone.

driftlog stats

$ driftlog stats
entries        1,284
first entry    2024-02-09
current streak 11 days
top tags       #work (412)  #running (188)  #reading (151)

Global flags

--journal DIR   Use a different journal directory for this run.
--config FILE   Use an alternate config file.
--no-color      Disable ANSI colour.
--version       Print version and build date.