Skip to main content

Cut AWS Bedrock LLM spend from Claude Code — compression + prompt caching, on your machine.

Project description

caprock

Cut your AWS Bedrock LLM spend from Claude Code — context compression + prompt caching that actually work on Bedrock, on your machine, with your own credentials. Nothing leaves your machine.

pip install caprock          # or: uvx caprock
caprock wrap claude          # your Claude Code now runs through it
caprock stats                # see what you saved

Every session ends with the money you saved:

💰 You've saved $19.20 with caprock
   6,400,000 tokens cut · −85% input cost · 40 requests
   this month: $19.20 so far → ~$74/mo at this pace

Measured live against real Bedrock: −48% billed input on a clean install, −59.7% re-confirmed on a six-turn agent session, up to −70% with the full pipeline. Your number will vary with your workload — run caprock measure to see yours. How we got these: https://caprock.dev/methodology.

What it does

  • Compression — shrinks tool outputs / logs / JSON before they reach the model.
  • Prompt caching — makes Bedrock's prompt cache actually engage (stock Headroom's markers die in conversion → 0% on Bedrock; caprock fixes that).
  • Savings metercaprock stats and the end of every wrap session show what you saved, computed locally from real Bedrock cache tokens.
  • Runs on localhost, signs with your Bedrock credentials. No caprock service in the request path — nothing leaves your machine.

Commands

Command What it does
caprock wrap claude Runs Claude Code through the local proxy on your own creds
caprock start Starts the proxy on its own (point any client at it)
caprock stats Shows what you've saved (cache + compression, all time)
caprock measure Replays a workload direct vs through caprock — your own number
caprock dashboard Opens the local savings dashboard

Team?

Running Claude across a team? The managed tier is a shared in-VPC gateway with per-user / per-role cost attribution, a team dashboard, deployment and support — deployed inside your own AWS account, nothing leaves your VPC. Pricing and a 20-min call: https://caprock.dev/pricing.

Built on Headroom

caprock builds on the open-source Headroom project (Apache 2.0). It applies the general-purpose fixes that make caching and compression work on AWS Bedrock (contributed back upstream) over the stock headroom-ai package. Licensed Apache-2.0.

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

caprock-0.1.6.tar.gz (83.7 kB view details)

Uploaded Source

Built Distribution

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

caprock-0.1.6-py3-none-any.whl (78.5 kB view details)

Uploaded Python 3

File details

Details for the file caprock-0.1.6.tar.gz.

File metadata

  • Download URL: caprock-0.1.6.tar.gz
  • Upload date:
  • Size: 83.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for caprock-0.1.6.tar.gz
Algorithm Hash digest
SHA256 232da042a1257a048d6577479a8070086a9967f0d1e43e29ccd3bba83ee1d878
MD5 c84db82e82601ac2e2c05b1fd5e35ca8
BLAKE2b-256 40fe7bbaae19fe4be781e137e52afb98c2813f75f7e47249b46ab8c812da292f

See more details on using hashes here.

File details

Details for the file caprock-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: caprock-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 78.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for caprock-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b1aaf3960f83c36ecadaddbd280e14c0555d00c9a83c383940a1a286a37c7e2b
MD5 a283007c299b66643937437b04468bd1
BLAKE2b-256 46cbc3c0979ccb21f587445c831ba75eacfa9d3fab8411bfacc3288c650c8f53

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