Skip to main content

Openshard

Receipts for AI coding agents.

Use Claude Code, Codex, Cursor, or OpenCode normally. Openshard keeps a clear record of what happened: what ran, what changed, what was verified, what it cost, and what it could not establish.

Agents write code. Openshard keeps the receipt.

License PyPI Python Status

Docs · Changelog · Contributing · Security


See Openshard in action

Getting your first receipt takes a couple of commands:

pip install openshard
cd my-project
openshard setup

Now use Claude Code, Codex, Cursor, or OpenCode as you normally would. When the agent finishes:

openshard last

Openshard records the available evidence from the run and turns it into a receipt you can inspect locally.

your coding agent
       ↓
does the work
       ↓
Openshard captures the available evidence
       ↓
receipt

You keep your existing coding workflow and Openshard gives that work a record.


What does a receipt tell you?

A receipt is the saved record of an AI coding run.

Depending on what the agent and its integration expose, Openshard can record the task, coding agent, model, inspected files, file changes, checks, estimated token usage and cost, actions taken during the run, capture completeness, result state, and integrity information.

Each new receipt also has a globally unique receipt_id, while the existing shard_id remains available for compatibility with local repo history.

The important part is not simply collecting more fields. It is being clear about what Openshard actually knows.


Why receipts?

AI coding agents have long moved past autocomplete and now carry out significant work in real production workflows. They inspect repositories, edit files, run commands, execute tests, call tools, and increasingly work on tasks that previously belonged entirely to developers.

Git gives us a durable history of code changes, but it does not always tell us what happened during the AI work around those changes. Which agent handled the task? Which model was used? What did the agent report changing? Which checks actually ran? What failed? What did the run cost? Was any evidence missed? Can we still trust the record we are looking at later?

Openshard exists to preserve that context. The coding agent still does the coding and Openshard keeps the receipt.


Openshard doesn't guess

Receipts stop being useful if uncertain information is presented as fact.

Openshard is deliberately conservative about what it claims. If the model is unknown, it says unknown. If cost was not captured, it says not recorded. If part of a session was missed, the receipt records a partial capture.

The same principle applies to code changes. A working tree might already contain human edits, another agent might be active at the same time, or Git might show that a file changed without providing enough evidence to establish who caused it.

Openshard therefore separates files an agent reported changing from changes that were only observed by Git, pre-existing changes, and changes associated with another recorded session. If Openshard cannot establish the actor, it says so.

A finished agent turn is also not automatically treated as proof that the code is correct. An agent can finish successfully while its work remains unverified, so Openshard can report the turn as Turn completed (unverified).

The aim is simple: record the evidence that exists without filling the gaps with guesses.


Receipt identity and integrity

Every new receipt receives a globally unique receipt_id when it is created.

Unlike the existing repo-local shard_id, the receipt ID is designed to remain unique across repositories, machines, developers, and organisations.

Receipts can also carry a content fingerprint. Openshard can use that fingerprint to check whether the stored record still matches the content from which it was produced.

This is an integrity check on the receipt itself. It is not a claim that the underlying code is correct.


Supported coding agents

Openshard currently captures receipts from:

Coding agent Receipt capture
Claude Code Supported
Codex Supported
Cursor Supported
OpenCode Supported

All four can contribute to the same local Openshard history in a repo. You can move between supported agents without creating separate receipt stores or changing the way you normally use those tools.

Run:

openshard doctor

to see which integrations are configured and what Openshard can currently capture.


Getting around your receipt history

The basic workflow is intentionally small.

See the most recent receipt:

openshard last

See more detail:

openshard last --more
openshard last --full

Browse recent AI coding work in the repo:

openshard history

See repo-level statistics:

openshard stats

Check the installation and agent integrations:

openshard doctor

The main receipt commands also support JSON, which makes them useful in scripts and other tooling:

openshard last --json
openshard history --json
openshard stats --json

How capture works

openshard setup detects whatever supported coding agents are available for the repo and configures their supported integration points.

The implementation differs slightly between agents. Openshard can use hooks, plugins, local configuration, and MCP-based integration depending on what each tool exposes. Those events are normalised into the same receipt history and passed through a local authenticated capture service.

That means Claude Code, Codex, Cursor, and OpenCode can all leave receipts in the same repo history even though the agents themselves work differently.

For the deeper implementation details, see Agent capture.


Local-first

The open-source receipt layer is local-first. Your receipt history stays with the repo and can be inspected offline.

You do not need a hosted Openshard account to create or inspect local receipts.

Raw developer content is not sent to Openshard by default. Basic privacy-safe product telemetry may be collected after setup, such as versions, counts, timings, and error categories. It does not include code, prompts, file names, or receipt contents.

Telemetry can be disabled at any time:

openshard telemetry off

See Telemetry for the full behaviour.


Installation

The standard installation is:

pip install openshard

Then move into a Git repo and run:

cd your-project
openshard setup

pipx and uv are also supported:

pipx install openshard
uv tool install openshard

To upgrade later:

pip install -U openshard

or:

pipx upgrade openshard

See Installation for additional installation guidance.


Project status

Openshard is currently a working tool available for use, and the core local receipt loop is working across Claude Code, Codex, Cursor, and OpenCode.

The project has automated CI, Ruff and mypy checks, a large pytest suite, Linux and Windows validation, authenticated local capture, receipt integrity checks, explicit capture-completeness handling, and real integration testing across supported agent paths.

The hosted product is still being built. Shared team receipt history, hosted analytics, and team controls will build on the same receipt primitive rather than replacing the local workflow.

For now, the focus is straightforward: making the receipt layer reliable, useful, and easy enough to fit naturally into the way developers already work.


Why open source?

We believe that evidence infrastructure should be inspectable.

If Openshard says a coding agent changed a file, a check passed, a session was incomplete, or an actor could not be established, developers should be able to understand how that conclusion was reached.

Keeping the local receipt layer open source makes the capture model, integrations, and integrity behaviour available for inspection and improvement.

Openshard is licensed under Apache-2.0.


Documentation


Contributing

Contributions are welcome across receipt capture, coding-agent integrations, provenance, verification, CLI experience, platform compatibility, security, tests, documentation, and examples.

See CONTRIBUTING.md to get started.


Security

If you find a security issue, please report it privately before opening a public issue.

See SECURITY.md.


License

Apache-2.0

Release files for openshard 0.4.6

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

Source distribution (sdist)

Source distribution for openshard 0.4.6
File Size Uploaded
openshard-0.4.6.tar.gz 1.3 MB Details

Built distribution (wheel)

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

Total release size: 2.0 MB

Release files / openshard-0.4.6.tar.gz

Download URL openshard-0.4.6.tar.gz
Size 1.3 MB
Tags Source
SHA-256 checksum
How to use checksums
738e73986d668d494f883e1510d2246f5b0e4654d419aef94e055e8825d125ba
BLAKE2b-256 checksum
How to use checksums
0f34c6bb59c35db43ddf75948ec725a25ba650f89eb95020a6007a189ac77998
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release files / openshard-0.4.6-py3-none-any.whl

Download URL openshard-0.4.6-py3-none-any.whl
Size 695.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
31e7ab119f12711cb8047064f5407697e4cfb6bb66836da9eb18fa450655a0e6
BLAKE2b-256 checksum
How to use checksums
fec43d9c2dcfe76a6bee094c1d9cd18450e748599533fc97bce0e3d898d99064
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release history Release notifications | RSS feed

0.4.8

2 release files

0.4.7

2 release files

This release

0.4.6 This release

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.0

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