Skip to main content

Locate agent trajectory files on the local machine

Project description

trajectoriz

Locate agent trajectory files on the local machine.

Installation

pip install trajectoriz

Usage

from trajectoriz import (
    iter_claude_trajectories,
    iter_claude_project_trajectories,
    iter_codex_trajectories,
    iter_codex_rollout_files,
    iter_codex_db_sessions,
    iter_pi_trajectories,
    iter_cursor_trajectories,
    iter_copilot_event_trajectories,
    iter_copilot_sessions,
    iter_agent_probe_trajectories,
    iter_opencode_sessions,
)

# List all Claude Code trajectory files
for path in iter_claude_trajectories():
    print(path)

# List Claude trajectories for a specific project
for path in iter_claude_project_trajectories("/path/to/repo"):
    print(path)

# List Codex CLI session files
for path in iter_codex_trajectories():
    print(path)

# List Codex CLI rollout files
for path in iter_codex_rollout_files():
    print(path)

# List Codex sessions from SQLite store (~/.codex/state_5.sqlite)
for session_id, updated_at_ms, first_msg, provider, model, cwd in iter_codex_db_sessions():
    print(session_id, first_msg)

# List pi coding agent session files
for path in iter_pi_trajectories():
    print(path)

# List Cursor trajectory files
for path in iter_cursor_trajectories():
    print(path)

# List Copilot CLI session event JSONL files (~/.copilot/session-state/*/events.jsonl)
for path in iter_copilot_event_trajectories():
    print(path)

# List Copilot CLI sessions from SQLite store
for session_id, created_at in iter_copilot_sessions():
    print(session_id, created_at)

# List agent_probe session JSONL files (~/.local/share/agent_probe/*/*/*)
for path in iter_agent_probe_trajectories():
    print(path)

# List opencode sessions from SQLite store (~/.local/share/opencode/opencode.db)
for session_id, updated_at_ms, model_json, directory, first_prompt in iter_opencode_sessions():
    print(session_id, first_prompt)

CLI

# List trajectories in the current directory
trajectoriz-cli list

# Search all trajectories for a keyword
trajectoriz-cli search raven

# OR search (grep syntax) — matches any of the terms
trajectoriz-cli search "theraven\|raven\|password"

# Full-content search (default) or fast metadata-only search
trajectoriz-cli search foo --fast

# Show a trajectory
trajectoriz-cli show cl-1234abcd

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trajectoriz-0.14.0-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file trajectoriz-0.14.0-py3-none-any.whl.

File metadata

  • Download URL: trajectoriz-0.14.0-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for trajectoriz-0.14.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cc6a6df69e3b159f6e9f0b177349469101e81de1d153c8e533dbedea9863d5e9
MD5 7e29573813082fa6102558864744dcba
BLAKE2b-256 2ddee20727bf303f5d305f70b9e1e8f3698ed4bdafdce8264d89acf304189e83

See more details on using hashes here.

Provenance

The following attestation bundles were made for trajectoriz-0.14.0-py3-none-any.whl:

Publisher: pypi-publish.yml on monperrus/trajectoriz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page