Skip to main content

claudetracing

PyPI version Python versions License: MIT CI codecov

CLI to set up MLflow tracing for Claude Code, Codex, GitHub Copilot, and Antigravity (agy).

Why this exists

MLflow supports tracing coding agents, but each agent uses a different config file, hook format, and environment setup. Some agents accept an experiment name while others (@mlflow/codex) require a numeric experiment ID, and putting Databricks profiles or bearer tokens directly into project config files makes them easy to leak into git.

claudetracing standardizes that setup across a project and team:

  • One setup for whichever agent you use: Run traces init once in a repo to wire up Claude Code, Codex, Copilot, and Antigravity against the same MLflow experiment (defaulting to /Workspace/Shared/<repo> on Databricks). Teammates can switch between agents and still log to the same place.
  • Shared project config, local credentials: Project-level settings (experiment name/ID, enabled plugins, hooks) are written to files you can commit to the repo, while personal ~/.databrickscfg profile names and tokens stay in gitignored .local.json files. The same committed config also works headlessly in CI with a service principal (--spn).
  • No manual wiring: It creates or looks up the MLflow experiment ID up front, installs the Claude Code plugin, chains into Codex Desktop's notify hook without clobbering it, and updates .gitignore.

Install

uv add claudetracing
# or: pip install claudetracing

Setup

Run interactively in your repo:

traces init

Or pass flags directly:

# Databricks (CLI profile from ~/.databrickscfg)
traces init --agent all --profile my-workspace --yes

# Databricks (headless / CI service principal via DATABRICKS_* env vars)
traces init --agent all --spn --yes

# Self-hosted MLflow
traces init --agent all --tracking-uri https://mlflow.example.com --token $MLFLOW_TRACKING_TOKEN --yes

# Local MLflow (http://localhost:5000)
traces init --agent all --tracking-uri http://localhost:5000 --yes

--agent accepts all, both (Claude + Codex), claude, codex, copilot (ghcp), or agy (antigravity). Experiment names default to /Workspace/Shared/<repo> on Databricks and <repo> elsewhere; override with -e <name> or --experiment-id <id>.

Commands

traces init                         # Configure tracing
traces codex init                   # Configure Codex only
traces copilot init                 # Configure Copilot only
traces agy init                     # Configure Antigravity only
traces status                       # Show config status per agent
traces disable                      # Remove tracing config from the repo

traces list                         # List experiments
traces search                       # Recent traces for this project
traces search --hours 24 -l 20      # Last 24h, limit 20
traces search --since 2026-10-01    # Since ISO date/timestamp
traces search --trace-id <id>       # Single trace by ID
traces search -f [summary|json|context|tools]

What gets written

Agent Committed Gitignored Notes
Claude Code .claude/settings.json .claude/settings.local.json Installs mlflow-tracing@mlflow-plugins
Codex .codex/config.toml .codex/mlflow-tracing.json Requires npm i -g @mlflow/codex
Copilot .github/hooks/mlflow-tracing.json .github/hooks/mlflow-tracing.local.json Runs traces copilot-hook on stop
Antigravity .agents/hooks.json .agents/mlflow-tracing.json Runs traces agy-hook on stop

Releasing

Bump the version in pyproject.toml and add a ## v<version> section to CHANGELOG.md:

uv version --bump patch   # or minor / major

Merging to master builds the package, publishes to PyPI, tags v<version>, and creates the GitHub release from CHANGELOG.md.

License

MIT

Metadata

Release files for claudetracing 0.6.1

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

Source distribution (sdist)

Source distribution for claudetracing 0.6.1
File Size Uploaded Provenance Actions
claudetracing-0.6.1.tar.gz 368.1 kB With provenance Details for claudetracing-0.6.1.tar.gz

Built distribution (wheel)

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

Total release size: 402.0 kB

Release files / claudetracing-0.6.1.tar.gz

Download URL claudetracing-0.6.1.tar.gz
Size 368.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d93998440269b9f416f46ecb68c3917de8e452cb06317c2ff9488c1aa0ff7027
BLAKE2b-256 checksum
How to use checksums
0cb848cab7143bdb6f5af161890adfbe1f47acb7fce02d32c2d7ce78798a5308
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 Oct 20, 2026.

Transparency log

Release files / claudetracing-0.6.1-py3-none-any.whl

Download URL claudetracing-0.6.1-py3-none-any.whl
Size 33.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f815c34aecc65bb61abcfd5300409e9ca87020436be6a3adab7cb7c5824865e8
BLAKE2b-256 checksum
How to use checksums
ce5e015f2c680c716f9f1911854932419d15f9fdd9d532ac79d6b478bb045ab8
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 Oct 20, 2026.

Transparency log

Security for claudetracing 0.6.1

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for claudetracing-0.6.1.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 20, 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.

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