> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/hempun10/devdaily/llms.txt
> Use this file to discover all available pages before exploring further.

# devdaily snapshot

> Save a snapshot of your current work state to your local journal

## 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

```bash theme={null}
devdaily snapshot [options]
# Or use aliases
devdaily snap [options]
```

## Options

<ParamField path="-d, --date <date>" type="string">
  Snapshot date (YYYY-MM-DD). Default: today
</ParamField>

<ParamField path="-p, --project <id>" type="string">
  Override project identifier (auto-detected from repo by default)
</ParamField>

<ParamField path="-n, --note <text>" type="string">
  Attach a note to this snapshot
</ParamField>

<ParamField path="-t, --tag <tags...>" type="string[]">
  Add custom tags to the snapshot (e.g., "bugfix", "feature")
</ParamField>

<ParamField path="--no-prs" type="boolean">
  Skip fetching PR data
</ParamField>

<ParamField path="--no-tickets" type="boolean">
  Skip fetching ticket data
</ParamField>

<ParamField path="--no-branches" type="boolean">
  Skip listing active branches
</ParamField>

<ParamField path="--light" type="boolean">
  Quick snapshot - commits and branch info only (no PRs/tickets)
</ParamField>

<ParamField path="--debug" type="boolean">
  Show detailed debug output
</ParamField>

<ParamField path="--stats" type="boolean">
  Show journal storage stats instead of taking a snapshot
</ParamField>

<ParamField path="--list [days]" type="string">
  List recent snapshots. Default: 7 days
</ParamField>

<ParamField path="--prune <days>" type="string">
  Remove journal entries older than N days
</ParamField>

## Examples

### Take a snapshot now

```bash theme={null}
devdaily snapshot
```

### Add a note

```bash theme={null}
devdaily snapshot --note "Finished OAuth implementation"
```

### Add tags

```bash theme={null}
devdaily snapshot --tag feature --tag auth --tag release-blocker
```

### Quick snapshot (fast mode)

```bash theme={null}
devdaily snapshot --light
```

### Skip external data

```bash theme={null}
devdaily snapshot --no-prs --no-tickets
```

### View recent snapshots

```bash theme={null}
devdaily snapshot --list
devdaily snapshot --list 14  # Last 14 days
```

### View journal stats

```bash theme={null}
devdaily snapshot --stats
```

### Clean old entries

```bash theme={null}
devdaily snapshot --prune 90  # Remove entries older than 90 days
```

### Backdate a snapshot

```bash theme={null}
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:

```bash theme={null}
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
