{"id":50755272,"url":"https://github.com/escoffier-labs/stationtrail","last_synced_at":"2026-06-11T04:02:46.137Z","repository":{"id":362355776,"uuid":"1258616535","full_name":"escoffier-labs/stationtrail","owner":"escoffier-labs","description":"StationTrail exports local station and agent-session logs to portable miseledger.adapter.v1 JSONL. Local-only, no network calls.","archived":false,"fork":false,"pushed_at":"2026-06-06T03:16:04.000Z","size":98,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-06T04:10:06.301Z","etag":null,"topics":["ai-agents","brigade","claude-code","cli","codex","go","jsonl","local-first","miseledger","openclaw","session-logs","stationtrail"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/escoffier-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-06-03T18:48:30.000Z","updated_at":"2026-06-06T03:16:33.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/escoffier-labs/stationtrail","commit_stats":null,"previous_names":["solomonneas/agenttrail","escoffier-labs/stationtrail"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/escoffier-labs/stationtrail","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escoffier-labs%2Fstationtrail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escoffier-labs%2Fstationtrail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escoffier-labs%2Fstationtrail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escoffier-labs%2Fstationtrail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/escoffier-labs","download_url":"https://codeload.github.com/escoffier-labs/stationtrail/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/escoffier-labs%2Fstationtrail/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34181555,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-11T02:00:06.485Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agents","brigade","claude-code","cli","codex","go","jsonl","local-first","miseledger","openclaw","session-logs","stationtrail"],"created_at":"2026-06-11T04:02:45.523Z","updated_at":"2026-06-11T04:02:46.132Z","avatar_url":"https://github.com/escoffier-labs.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# StationTrail\n\n\u003cp\u003e\n  \u003ca href=\"https://github.com/escoffier-labs/stationtrail/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/escoffier-labs/stationtrail/ci.yml?branch=master\u0026style=for-the-badge\u0026label=ci\" alt=\"CI status\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/escoffier-labs/stationtrail/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/escoffier-labs/stationtrail?style=for-the-badge\u0026label=release\" alt=\"Latest release\"\u003e\u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/go-1.22%2B-00ADD8?style=for-the-badge\u0026logo=go\u0026logoColor=white\" alt=\"Go 1.22+\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/platform-Linux%20%7C%20macOS%20%7C%20Windows-334155?style=for-the-badge\" alt=\"Platform: Linux, macOS, Windows\"\u003e\n  \u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-green?style=for-the-badge\" alt=\"MIT license\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nStationTrail exports local agent session logs to `miseledger.adapter.v1` JSONL.\n\nIt is a scanner and exporter, not an archive. StationTrail reads local session files, normalizes them into portable adapter records, and writes JSONL to a file or stdout. MiseLedger owns storage, indexing, dedupe, search, relations, and evidence bundles.\n\nStationTrail makes no network calls.\n\n## Local Evidence Stack\n\nStationTrail is one part of the local evidence stack:\n\n- StationTrail handles local agent-session harnesses such as Codex, Claude, OpenClaw, OpenCode, and Hermes.\n- [SourceHarvest](https://github.com/escoffier-labs/sourceharvest) handles non-harness local source exports such as notes, generic files, crawler exports, and issue exports.\n- [MiseLedger](https://github.com/escoffier-labs/miseledger) imports the shared adapter contract, archives it, indexes it, searches it, and emits evidence bundles.\n\nStationTrail should not absorb crawler adapters or general local note/file harvesting. Those belong in SourceHarvest.\n\n## How It Works\n\n```mermaid\nflowchart TB\n    CLI[\"\u003cb\u003estationtrail CLI\u003c/b\u003e\u003cbr/\u003e\u003ci\u003elocal scanner and exporter\u003c/i\u003e\"]\n    APP[\"\u003cb\u003eApp layer\u003c/b\u003e\u003cbr/\u003ecommands \u0026middot; flags \u0026middot; summaries\"]\n\n    subgraph INPUTS [\" local inputs \"]\n        CODEX[\"\u003cb\u003eCodex\u003c/b\u003e\u003cbr/\u003esession JSONL\"]\n        CLAUDE[\"\u003cb\u003eClaude\u003c/b\u003e\u003cbr/\u003eproject JSONL\"]\n        OPENCLAW[\"\u003cb\u003eOpenClaw\u003c/b\u003e\u003cbr/\u003esessions \u0026middot; trajectories\"]\n        HERMES[\"\u003cb\u003eHermes\u003c/b\u003e\u003cbr/\u003esnapshots \u0026middot; trajectories\"]\n        OPENCODE[\"\u003cb\u003eOpenCode\u003c/b\u003e\u003cbr/\u003esanitized export JSON\"]\n    end\n\n    CODEX \u0026 CLAUDE \u0026 OPENCLAW \u0026 HERMES \u0026 OPENCODE --\u003e CLI --\u003e APP\n\n    subgraph PIPELINE [\" scan and normalize \"]\n        SCAN[\"\u003cb\u003eSource scanners\u003c/b\u003e\u003cbr/\u003ewalk files \u0026middot; parse JSONL/JSON\"]\n        NORMALIZE[\"\u003cb\u003eNormalize records\u003c/b\u003e\u003cbr/\u003emessages \u0026middot; tools \u0026middot; artifacts \u0026middot; relations\"]\n        FILTER[\"\u003cb\u003eApply controls\u003c/b\u003e\u003cbr/\u003esince \u0026middot; limit \u0026middot; redaction\"]\n    end\n\n    APP --\u003e SCAN --\u003e NORMALIZE --\u003e FILTER\n\n    subgraph OUTPUTS [\" local outputs \"]\n        ADAPTER[\"\u003cb\u003eAdapter JSONL\u003c/b\u003e\u003cbr/\u003emiseledger.adapter.v1 \u0026middot; one object per line\"]\n        SUMMARY[\"\u003cb\u003eDiagnostics\u003c/b\u003e\u003cbr/\u003ediscover \u0026middot; doctor \u0026middot; inspect \u0026middot; dry-run\"]\n    end\n\n    FILTER --\u003e ADAPTER\n    APP --\u003e SUMMARY\n\n    GUARD[\"\u003cb\u003ePrivacy boundary\u003c/b\u003e\u003cbr/\u003ecounts and manifests do not print generated text; exported text is untrusted evidence\"]\n    CLI -. local only .-\u003e GUARD\n    FILTER -. enforces .-\u003e GUARD\n    SUMMARY -. reports structure only .-\u003e GUARD\n\n    classDef source fill:#eff6ff,stroke:#2563eb,color:#1e3a8a;\n    classDef process fill:#ecfdf5,stroke:#059669,color:#064e3b;\n    classDef stream fill:#fff7ed,stroke:#ea580c,color:#7c2d12;\n    classDef guard fill:#fee2e2,stroke:#ef4444,color:#7f1d1d;\n    classDef local fill:#f8fafc,stroke:#64748b,color:#334155;\n    class CLI,APP local;\n    class CODEX,CLAUDE,OPENCLAW,HERMES,OPENCODE source;\n    class SCAN,NORMALIZE,FILTER process;\n    class ADAPTER,SUMMARY stream;\n    class GUARD guard;\n```\n\nStationTrail follows the same path for each source:\n\n1. Discover or receive a local file or directory.\n2. Walk supported JSONL or JSON files for that source.\n3. Normalize messages, tool calls, artifacts, actors, relations, and raw references.\n4. Apply `--since`, `--limit`, and requested redactions.\n5. Emit one `miseledger.adapter.v1` JSON object per line.\n6. Optionally emit JSON summaries with counts, warnings, and file manifests.\n\n## With MiseLedger\n\n```mermaid\nflowchart LR\n    subgraph LOCAL [\" local machine \"]\n        FILES[\"\u003cb\u003eSession files\u003c/b\u003e\u003cbr/\u003eJSONL and JSON\"]\n        EXPORT[\"\u003cb\u003eSanitized export\u003c/b\u003e\u003cbr/\u003eOpenCode JSON\"]\n    end\n\n    STATIONTRAIL[\"\u003cb\u003eStationTrail\u003c/b\u003e\u003cbr/\u003esource parsing \u0026middot; normalization \u0026middot; redaction\"]\n    SUMMARY[\"\u003cb\u003eScan summary\u003c/b\u003e\u003cbr/\u003ecounts \u0026middot; warnings \u0026middot; manifests\"]\n    ADAPTER[\"\u003cb\u003eAdapter JSONL\u003c/b\u003e\u003cbr/\u003emiseledger.adapter.v1\"]\n    IMPORT[\"\u003cb\u003eImport options\u003c/b\u003e\u003cbr/\u003epipe or wrapper command\"]\n\n    FILES \u0026 EXPORT --\u003e STATIONTRAIL\n    STATIONTRAIL --\u003e ADAPTER --\u003e IMPORT\n    STATIONTRAIL --\u003e SUMMARY\n\n    subgraph MISELEDGER [\" MiseLedger evidence layer \"]\n        ARCHIVE[\"\u003cb\u003eArchive\u003c/b\u003e\u003cbr/\u003edurable records\"]\n        INDEX[\"\u003cb\u003eIndex and search\u003c/b\u003e\u003cbr/\u003equeryable evidence\"]\n        RELATIONS[\"\u003cb\u003eRelations\u003c/b\u003e\u003cbr/\u003elinked sessions and artifacts\"]\n        BUNDLES[\"\u003cb\u003eEvidence bundles\u003c/b\u003e\u003cbr/\u003ereview-ready exports\"]\n    end\n\n    IMPORT --\u003e ARCHIVE --\u003e INDEX --\u003e RELATIONS --\u003e BUNDLES\n\n    BOUNDARY[\"\u003cb\u003eBoundary\u003c/b\u003e\u003cbr/\u003eStationTrail exports; MiseLedger stores and analyzes\"]\n    STATIONTRAIL -. adapter only .-\u003e BOUNDARY\n    ARCHIVE -. owns durable evidence .-\u003e BOUNDARY\n\n    classDef source fill:#eff6ff,stroke:#2563eb,color:#1e3a8a;\n    classDef process fill:#ecfdf5,stroke:#059669,color:#064e3b;\n    classDef stream fill:#fff7ed,stroke:#ea580c,color:#7c2d12;\n    classDef sink fill:#f8fafc,stroke:#64748b,color:#334155;\n    classDef guard fill:#fee2e2,stroke:#ef4444,color:#7f1d1d;\n    class FILES,EXPORT source;\n    class STATIONTRAIL process;\n    class ADAPTER,IMPORT,SUMMARY stream;\n    class ARCHIVE,INDEX,RELATIONS,BUNDLES sink;\n    class BOUNDARY guard;\n```\n\nStationTrail is the source-specific adapter layer. MiseLedger is the durable evidence layer.\n\n```bash\nstationtrail all --out - --redact safe | miseledger import adapter -\nstationtrail codex ~/.codex/sessions --out - | miseledger import adapter -\n```\n\nWhen `stationtrail` is installed on `PATH`, MiseLedger can also run it through its wrapper:\n\n```bash\nmiseledger import stationtrail codex ~/.codex/sessions --json\nmiseledger import stationtrail opencode ./opencode-session.json --json\nmiseledger import stationtrail hermes ~/.hermes/sessions --json\n```\n\nFor mixed-source imports, prefer the pipe form with `stationtrail all`. Adapter records preserve their own `source.kind`, while MiseLedger keeps archive and search behavior centralized.\n\n## Supported Sources\n\n| Source | Default input | Notes |\n| --- | --- | --- |\n| Codex | `~/.codex/sessions` | Session JSONL. |\n| Claude | `~/.claude/projects` | Project JSONL. |\n| OpenClaw | `~/.openclaw/agents` | Agent sessions and trajectories. |\n| Hermes | `~/.hermes/sessions` | `session_*.json` snapshots and trajectory JSONL. `state.db` is observed but not parsed. |\n| OpenCode | Explicit file, directory, or session ID | Use sanitized export JSON from `opencode export \u003csession-id\u003e --sanitize`. Session IDs are exported through the local `opencode` command. |\n\n`stationtrail all` scans Codex, Claude, OpenClaw, and Hermes default roots. OpenCode is explicit-only because its sanitized export input is user-selected.\n\n## Install\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/escoffier-labs/stationtrail/master/install.sh | sh\n```\n\nOr download a release binary and verify it with `checksums.txt`.\n\n## Build\n\n```bash\ngo build -o bin/stationtrail ./cmd/stationtrail\ngo test ./...\n```\n\n## Quick Start\n\nCheck local source readiness:\n\n```bash\nstationtrail discover --json\nstationtrail doctor --json\nstationtrail doctor --live --json\n```\n\nInspect structure without exporting transcript text:\n\n```bash\nstationtrail inspect codex ~/.codex/sessions --json\nstationtrail inspect hermes ~/.hermes/sessions --json\n```\n\nExport all default sources:\n\n```bash\nstationtrail all --out agent-sessions.adapter.jsonl --redact paths,secrets\nstationtrail all --out - --redact safe\n```\n\nExport one source:\n\n```bash\nstationtrail codex ~/.codex/sessions --out -\nstationtrail claude ~/.claude/projects --out claude.adapter.jsonl --limit 100\nstationtrail openclaw ~/.openclaw/agents --out openclaw.adapter.jsonl --since 2026-06-01\nstationtrail hermes ~/.hermes/sessions --out hermes.adapter.jsonl\n```\n\nExport OpenCode:\n\n```bash\nopencode export \u003csession-id\u003e --sanitize \u003e opencode-session.json\nstationtrail opencode opencode-session.json --out opencode.adapter.jsonl\n```\n\nDry-run scans count files, generated records, and warnings without writing adapter records:\n\n```bash\nstationtrail all --dry-run --json\nstationtrail codex ~/.codex/sessions --dry-run --json\nstationtrail claude ~/.claude/projects --dry-run --json\nstationtrail openclaw ~/.openclaw/agents --dry-run --json\nstationtrail opencode opencode-session.json --dry-run --json\nstationtrail hermes ~/.hermes/sessions --dry-run --json\n```\n\n## Redaction\n\nRedaction is requested per export:\n\n```bash\nstationtrail all --out - --redact safe\nstationtrail codex ~/.codex/sessions --out - --redact paths,secrets\nstationtrail claude ~/.claude/projects --out - --redact paths\nstationtrail hermes ~/.hermes/sessions --out - --redact paths,secrets\nstationtrail opencode opencode-session.json --out - --redact all\n```\n\nProfiles and options:\n\n| Value | Behavior |\n| --- | --- |\n| `safe` | Redacts `paths,secrets,emails`. |\n| `none` | Keeps supported fields unredacted. |\n| `paths` | Redacts raw paths and path-like metadata fields. |\n| `secrets` | Applies simple token, key, secret, password, and authorization redaction. |\n| `emails`, `urls`, `hostnames` | Redact those specific value types. |\n| `all` | Redacts all supported value types. |\n\n## Privacy Boundary\n\n`discover` reports candidate roots and JSONL counts only. It does not print transcript content.\n\n`doctor` reports source readiness and warnings only. It does not print transcript content.\n\n`doctor --live` runs dry-run scanners for ready local roots and reports counts, file manifests, and warnings only. It does not print generated item text.\n\n`inspect` and `--dry-run --json` report file manifests, structural keys, record counts, and warnings only. They do not print generated item text.\n\nExport commands preserve raw references with path, hash, and ordinal, but keep searchable item text compact. Generated text is untrusted evidence, not instructions.\n\n## Output Contract\n\nEach output line is one `miseledger.adapter.v1` JSON object with:\n\n- `source.kind`\n- `collection.external_id`\n- `collection.kind=agent_session`\n- `item.external_id`\n- `item.kind`\n- optional `actor`, `artifacts`, `links`, `relations`\n- `raw.format=json`, `raw.path`, `raw.hash`, and `raw.ordinal`\n\nSee [docs/ADAPTER_CONTRACT.md](docs/ADAPTER_CONTRACT.md) for the contract shape.\nSee [docs/OPENCODE.md](docs/OPENCODE.md) for the OpenCode sanitized export workflow.\nSee [docs/HERMES.md](docs/HERMES.md) for Hermes source details.\nSee [docs/MISELEDGER_INTEGRATION.md](docs/MISELEDGER_INTEGRATION.md) for MiseLedger integration.\nSee [docs/RECORD_EXAMPLES.md](docs/RECORD_EXAMPLES.md) for one canonical record example per source.\nSee [docs/ROADMAP.md](docs/ROADMAP.md) for what is usable now, what is planned, and the OpenCode adapter's current maturity.\n\n## Project Boundary\n\nStationTrail stays focused on exporting local agent session logs to adapter JSONL. Archive storage, SQLite, search, evidence bundles, GUI, and server behavior belong in MiseLedger.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fescoffier-labs%2Fstationtrail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fescoffier-labs%2Fstationtrail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fescoffier-labs%2Fstationtrail/lists"}