crunch

command module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2026 License: 0BSD Imports: 13 Imported by: 0

README ΒΆ

crunch

Crunch your daily AI coding activity into a summary.

The Problem

You use Crush all day, every day. At the end of the week, you need to write status updates, fill out timesheets, or just remember what you worked on. But the context is scattered across dozens of project directories in crush.db files.

The Solution

Crunch scans your filesystem for crush.db files, extracts your prompts for a given date, and generates a structured summary using your preferred LLM.

# What did I work on today?
crunch

# What about last Tuesday?
crunch -d 2026-04-22

✨ Features

  • πŸ” Automatic discovery β€” Recursively finds all crush.db files
  • πŸ“… Date filtering β€” Summarize any day's activity
  • 🏷️ Project grouping β€” Messages organized by inferred project
  • 🌊 Streaming output β€” Real-time progress with cost estimation
  • πŸ”Œ Multi-provider β€” AWS Bedrock, Anthropic, OpenAI, OpenRouter
  • ⚑ Fast scanning β€” Skips node_modules, .git, vendor, etc.

πŸ“¦ Installation

go install github.com/taigrr/crunch@latest

Or build from source:

git clone https://github.com/taigrr/crunch
cd crunch
go build

⚑ Requirements

  • Go >= 1.21 (for installation)
  • One of:
    • AWS credentials (for Bedrock)
    • ANTHROPIC_API_KEY
    • OPENAI_API_KEY
    • OPENROUTER_API_KEY

πŸš€ Quick Start

# Summarize today's activity (auto-detects provider from env)
crunch

# Summarize a specific date
crunch -d 2026-04-28

# Search only in a specific directory
crunch -p ~/code

# Use a specific provider
crunch --provider anthropic

# Use a specific model
crunch --provider openrouter -m anthropic/claude-sonnet-4

πŸ“– Flags

Flag Short Description
--date -d Date to summarize (YYYY-MM-DD, default: today)
--path -p Path to search (default: home directory)
--dir Base directory to strip from project paths
--provider LLM provider (bedrock, anthropic, openai, openrouter)
--model -m Model to use (provider-specific)
--api-key API key (overrides env variable)
--verbose -v Verbose output
--help -h Show help

πŸ”Œ Providers

Provider Env Variable Default Model
bedrock AWS credentials us.anthropic.claude-sonnet-4-20250514-v1:0
anthropic ANTHROPIC_API_KEY claude-sonnet-4-20250514
openai OPENAI_API_KEY gpt-4o
openrouter OPENROUTER_API_KEY anthropic/claude-sonnet-4

Provider is auto-detected from environment variables. If multiple are set, priority is: Anthropic > OpenAI > OpenRouter > Bedrock.

βš™οΈ Environment Variables

# Provider-specific API keys
export ANTHROPIC_API_KEY="sk-ant-..."
export OPENAI_API_KEY="sk-..."
export OPENROUTER_API_KEY="sk-or-..."

# Override defaults with CRUNCH_ prefix
export CRUNCH_PROVIDER="anthropic"
export CRUNCH_MODEL="claude-sonnet-4-20250514"
export CRUNCH_API_KEY="sk-ant-..."

πŸ”§ How It Works

  1. Scan β€” Walks your filesystem looking for crush.db files
  2. Skip β€” Ignores common dependency directories (node_modules, vendor, .git, etc.)
  3. Extract β€” Reads user messages from SQLite for the target date
  4. Group β€” Organizes messages by project (inferred from file path)
  5. Summarize β€” Sends grouped prompts to your LLM with streaming output
  6. Display β€” Shows real-time progress with token/cost estimation

πŸ“‹ Output

The summary is structured for easy scanning:

  • Project-by-project breakdown
  • Key tasks and accomplishments
  • Technologies used
  • Notable patterns (debugging, feature work, refactoring)

Perfect for:

  • Daily standups
  • Weekly status reports
  • Timesheet entries
  • Personal dev journals
  • Crush β€” The AI coding assistant that creates the databases
  • Fantasy β€” The multi-provider LLM library powering crunch

πŸ“„ License

0BSD Β© Tai Groot

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis
internal
db
Package db provides SQLite message extraction from crush.db files.
Package db provides SQLite message extraction from crush.db files.
llm
Package llm provides a multi-provider LLM client using Fantasy.
Package llm provides a multi-provider LLM client using Fantasy.
scanner
Package scanner provides filesystem scanning for crush.db files.
Package scanner provides filesystem scanning for crush.db files.
summarizer
Package summarizer builds prompts for summarizing user activity.
Package summarizer builds prompts for summarizing user activity.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL