Skip to main content

agentledger

Reports your Claude Code, Cursor CLI, Gemini CLI and Cortex Code sessions to the AgentLedger Snowflake Native App, so your team sees agent cost, prompts and tool use per developer, repo, branch and pull request.

uv tool install agentledger-cli    # or: pipx install agentledger-cli
agentledger install

install checks that your Snowflake connection can report to the app, then sets up every agent it finds:

Agent What it adds
Claude Code Stop and SessionEnd hooks in ~/.claude/settings.json
Cursor CLI stop and sessionEnd hooks in ~/.cursor/hooks.json
Gemini CLI AfterAgent and SessionEnd hooks in ~/.gemini/settings.json ($GEMINI_CLI_HOME moves it); Gemini CLI runs hooks in trusted folders
Cortex Code the app's git plugin (cortex plugin install <APP>.PLUGINS.AGENTLEDGER); Snowflake records its sessions already

After each turn the hook queues the session and returns at once. A background process loads it into the app over your own connection, at most every two minutes per agent, so a session is always stored as yours. Logs are in ~/.cache/agentledger/.

Requirements

  • A Snowflake connection in ~/.snowflake/connections.toml that works without a prompt (key pair or cached SSO), whose role an admin has granted the reporter role: GRANT APPLICATION ROLE AGENTLEDGER.APP_REPORTER TO ROLE <role>;
  • Python 3.10 or later.

Options

agentledger install --connection work --role DEVELOPER   # pick the connection and role
agentledger install --only ~/work                        # report only sessions in these folders
agentledger install --app AGENTLEDGER_PROD               # the app's name, if it isn't AGENTLEDGER
agentledger status                                       # what's set up, and each agent's latest report
agentledger upload claude ~/.claude/projects/*/*.jsonl   # report earlier sessions
agentledger upload gemini ~/.gemini/tmp/*/chats/*.jsonl
agentledger uninstall                                    # remove the hooks and the plugin

Settings live in ~/.snowflake/agentledger.json, which the Cortex Code plugin reads too.

Metadata

Release files for agentledger-cli 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 agentledger-cli 0.1.0
File Size Uploaded Provenance Actions
agentledger_cli-0.1.0.tar.gz 24.0 kB With provenance Details for agentledger_cli-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 56.6 kB

Release files / agentledger_cli-0.1.0.tar.gz

Download URL agentledger_cli-0.1.0.tar.gz
Size 24.0 kB
Tags Source
SHA-256 checksum
How to use checksums
599d101bfd7129a42288af2ea881835da1f241b96608547f3024c094f461f80f
BLAKE2b-256 checksum
How to use checksums
2658a1ed6562de6fbd0e8927e806e54ce0a226af0f505025983565c53ef30b8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 24, 2026.

Transparency log

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

Download URL agentledger_cli-0.1.0-py3-none-any.whl
Size 32.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
450421e6799c5901d49defda74b9248322c4014d26a4091775e1f74a0db11532
BLAKE2b-256 checksum
How to use checksums
2295ff71ded6f5156a89520be49df76e58c4d8cb3389c5b2b19411e91fca3567
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 24, 2026.

Transparency log

Security for agentledger-cli 0.1.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for agentledger_cli-0.1.0.tar.gz

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 Oct 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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