trailback
Vendor-neutral CLI/TUI for browsing local agent logs.
Note: The package is called
trailback(uv pip install trailback), but the CLI command istrail— short to type, easy to remember. See docs/NAMING.md for background.
Current MVP supports Codex, Claude, and Gemini sessions for listing, viewing transcripts, and usage stats.
Install
Install the CLI as a uv tool so the trail executable is available from anywhere:
uv tool install -e .
Ensure the uv tool bin directory is on your PATH (usually ~/.local/bin):
export PATH="$HOME/.local/bin:$PATH"
Verify:
command -v trail
trail tui
CLI
trail sourcestrail ls [--source codex] [--no-cwd]trail ls [--group] [--header] [--show-ids]trail open <session_id> [--source codex]trail open <group_id>trail stats [--source codex] [--format text|csv|json] [--period all|daily|monthly|yearly] [--no-header]trail tuitrail init [--path PATH] [--force]
Config
Use ~/.config/trail/config.toml to add sources. Default Codex example:
[sources.codex]
kind = "codex"
path = "~/.codex"
include = ["sessions/**/*.jsonl", "sessions/**/*.json"]
Claude example:
[sources.claude]
kind = "claude"
path = "~/.claude"
include = ["projects/**/*.jsonl"]
Gemini example:
[sources.gemini]
kind = "gemini"
path = "~/.gemini"
include = ["tmp/*/chats/session-*.json", "tmp/*/logs.json"]
Log sync (multi-machine)
Use scripts/sync-logs.sh to sync logs from a secondary machine to a primary.
It is designed for one-way sync (secondary -> primary) and uses a quiet window
to avoid in-progress files.
Manual run:
PRIMARY_USER=youruser PRIMARY_HOST=your-primary-host ./scripts/sync-logs.sh
Dry run:
DRY_RUN=1 PRIMARY_USER=youruser PRIMARY_HOST=your-primary-host ./scripts/sync-logs.sh
Optional SSH options:
SSH_OPTS="-i ~/.ssh/your_key -o StrictHostKeyChecking=accept-new" \
PRIMARY_USER=youruser PRIMARY_HOST=your-primary-host ./scripts/sync-logs.sh
LaunchAgent example (runs every 6 hours):
~/Library/LaunchAgents/com.trail.logs-sync.plist
Reload after edits:
launchctl unload -w ~/Library/LaunchAgents/com.trail.logs-sync.plist 2>/dev/null || true
launchctl load -w ~/Library/LaunchAgents/com.trail.logs-sync.plist
launchctl kickstart -k gui/$(id -u)/com.trail.logs-sync
For design details, see docs/LOG_SYNC.md.
Metadata
Release files for trailback 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| trailback-0.1.1.tar.gz | 72.3 kB | Without provenance | Details for trailback-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| trailback-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for trailback-0.1.1-py3-none-any.whl |
Total release size: 108.3 kB
Release files / trailback-0.1.1.tar.gz
| Download URL | trailback-0.1.1.tar.gz |
|---|---|
| Size | 72.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
78c5396b91a55d13d87fbe53bfad7db8920ed82c33cde47a40ca8638d398e10f
|
|
BLAKE2b-256 checksum How to use checksums |
3cc17dd50a6cc1eb889fc57394f280cf858c1482ca053d818c394dd551b50f4f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / trailback-0.1.1-py3-none-any.whl
| Download URL | trailback-0.1.1-py3-none-any.whl |
|---|---|
| Size | 36.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
930c98ff15ec48beb09887e82074c682588a1c00888662b757097047222a7775
|
|
BLAKE2b-256 checksum How to use checksums |
2df7d0b4c98405e5c88088465d4b3c50d001e7c6b72c272f63a519454b4eb665
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for trailback 0.1.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.