Skip to content

About

Claude Code workshop

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

PaperClaw

CLI tool that ingests unorganized PDF documents from an inbox folder, classifies each one using Claude AI, generates a human-readable filename, extracts a plain-text transcript, and files everything into a structured library.

Features

  • Classifies and renames PDFs using Claude Sonnet
  • Extracts full-text transcript as a .md file alongside each PDF
  • Organizes library by category and year
  • Maintains a machine-readable index.json of all processed documents
  • Detects drift between index and filesystem
  • Archives originals before any operation

Requirements

  • Python 3.12+
  • Anthropic API key

Installation

pip install -e ".[dev]"

Copy .env.example to .env and set your API key:

cp .env.example .env
# edit .env and set ANTHROPIC_API_KEY

Usage

Process inbox:

paperclaw process

Check for drift between index and filesystem:

paperclaw check

Review last N classifications:

paperclaw review --last 10

Library structure

~/inbox/                              ← drop PDFs here
~/archive/                            ← immutable originals
~/library/
  index.json
  invoices/2024/
  bills/2025/
  contracts/
  bank-statements/
  tax/
  other/

Files are named {YYYY-MM-DD}_{vendor}_{short-description}.pdf with a matching .md transcript.

Document categories

Category Examples
invoices Online orders, shop receipts
bills Electricity, gas, internet
contracts Rental agreements, insurance
bank-statements Monthly bank statements
tax Finanzamt letters, Steuerbescheid
other Low-confidence or unrecognized documents

Documents with classifier confidence < 0.8 are filed under other and flagged for manual review.

Development

# Run all checks
pre-commit run --all-files

# Run tests
pytest

# Type check
mypy --strict paperclaw/

All tool configuration lives in pyproject.toml.

Security

  • Only first-page text is sent to the Claude API (account numbers and transactions on later pages are never transmitted)
  • ANTHROPIC_API_KEY is read from .env, which is gitignored
  • Originals are archived before any move or rename — zero data loss guarantee
  • index.json is updated atomically to prevent corruption

About

Claude Code workshop

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages