Skip to main content

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

Metadata

Release files for pdfask 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pdfask 0.1.0
File Size Uploaded
pdfask-0.1.0.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pdfask 0.1.0
File Interpreter ABI Platform
pdfask-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.8 kB

Release files / pdfask-0.1.0.tar.gz

Download URL pdfask-0.1.0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5be9c54a19035386e8b56c07b6864279bca2178d2397fa33f69d8215ba7d8510
BLAKE2b-256 checksum
How to use checksums
c7eeaa45ab5599c738cbc8748affef29e9baa3d17676453f1989f62cd20a4c9b
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / pdfask-0.1.0-py3-none-any.whl

Download URL pdfask-0.1.0-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ade083d07bc5da3748f83bfe861fbbe3c04562c0f6b5cd4e2a5b974913945e7
BLAKE2b-256 checksum
How to use checksums
660df0e12a6b0c2b075bae2ad0dc9b13b3d7ebee87f9dad372558d9acda42a40
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page