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.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 claudetracing 0.6.0
File Size Uploaded Provenance Actions
claudetracing-0.6.0.tar.gz 364.3 kB With provenance Details for claudetracing-0.6.0.tar.gz

Built distribution (wheel)

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

Total release size: 398.2 kB

Release files / claudetracing-0.6.0.tar.gz

Download URL claudetracing-0.6.0.tar.gz
Size 364.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b0bcc5b93e45e1e1bab418f9773fc45678bd43919f67b8d884c2093129b5839f
BLAKE2b-256 checksum
How to use checksums
c556f369c8509f2de28dcf5a61cd259a40cdaad74163710efad05878d5dfb836
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 16, 2026.

Transparency log

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

Download URL claudetracing-0.6.0-py3-none-any.whl
Size 33.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
600728eede4d7a4ba983a75bedac166592d54a9fdd2021a75e00cf80840bfc90
BLAKE2b-256 checksum
How to use checksums
e4b9c2d2f02c427b1af31ac969d9ebaaede2db499c35a627c5cfd0d1e3c8aefd
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 16, 2026.

Transparency log

Security for claudetracing 0.6.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

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

Select from 2 files

Attestation for claudetracing-0.6.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 16, 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