Development
Setup
git clone https://github.com/JayFarei/opentraces
cd opentraces
python3 -m venv .venv
source .venv/bin/activate
pip install -e packages/opentraces-schema
pip install -e ".[dev]"
Optional Dependencies
pip install -e ".[web,tui]" # Web and TUI inbox clients
pip install -e ".[release]" # Build and publish tools (build, twine)
Running Tests
pytest tests/ -v
Some tests require real Claude Code trace data and are skipped by default. To run them, set the env var pointing to your project's Claude Code sessions directory:
export OPENTRACES_TEST_PROJECT_DIR=~/.claude/projects/<your-project-slug>
pytest tests/ -v
The repository also has frontend test suites under web/viewer/ and buildable docs under web/site/.
Layout
Core directories:
packages/opentraces-schema/- standalone schema packagepackages/opentraces-ui/- shared UI package and design systemsrc/opentraces/cli/- Click command surfacesrc/opentraces/core/- config, paths, workflow, state, review, inbox, publish flowsrc/opentraces/capture/- live parsers, importers, and hook installerssrc/opentraces/publish/- serializers and Hugging Face publishingsrc/opentraces/enrichment/- git signals, attribution, dependencies, metricssrc/opentraces/quality/- scoring and upload gatessrc/opentraces/security/- redaction and scanning pipelinesrc/opentraces/clients/- TUI and web backend clientsweb/viewer/- React trace review UIweb/site/- Next.js docs and marketing sitetests/- Python test suite
The CLI version lives in src/opentraces/__init__.py. The schema version lives in packages/opentraces-schema/src/opentraces_schema/version.py.
Adding A Parser
- Create a capture adapter under
src/opentraces/capture/ - Implement
SessionParserorFormatImporterfromsrc/opentraces/capture/_base.py - Register it in
src/opentraces/capture/__init__.py - Add tests under
tests/
Notes
- The current live-capture adapter is Claude Code
- Hermes currently ships as an import path via
opentraces pull --parser hermes - The public inbox workflow is
web/tui/list/show -> add/reject/redact -> push