Skip to main content

Chat with a PDF on the command line, powered by Claude.

Project description

pdfask

Chat with a PDF on the command line, powered by Claude.

Uses Claude's native PDF support — no text extraction, no OCR. The model reads the document directly, including tables, layout, and embedded images. Prompt caching makes follow-up questions ~10x cheaper than the first.

Install

pip install pdfask

Or with uv:

uv tool install pdfask

Setup

Get an API key from https://console.anthropic.com/settings/keys, then either export it:

export ANTHROPIC_API_KEY=sk-ant-...

…or drop it in a .env file in whatever directory you're running pdfask from:

ANTHROPIC_API_KEY=sk-ant-...

Usage

One-shot question:

pdfask report.pdf "What's the executive summary?"

Interactive REPL (Ctrl-D to exit):

pdfask report.pdf

Configuration

Env var Default Notes
ANTHROPIC_API_KEY (required) From console.anthropic.com
ANTHROPIC_MODEL claude-opus-4-7 Override to use a smaller model

Development

git clone https://github.com/dsl16/pdf-chat
cd pdf-chat
uv tool install --editable .

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pdfask-0.1.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pdfask-0.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file pdfask-0.1.0.tar.gz.

File metadata

  • Download URL: pdfask-0.1.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.10 {"installer":{"name":"uv","version":"0.11.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pdfask-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5be9c54a19035386e8b56c07b6864279bca2178d2397fa33f69d8215ba7d8510
MD5 955fde1e888b20e90d62091b98c06ad6
BLAKE2b-256 c7eeaa45ab5599c738cbc8748affef29e9baa3d17676453f1989f62cd20a4c9b

See more details on using hashes here.

File details

Details for the file pdfask-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pdfask-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.10 {"installer":{"name":"uv","version":"0.11.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for pdfask-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5ade083d07bc5da3748f83bfe861fbbe3c04562c0f6b5cd4e2a5b974913945e7
MD5 61020369834081cb29ec86d130158a9b
BLAKE2b-256 660df0e12a6b0c2b075bae2ad0dc9b13b3d7ebee87f9dad372558d9acda42a40

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page