Skip to main content

Description

Captures and saves a snapshot of your current work state including commits, branches, PRs, tickets, and code changes to a local journal. This builds a searchable history for context recovery and work summaries. Aliases: snap, save

Usage

devdaily snapshot [options]
# Or use aliases
devdaily snap [options]

Options

-d, --date <date>
string
Snapshot date (YYYY-MM-DD). Default: today
-p, --project <id>
string
Override project identifier (auto-detected from repo by default)
-n, --note <text>
string
Attach a note to this snapshot
-t, --tag <tags...>
string[]
Add custom tags to the snapshot (e.g., “bugfix”, “feature”)
--no-prs
boolean
Skip fetching PR data
--no-tickets
boolean
Skip fetching ticket data
--no-branches
boolean
Skip listing active branches
--light
boolean
Quick snapshot - commits and branch info only (no PRs/tickets)
--debug
boolean
Show detailed debug output
--stats
boolean
Show journal storage stats instead of taking a snapshot
--list [days]
string
List recent snapshots. Default: 7 days
--prune <days>
string
Remove journal entries older than N days

Examples

Take a snapshot now

devdaily snapshot

Add a note

devdaily snapshot --note "Finished OAuth implementation"

Add tags

devdaily snapshot --tag feature --tag auth --tag release-blocker

Quick snapshot (fast mode)

devdaily snapshot --light

Skip external data

devdaily snapshot --no-prs --no-tickets

View recent snapshots

devdaily snapshot --list
devdaily snapshot --list 14  # Last 14 days

View journal stats

devdaily snapshot --stats

Clean old entries

devdaily snapshot --prune 90  # Remove entries older than 90 days

Backdate a snapshot

devdaily snapshot --date 2024-01-15

What Gets Captured

Each snapshot includes:
  • Project metadata - Repository name, path, current branch
  • Today’s commits - All commits made today with messages and file changes
  • Active branches - All local branches with:
    • Commits ahead of base
    • Uncommitted changes
    • Last commit message
  • Pull requests - Associated PRs with status
  • Tickets - Linked tickets from PM tools
  • Diff statistics - Files changed, insertions, deletions
  • Work categories - Auto-categorized by file types (frontend, backend, etc.)
  • Notes and tags - Custom metadata

Light Mode

Use --light for faster snapshots that skip:
  • PR fetching (saves ~1-2 seconds)
  • Ticket fetching (saves ~1-3 seconds)
  • External API calls
Perfect for git hooks or frequent snapshots.

Journal Storage

Snapshots are stored in:
  • Location: ~/.devdaily/journal.json
  • Format: JSON
  • Size: ~1-5 KB per snapshot

List View

The --list output shows:
  • Grouped by date
  • Per-project breakdown
  • Top commits for each day
  • Notes and tags
  • Diff statistics

Stats View

The --stats output includes:
  • Total snapshots
  • Active dates
  • Projects tracked
  • Oldest and newest entries
  • Storage used
  • Per-project freshness (days since last snapshot)

Automatic Snapshots

Set up git hooks to automatically snapshot on:
devdaily init --git-hooks
This installs:
  • post-commit - Snapshot after each commit
  • post-checkout - Snapshot when switching branches

Requirements

  • Must be run inside a git repository
  • Optional: PM tool integration for ticket context
  • Optional: GitHub CLI for PR data