Back to Browse

Devlog Cli MCP Server

by SpIob
Developer ToolsLow Risk10.0MCP RegistryLocal
Free

Server data from the Official MCP Registry

Offline developer journal with local-LLM digests, semantic search, and MCP server.

About

Offline developer journal with local-LLM digests, semantic search, and MCP server.

Security Report

10.0
Low Risk10.0Low Risk

Valid MCP server (0 strong, 2 medium validity signals). No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry.

5 files analyzed · 1 issue found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

env_vars

Check that this permission is expected for this type of plugin.

file_system

Check that this permission is expected for this type of plugin.

database

Check that this permission is expected for this type of plugin.

What You'll Need

Set these up before or after installing:

Storage backend: json (default) or sqliteOptional

Environment variable: DEVLOG_BACKEND

Custom data directory for the journalOptional

Environment variable: DEVLOG_DATA_DIR

IANA timezone for local date bucketing (e.g., America/New_York)Optional

Environment variable: DEVLOG_TZ

Ollama server URL for AI features (default: http://127.0.0.1:11434)Optional

Environment variable: DEVLOG_OLLAMA_HOST

Embedding model for semantic search (default: nomic-embed-text)Optional

Environment variable: DEVLOG_EMBED_MODEL

Enable LLM summaries by default (set to '1')Optional

Environment variable: DEVLOG_AI

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "devlog-tool": {
      "command": "uvx",
      "args": [
        "devlog-tool==2.0.1"
      ],
      "env": {
        "DEVLOG_AI": "your-devlog-ai-here",
        "DEVLOG_TZ": "your-devlog-tz-here",
        "DEVLOG_BACKEND": "your-devlog-backend-here",
        "DEVLOG_DATA_DIR": "your-devlog-data-dir-here",
        "DEVLOG_EMBED_MODEL": "your-devlog-embed-model-here",
        "DEVLOG_OLLAMA_HOST": "your-devlog-ollama-host-here"
      }
    }
  }
}

Some servers take additional arguments. See the repository for details.

Documentation

View on GitHub

From the project's GitHub README.

devlog-cli

CI PyPI Python License: MIT

A terminal-based developer journal — log, search, filter, and export daily progress entries without leaving the command line. Local-AI powered: weekly digests, semantic search, and an MCP server for AI agents, all fully offline.


Demo

devlog-cli demo — add, list, search, stats, calendar heatmap, and semantic ask


Installation

With pipx (recommended — keeps devlog isolated):

pipx install devlog-tool

With pip:

pip install devlog-tool

With the ai extra (documents the AI tier — digest/ask/mcp; the features are built in and stdlib-only, you just need a local Ollama server for --llm and ask):

pipx install "devlog-tool[ai]"
ollama pull llama3.2 nomic-embed-text

From source:

pipx install git+https://github.com/SpIob/devlog-cli.git

After installation, the devlog command is available globally in your terminal.

Requires Python 3.10+.


Switching from jrnl / Day One

Already journaling? Bring your history with you — the importers are built in:

devlog import ~/.jrnl/journal.json        # jrnl JSON export (format auto-detected)
devlog import ~/Downloads/Day\ One.json   # Day One JSON export (format auto-detected)

Tags and timestamps carry over, Day One uuids are preserved as entry ids, and re-importing the same file is a no-op (entries dedupe by id or a (created_at, message) fingerprint) — you can switch without a cliff.

devlogjrnlDay Oneplain notes
Runs fully offline✓✓✓✓
No account, no cloud✓✓—✓
Built-in MCP server for AI agents✓———
Semantic search via local LLM (ask)✓———
Offline weekly digests✓———
Git-native entries (--from-commit)✓———
Streaks, tag co-occurrence, calendar heatmap✓———
Tags + date/tag filtering✓✓✓—

Quick Start

# Log what you did this morning
devlog add "Set up staging environment on Railway" -t devops

# Add an entry with multiple tags
devlog add "Fixed off-by-one error in pagination logic" -t bugfix -t backend

# Review today's work
devlog list

# Find everything related to your auth work
devlog search "auth"

# Narrow list output to a specific tag
devlog list -t bugfix

# Show the full text of a single entry by ID
devlog show a1b2c3d4

# Edit a typo in an entry's message
devlog edit a1b2c3d4 -m "Corrected message text"

# Backdate a forgotten entry
devlog add "Wrote the README yesterday" --at "2h"

# Delete an entry (prompts for confirmation; use -y to skip)
devlog delete a1b2c3d4 -y

# See which tags you use most
devlog tags

# Show all entries with a particular tag
devlog tag backend

# Strip a tag from every entry that has it
devlog tag backend --delete

# Merge two tags (add NEW to entries that have OLD, then remove OLD)
devlog merge-tag backend devops

# See what you logged today / yesterday
devlog today
devlog yesterday

# See the last 7 days
devlog week

# See the 10 most recent entries
devlog tail 10

# Get a quick journal summary with a 30-day sparkline
devlog stats

# See a year-grid heatmap of activity
devlog calendar

# Rename a tag across every entry
devlog rename-tag backend devops

# Customize the colors (optional)
devlog theme show > ~/.devlog/theme.toml
$EDITOR ~/.devlog/theme.toml
devlog theme set ~/.devlog/theme.toml

# Import entries from an exported Markdown file
devlog import ~/notes/old-log.md

# Launch the interactive REPL
devlog --interactive

# Export everything to a Markdown file for your weekly review
devlog export -o ~/notes/week-20.md

Command Reference

devlog add

Add a new journal entry.

devlog add MESSAGE [OPTIONS]
Argument / OptionShortTypeRequiredDefaultDescription
MESSAGE—stringYes—The body of the journal entry.
--tag-tstringNo—Attach a tag to the entry. Repeatable: -t backend -t bugfix. Tags are normalized to lowercase. Allowed characters: [a-z0-9-].
--at—stringNo—Backfill the entry with a custom created_at. Accepts absolute timestamps (YYYY-MM-DD, YYYY-MM-DDTHH:MM, …Z) and relative ones (2h, 30m ago). With DEVLOG_TZ set, naive inputs are interpreted in that zone.
--quiet-qflagNoFalseSuppress confirmation output. Exits silently with code 0 on success.

Notes:

  • Tag validation: see Tag rules.
  • An empty message string exits with code 1.

Examples:

devlog add "Finished OAuth2 integration"
devlog add "Refactored database connection pool" -t backend -t refactor
devlog add "Deployed hotfix to production" -t devops -q
devlog add "Wrote the README yesterday" --at "2h"
devlog add "Logged a meeting from 9am" --at "2025-08-28T09:00:00Z"

devlog list

Display journal entries in a formatted table, newest first.

devlog list [OPTIONS]
OptionShortTypeDefaultDescription
--tag-tstringNoneFilter by tag. Repeatable. Multiple flags use AND logic — entry must carry all specified tags.
--limit-ninteger20Maximum number of entries to display. Must be a positive integer.
--all—flagFalseOverride --limit and display every entry.
--since—stringNoneOnly show entries on or after this date. See Date filters.
--until—stringNoneOnly show entries on or before this date. See Date filters.
--quiet-qflagFalseOutput one raw JSON object per line to STDOUT instead of the Rich table. Useful for scripting.

Notes:

  • Results are sorted newest first.
  • Message text is truncated to 60 characters with a … suffix in table view.
  • If no entries exist, prints No entries found. and exits with code 0.
  • If filters are applied and nothing matches, prints No entries match your filters. and exits with code 0.

Examples:

devlog list
devlog list -t bugfix
devlog list -t backend -t auth --limit 5
devlog list --all
devlog list --since 2025-01-01 --until 2025-12-31
devlog list --since 7d
devlog list --quiet | jq '.tags'

devlog search

Full-text search across all entry messages.

devlog search QUERY [OPTIONS]
Argument / OptionShortTypeRequiredDefaultDescription
QUERY—stringYes—Search term. Case-insensitive substring match against the message field. Multiple space-separated terms require ALL of them (AND). Wrap a phrase in quotes to match it exactly. With --regex, QUERY is a regular expression.
--tag-tstringNoNoneNarrow results to entries that also carry these tags. Repeatable; AND logic.
--limit-nintegerNo20Maximum number of results to display.
--since—stringNoNoneOnly show entries on or after this date. See Date filters.
--until—stringNoNoneOnly show entries on or before this date. See Date filters.
--regex—flagNoFalseInterpret QUERY as a case-insensitive regular expression. Invalid patterns exit with code 2.
--quiet-qflagNoFalseOutput raw JSON lines to STDOUT instead of the Rich table.

Notes:

  • Matching substrings are highlighted in bold yellow in the Message column (single-term queries only; highlighting is skipped for multi-term and regex queries).
  • An empty or whitespace-only QUERY is rejected with QUERY cannot be empty. and exits with code 1.
  • If no results are found, prints No entries matched "<query>". and exits with code 0.
  • Tag filters and the search term both apply simultaneously (AND logic).

Examples:

devlog search "null pointer"
devlog search auth login              # AND: both terms required
devlog search "login bug" auth        # quoted phrase + term
devlog search "^Fix bug #[0-9]+$" --regex
devlog search "cache" -t backend
devlog search "deploy" --limit 10
devlog search "refactor" --since 7d
devlog search "refactor" --quiet | jq '.'

devlog on

Show entries for a specific date — the missing sibling of today / yesterday / week.

devlog on DATE [OPTIONS]
Argument / OptionShortTypeRequiredDefaultDescription
DATE—stringYes—today, yesterday, Nd (N days ago, e.g. 3d), or an absolute YYYY-MM-DD.
--limit-nintegerNo50Maximum entries to show.
--quiet-qflagNoFalseOutput raw JSON lines.

Notes:

  • The day bucket is the local date when DEVLOG_TZ is set, otherwise UTC — same rule as today/yesterday/week.
  • An unparseable DATE exits with code 2.

Examples:

devlog on today
devlog on yesterday
devlog on 3d                # three days ago
devlog on 2025-05-10

devlog show

Display a single entry in full detail (no message truncation).

devlog show ID
Argument / OptionShortTypeRequiredDefaultDescription
ID—stringYes—The 8-char short id, the full UUID, or a unique prefix of either.
--quiet-qflagNoFalseOutput a single raw JSON line instead of the panel.

Notes:

  • If the prefix matches more than one entry, the command exits with code 1 and lists the candidate short ids.
  • The full message is shown (no 60-char truncation).
  • Updated displays — for entries that have never been edited, otherwise the timestamp of the most recent edit.

Examples:

devlog show a1b2c3d4
devlog show a1b2
devlog show a1b2c3d4-e5f6-7890-abcd-ef1234567890 --quiet

devlog edit

Edit an entry's message and/or tags in place. Preserves the original created_at (unless --at is supplied) and sets updated_at on success.

devlog edit ID [OPTIONS]
Argument / OptionShortTypeRequiredDefaultDescription
ID—stringYes—The 8-char short id, the full UUID, or a unique prefix.
--message-mstringNo—Replace the message text.
--tag-tstring, repeatableNo—Replace the tag set with this list. Existing tags are discarded.
--add-tag—string, repeatableNo—Append tags to the existing set. Duplicates are silently dropped.
--remove-tag—string, repeatableNo—Remove tags from the existing set.
--at—stringNo—Replace the entry's created_at. Same format as add --at. Prompts for confirmation unless --yes is also passed.
--yes-yflagNoFalseSkip the --at confirmation prompt.
--quiet-qflagNoFalseSuppress confirmation output.

Notes:

  • If no flag is passed, the entry's current message is opened in $VISUAL / $EDITOR (falling back to nano or vi if neither is set). Save and exit to apply the edit; abort to discard. This requires a TTY; in a non-interactive shell (CI, scripts, output captured to a file), edit with no flags errors out instead of dumping terminal escapes. Set DEVLOG_ALLOW_EDITOR_IN_PIPE=1 to opt in to the old behaviour.
  • An empty --message is rejected with the same MESSAGE cannot be empty error as devlog add. The editor path is allowed to produce an empty body, since the user may want to save a blank note on purpose.
  • No-op edits (the result equals the existing entry) print No changes. and exit 0 without touching the file.
  • Tag flags combine: --tag runs first, then --add-tag adds, then --remove-tag removes.
  • Validation rules for tag characters and length: see Tag rules.

Examples:

devlog edit a1b2c3d4 -m "Corrected typo in the original entry"
devlog edit a1b2c3d4 --add-tag urgent
devlog edit a1b2c3d4 --remove-tag docs --add-tag refactor
devlog edit a1b2c3d4     # opens $EDITOR with the current message
devlog edit a1b2c3d4 --at "2025-08-28T09:00:00Z" --yes   # re-time without prompt

devlog delete

Delete an entry by id.

devlog delete ID [OPTIONS]
Argument / OptionShortTypeRequiredDefaultDescription
ID—stringYes—The 8-char short id, the full UUID, or a unique prefix.
--yes-yflagNoFalseSkip the confirmation prompt.
--quiet-qflagNoFalseSuppress the success panel.
--ignore-missing—flagNoFalseExit 0 (not 1) when the given ID does not exist. Useful in scripts where delete should be idempotent.

Notes:

  • By default, the command asks for confirmation ([y/N]). Decline to abort without changes; confirm to delete and render a red-bordered panel.
  • Deletion is atomic — the JSON file is rewritten via the same temp-file + os.replace() pattern as every other write.

Examples:

devlog delete a1b2c3d4              # confirm interactively
devlog delete a1b2c3d4 -y           # skip prompt
devlog delete a1b2 -y               # delete by unique prefix
devlog delete a1b2c3d4 -y --ignore-missing   # idempotent: no error if absent

devlog tags

List all distinct tags with their usage count and the most recent date they were used.

devlog tags [OPTIONS]
OptionShortTypeDefaultDescription
--sort—choicecountOne of count (most-used first), name (alphabetical), or recent (most recently used first).
--limit-ninteger50Maximum number of tags to show.
--all—flagFalseOverride --limit and show every tag.
--quiet-qflagFalseOutput {tag, count, last_used} JSON lines instead of the table.

Notes:

  • Last used is the more recent of the entry's created_at and updated_at, so editing a tag keeps its timestamp fresh.
  • Empty state: prints No tags found. and exits 0.

Examples:

devlog tags
devlog tags --sort name
devlog tags --limit 10
devlog tags --quiet | jq '.tag'

devlog theme

View or change the active color theme. Themes live in ~/.devlog/theme.toml (or $DEVLOG_DATA_DIR/theme.toml when set) and override individual color roles. See the Themes section for the full list of roles and a starter file.

devlog theme SUBCOMMAND
SubcommandDescription
devlog theme listPrint every role and its current style as a two-column table (with section grouping and preview swatches by default).
devlog theme show [ROLE]Print the value of a single role, or dump a starter theme.toml (all roles commented out) to STDOUT.
devlog theme set PATHValidate and install a theme file as the active theme. Unknown roles are dropped with a warning. Add --check to validate without installing.
devlog theme use NAMEInstall a bundled theme by name (e.g. devlog theme use dracula). Use devlog theme use default to reset to the built-in defaults.
devlog theme builtinsList all bundled theme names with their short description.
devlog theme resetRemove the active theme file and fall back to the defaults. Prompts for confirmation.
devlog theme editOpen the active theme file in $VISUAL/$EDITOR. Creates a starter template if no file exists yet.
devlog theme createInteractively walk through every role, preview the palette, and install it as the active theme (or write to --output PATH).
devlog theme diffShow the active theme's overrides relative to the built-in defaults. With --default, inverts to show roles that still match the defaults.
devlog theme exportWrite the active palette as a complete, uncommented theme.toml to --output PATH or --stdout.
devlog theme pathPrint the absolute path to the active theme file.

Notes:

  • theme list accepts --flat (disable section grouping) and --no-preview (hide the preview swatch column).
  • theme set accepts --check to validate a theme file without installing it (exits 1 on any error).
  • theme create accepts --from BUNDLED_NAME to seed values from a built-in theme, --name/--description for [meta], --output PATH to write to a file instead of installing, and --install/--no-install to control installation explicitly.
  • theme export requires exactly one of --stdout or --output PATH.

Examples:

# See every color role (grouped, with preview swatches)
devlog theme list
devlog theme list --flat --no-preview   # compact, single column

# Read a single role's value
devlog theme show date
# → cyan

# Generate a starter theme file you can edit
devlog theme show > ~/my-theme.toml
$EDITOR ~/my-theme.toml   # uncomment and tweak the roles you want to change
devlog theme set ~/my-theme.toml
devlog theme set ~/my-theme.toml --check   # validate only, don't install

# Try a bundled theme
devlog theme builtins
devlog theme use dracula
devlog theme use default                   # reset to built-in defaults

# Find the active theme path (useful for `ln -s` workflows)
devlog theme path
# → /Users/you/.devlog/theme.toml

# Edit the active theme in your $EDITOR
devlog theme edit

# Build a new theme interactively
devlog theme create --from nord --name "My Nord Variant"
devlog theme create --output ~/my-theme.toml --no-install

# Audit your overrides
devlog theme diff          # show only roles that differ from defaults
devlog theme diff --default    # show only roles that still match defaults

# Export the active palette
devlog theme export --output ~/devlog-palette.toml
devlog theme export --stdout > ~/devlog-palette.toml

devlog today

Show entries created today, newest first.

devlog today [OPTIONS]
OptionShortTypeDefaultDescription
--limit-ninteger50Maximum entries to show.
--quiet-qflagFalseOutput raw JSON lines instead of a table.

Notes:

  • "Today" is computed in the local zone when DEVLOG_TZ is set, otherwise UTC. Set DEVLOG_TZ=America/New_York to make today, yesterday, and week reflect your wall clock.
  • Empty state: prints No entries yet today. and exits 0.

Examples:

devlog today
devlog today --limit 5
devlog today --quiet

devlog yesterday

Show entries created yesterday, newest first. Same local-tz semantics as today.

devlog yesterday [OPTIONS]
OptionShortTypeDefaultDescription
--limit-ninteger50Maximum entries to show.
--quiet-qflagFalseOutput raw JSON lines instead of a table.

Examples:

devlog yesterday
devlog yesterday --quiet

devlog week

Show entries from the last 7 days, newest first. The window ends on today (or the --day anchor) and spans the 6 days before it.

devlog week [OPTIONS]
OptionShortTypeDefaultDescription
--limit-ninteger100Maximum entries to show.
--day—string (YYYY-MM-DD)todayAnchor day; the week ends on this day and includes the 6 days before it.
--quiet-qflagFalseOutput raw JSON lines instead of a table.

Examples:

devlog week
devlog week --day 2025-05-10
devlog week --limit 20 --quiet

devlog tail

Show the N most recent entries (default 5), newest first.

devlog tail [N] [OPTIONS]
Argument / OptionShortTypeDefaultDescription
N—integer5Number of entries to show.
--tag-tstring, repeatableNoneFilter by tag (AND logic).
--quiet-qflagFalseOutput raw JSON lines.

Examples:

devlog tail        # last 5
devlog tail 20
devlog tail 10 -t bugfix

devlog stats

Show a one-glance summary of the journal: totals, date range, current and longest writing streaks, top tags and tag pairs, days since the last entry, and a 30-day sparkline of entries per day.

devlog stats [OPTIONS]
OptionShortTypeDefaultDescription
--quiet-qflagFalseOutput a single JSON object with the summary.
--since—stringNoneOnly include entries on or after this date. See Date filters.
--until—stringNoneOnly include entries on or before this date. See Date filters.

Notes:

  • The sparkline is an ASCII bar (▁–█) representing entries per day for the last 30 days. The window and date range are computed in the local zone when DEVLOG_TZ is set, otherwise UTC.
  • The First / Last / Span lines render in the local zone when DEVLOG_TZ is set (the … UTC suffix becomes the zone's key, e.g. … EST).
  • The Streak line shows your current consecutive-day streak (counted back from today; writing yesterday but not today keeps it alive) plus the longest streak in journal history. Last entry: N days ago is the nudge line.
  • Top tag pairs lists the tag co-occurrences — the two tags most often written on the same entry.
  • --quiet adds streaks ({"current": N, "longest": N}), top_tag_pairs ([{"tags": [a, b], "count": N}]), and days_since_last to the JSON object.
  • Empty state: prints No entries to summarize. and exits 0.

Example output:

╭─ Journal Stats ─────────────────────────────────────────╮
│                                                       │
│  Total     : 142                                      │
│  First     : 2025-04-12 09:14 UTC                     │
│  Last      : 2026-08-29 11:02 UTC                     │
│  Span      : 139 days                                 │
│  Avg/day   : 1.02                                     │
│                                                       │
│  Top 5 tags                                           │
│    backend : 41                                       │
│    bugfix  : 28                                       │
│    docs    : 17                                       │
│    devops  : 12                                       │
│    refactor: 9                                        │
│                                                       │
│  Last 30 days (entries per day)                          │
│  ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█▁▁█▁█                     │
╰───────────────────────────────────────────────────────╯

Examples:

devlog stats
devlog stats --quiet | jq '.total, .top_tags'

devlog tag

Show entries that carry a tag, or strip a tag from every entry that has it. (No entries are deleted by --delete.)

devlog tag NAME [OPTIONS]
Argument / OptionShortTypeRequiredDefaultDescription
NAME—stringYes—The tag to inspect. Normalised to lowercase.
--delete—flagFalseStrip the tag from every entry that has it (prompts for confirmation; use -y to skip).
--yes-yflagFalseWith --delete: skip the confirmation prompt.
--dry-run—flagFalseWith --delete: show what would change without writing.
--limit-ninteger20Show mode: max entries to list.
--all—flagFalseShow mode: override --limit and list every entry.
--quiet-qflagFalseOutput raw JSON lines (or suppress the success line under --delete).

Notes:

  • NAME is validated with the same rules as devlog add — see Tag rules.
  • devlog tag NAME --delete asks Remove tag "NAME" from N entries? by default — pass -y/--yes to skip, or combine with --quiet to skip the prompt in scripts.
  • devlog tag NAME --delete --dry-run previews the change without writing.
  • Use devlog merge-tag A B if you want to combine two tags instead of just inspecting or removing one.

Examples:

devlog tag backend
devlog tag backend --limit 5
devlog tag backend --delete -y
devlog tag backend --delete --dry-run

devlog calendar

Show a year-grid heatmap of journal activity. Each cell is one day; the colour tier reflects the entry count for that day.

devlog calendar [OPTIONS]
OptionShortTypeDefaultDescription
--year—integercurrent yearYear to render.
--quiet-qflagFalseOutput a {YYYY-MM-DD: count} JSON map for the year.

Notes:

  • The grid uses the heatmap_empty / heatmap_l1 … heatmap_l4 theme roles. See Themes to restyle.
  • The bucketing date is the local date when DEVLOG_TZ is set, otherwise UTC. With DEVLOG_TZ=America/New_York, an entry at 02:00 UTC on Jan 1 lands in Dec 31's cell.
  • Empty state: prints No entries in <year>. and exits 0.

Examples:

devlog calendar
devlog calendar --year 2024
devlog calendar --year 2024 --quiet | jq

devlog rename-tag

Rename a tag across every entry in the journal (bulk replace).

devlog rename-tag OLD NEW [OPTIONS]
Argument / OptionShortTypeRequiredDefaultDescription
OLD—stringYes—The existing tag to replace.
NEW—stringYes—The new tag name. Validated as a tag (see Tag rules).
--dry-run—flagNoFalseShow the count of affected entries without writing.
--quiet-qflagNoFalseSuppress the success line.

Notes:

  • Every entry that contains OLD is rewritten in place. The entry's created_at is preserved and updated_at is set to the current UTC time.
  • If an entry already carries NEW, the result is deduplicated so no entry ends up with the same tag twice.
  • If no entries carry OLD, prints No entries with tag "<old>". and exits 0.
  • NEW is validated against the tag rules (see Tag rules) and rejected with a clear error if it would be invalid. (Older versions used to silently no-op when the lowercased NEW happened to equal OLD — that path is fixed.)

Examples:

devlog rename-tag backend devops
devlog rename-tag bugfix fix --dry-run

devlog merge-tag

Merge OLD into NEW across every entry: every entry that has OLD gets NEW added (deduplicated) and OLD removed. Entries that already carry NEW are not double-tagged.

devlog merge-tag OLD NEW [OPTIONS]
Argument / OptionShortTypeRequiredDefaultDescription
OLD—stringYes—The tag to retire.
NEW—stringYes—The tag to consolidate into. Validated as a tag (see Tag rules).
--dry-run—flagFalseShow the count of affected entries without writing.
--quiet-qflagFalseSuppress the success line.

Notes:

  • If OLD.lower() == NEW.lower() after normalisation, the command prints OLD and NEW are the same ("…"). No changes made. and exits 0.
  • If no entries carry OLD, prints No entries with tag "OLD". and exits 0.
  • For a pure rename use devlog rename-tag. For stripping a tag entirely, use devlog tag <name> --delete.

Examples:

devlog merge-tag backend devops
devlog merge-tag bugfix fix --dry-run

devlog import

Import entries from a JSON file (the native entries.json shape), from a Markdown file produced by devlog export, or from a jrnl or Day One JSON export.

devlog import PATH [OPTIONS]
Argument / OptionShortTypeRequiredDefaultDescription
PATH—pathYes—Input file. Must exist and be readable.
--format-fchoiceautoOne of auto, json, markdown, jrnl, dayone. auto picks by file extension, then by content sniffing.
--dry-run—flagFalseShow what would be imported without writing.
--quiet-qflagFalseSuppress the summary line.

Notes:

  • Re-importing the same file is safe and idempotent: entries are recognised by their existing id (when present in the source) or by their (created_at, message) fingerprint, so the second import is a no-op.
  • Stable id values in the source JSON are preserved across re-imports, so a devlog export → devlog import round-trip keeps short ids stable for cross-referencing. If the source row omits id, devlog mints a fresh one.
  • Unreadable rows in a JSON import (non-dict items or entries missing required fields) are reported in the summary line as Ignored N unreadable rows.
  • Auto-detect sniffs the first non-blank character when the file extension is missing, so pipes and extensionless files work: leading { → JSON, leading # → Markdown.
  • jrnl format: an object with an entries array whose items carry text/date/starred. text becomes the message, date (naive timestamps are treated as UTC) becomes created_at, tags carry over, and a starred entry gains a starred tag. Re-imports dedupe by fingerprint since jrnl rows have no stable ids.
  • Day One format: an object with an entries array whose items carry creationDate/text. The Day One uuid is preserved as the entry id; tags are lowercased with spaces converted to hyphens.
  • If the file format cannot be detected and --format was not given, exits with code 2.
  • Malformed JSON or markdown that contains no ## … headings exits with code 2.

Examples:

devlog import ~/notes/old-log.md
devlog import /tmp/entries.json --format json
devlog import ~/.jrnl/journal.json --format jrnl     # or just: devlog import ~/.jrnl/journal.json
devlog import ~/Downloads/Day\\ One.json              # auto-detects Day One
devlog import /tmp/entries.json --dry-run

devlog git

Git integration for keeping your journal inside a repository (sync + history for free).

devlog git {status|sync|log} [OPTIONS]
CommandOptionTypeDefaultDescription
git status--jsonflagFalseEmit the full status (repo root, branch, remote, clean flag, changed files) as one JSON object.
git sync--message / -mstringdevlog: journal updateCommit message used when changes are found.
git sync--quiet / -qflagFalseSuppress output.
git log--onelineflagFalseOne commit per line.
git log--limit / -ninteger20Maximum commits to show.

Notes:

  • Commands resolve the repository containing your data dir (DEVLOG_DATA_DIR or ~/.devlog) — the data dir itself does not need to be the repo root; a journal subdirectory inside a repo works.
  • git status reports is_git_repo: false (exit 0) when no repository is found.
  • git sync runs git add -A + git commit only when git status --porcelain is non-empty; a clean repo is a no-op. Exits 1 when the data dir is not inside a repository.
  • git log prints the repository's commit log (not filtered to journal files). A repository with no commits exits 1 with git's does not have any commits yet error.

Example recipe — journal inside an existing repo:

# Keep the journal in a private repo and commit after each entry.
export DEVLOG_DATA_DIR="$HOME/Dropbox/devlog-repo"
git -C "$HOME/Dropbox/devlog-repo" init   # once

devlog add "shipped the thing"
devlog git sync                            # commits journal changes
devlog git status                          # dirty state at a glance

Example recipe — auto-commit after every write (shell hook):

# In your shell rc: sync the journal whenever devlog writes to it.
devlog() {
  command devlog "$@" || return $?
  case "$1" in
    add|edit|delete|import|restore|merge-tag|rename-tag) command devlog git sync -q ;;
  esac
}

Git-native entries: devlog add --from-commit

Turn a commit into a journal entry — the message, tags, and timestamp come from the commit itself.

devlog add [NOTE] --from-commit REF
Argument / OptionShortTypeRequiredDefaultDescription
NOTE—stringYes*—Optional note prefixed to the commit subject. Pass an empty string ("") to use the commit message alone. *Required by the parser; "" is the "no note" idiom.
--from-commit—git ref—NoneAny ref git show accepts: HEAD, HEAD~1, a sha, a branch name.
--tag / -t—stringNoNoneExtra tags, merged in front of the ones extracted from the commit.
--at—timestampNoauthor dateOverride the entry timestamp (same formats as a plain add --at).

Notes:

  • Message: the commit subject (first line) is used; a NOTE argument is prefixed as NOTE\n\n<subject>.
  • Tags: a conventional-commit scope (feat(auth): …, fix(api): …) becomes the tag auth/api; a [tag] message prefix also becomes a tag; a commit-<short-hash> tag is always added for cross-referencing back to git log.
  • Timestamp: the commit's author date, normalised to UTC.
  • Must be run inside a git repository; exits 1 outside one or with an unresolvable ref.

Examples:

# Journal the commit you just shipped
devlog add "" --from-commit HEAD

# With a note and extra tags
devlog add "reviewed with the team" --from-commit HEAD~2 -t retro

# Journal the whole day's work from git history
for ref in $(git log --since=midnight --format=%h); do
  devlog add "" --from-commit "$ref" -q
done

devlog completions

Print a shell completion script to STDOUT. Source or install it according to your shell's conventions.

devlog completions {bash|zsh|fish}

Examples:

# bash
devlog completions bash > ~/.bash_completion.d/devlog

# zsh (place in a directory on $fpath)
devlog completions zsh > ~/.zsh/completions/_devlog

# fish
devlog completions fish > ~/.config/fish/completions/devlog.fish

devlog --interactive

Launch a minimal line-based REPL for browsing and adding entries without leaving the prompt.

devlog --interactive
devlog -i
DEVLOG_INTERACTIVE=1 devlog

REPL commands (run help at the prompt to see the up-to-date list — every command in the CLI is available, plus a few aliases):

CommandWhat it does
add <message> [-t tag ...]Add a new entry.
l | list [-t tag] [-n N]List entries.
s | search <query>Search entry messages.
show <id>Show a single entry.
edit <id> [-m msg] [-t tag]Edit an entry.
delete <id> [-y]Delete an entry.
todayShow today's entries.
y | yesterdayShow yesterday's entries.
w | weekShow the current week.
tail [N]Show the N most recent entries.
tagsList tags with usage counts.
statsSummarize the journal.
tag <name>List entries with a tag (or --delete -y to remove the tag from every entry).
merge-tag <old> <new>Rename one tag everywhere.
calendarYear-grid heatmap of journal activity.
themeView or change the active color theme (sub: list, show, set, path, reset, edit, diff, export, use, builtins, create).
rename-tag <old> <new>Rename a tag.
import <path>Import entries.
completions <shell>Print a shell completion script.
export [-o path]Export to Markdown or JSON.
repair [-y] [--dry-run]Inspect and repair the on-disk store.
backup [-o path]Write a timestamped backup.
restore <path>Restore from a backup file.
doctorCheck store health.
h | helpShow the REPL help.
q | quit | exitLeave the REPL.

Notes:

  • Requires a TTY. Outside a TTY the command exits with code 1 and a clear error message. Set DEVLOG_INTERACTIVE_FORCE=1 to bypass the TTY check (useful in tests, scripts, or remote shells).
  • Any other subcommand argument is dispatched to the underlying CLI in-process.

Examples:

devlog --interactive
DEVLOG_INTERACTIVE=1 devlog

devlog export

Export all entries (or a filtered subset) to a Markdown or JSON file.

devlog export [OPTIONS]
OptionShortTypeDefaultDescription
--output-opath<data-dir>/exports/devlog-YYYYMMDD-HHMMSS.<ext>Destination file path. Existing files are overwritten without prompting. When omitted, files land in $DEVLOG_DATA_DIR/exports/ (or ~/.devlog/exports/) rather than the current working directory, so cd-ing around doesn't pollute the cwd.
--format-fauto | markdown | jsonautoOutput format. auto infers from the --output extension (.json → JSON, .md/.markdown → Markdown, anything else → Markdown). Explicit --format wins over the extension.
--tag-tstringNoneExport only entries that carry all specified tags. Repeatable; AND logic.
--since—stringNoneOnly export entries on or after this date. See Date filters.
--until—stringNoneOnly export entries on or before this date. See Date filters.
--quiet-qflagFalseSuppress the progress bar and confirmation. Prints only the output path on success.

Output format per entry:

## 2025-05-11 10:22 UTC — a1b2c3d4

Rewrote auth middleware to use JWT refresh tokens.

**Tags:** backend, security

---

Notes:

  • A Rich progress bar is shown on STDERR during the write (suppress with --quiet).
  • If no entries exist (or no entries match the tag filters), prints Warning: No entries to export. and exits with code 0. No file is created in that case, so you can safely re-run after emptying the journal.
  • If the output path is not writable, exits with code 2 and a clear error message.

Examples:

devlog export
devlog export -o ~/notes/week-20.md
devlog export -t backend -o backend-log.md
devlog export --since 2025-01-01 --until 2025-12-31 -o year.md
devlog export --quiet -o /tmp/devlog.md

devlog repair

Inspect the on-disk journal and, optionally, rewrite it to drop malformed rows. Useful when devlog doctor reports validation issues, or when the file has been hand-edited and broken.

devlog repair [OPTIONS]

Documentation truncated — see the full README on GitHub.

Reviews

No reviews yet

Be the first to review this server!