Switch AI coding assistants without starting over
Project description
Switch AI coding assistants without starting over
Install · Quick start · Commands · How it works · Terminal UI · Security · Contributing
Use Claude Code for a while. Switch to Codex later. Pick up where you left off.
loghop captures every session from your AI coding agents, builds a shared timeline, and writes handoff context so the next run — even with a different provider — resumes cleanly. No lost decisions, no repeated work, no copy-pasting summaries between terminals.
┌─────────────────────────────────────────────────────────────────────────────┐
│ │
│ 🤖 Session 1: Claude Code │
│ $ loghop run │
│ ┌──────────────────────────────────────────────────────────────┐ │
│ │ Working on task: "Setup Database schema" │ │
│ │ [Session complete - Autocapturing...] │ │
│ └──────────────────────────────┬───────────────────────────────┘ │
│ │ │
│ ▼ │
│ 📦 Unified Timeline (.loghop/) │
│ S-001.md: Claude Code session (Setup DB) │
│ H-001.md: Next steps (Add migrations & seeding) │
│ │ │
│ ▼ │
│ 🧠 Session 2: Codex (OpenAI) │
│ $ loghop run --provider codex │
│ ┌──────────────────────────────────────────────────────────────┐ │
│ │ Handoff loaded: Resuming from Session 1 (Setup DB) │ │
│ │ Current Goal: "Add migrations & seeding" │ │
│ └──────────────────────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────────────────┘
Key features
- Automatic session capture — reads native transcripts from Claude Code and Codex, redacts secrets, stores them locally
- Seamless handoffs — builds context packets so the next provider knows what happened before
- Shared timeline — every session across every provider, in one
timeline.jsonl - Terminal UI — browse projects, sessions, and handoffs with Textual (4 built-in themes)
- Zero-config providers — Claude and Codex are auto-detected from
PATH - Security-first — all files
0600, atomic writes, regex redaction of API keys/tokens/JWTs
Install
Python 3.12+, Git, Linux/macOS/Windows.
pipx install loghop
# or
uv tool install loghop
For the terminal UI (pulls in Textual):
pipx install 'loghop[tui]'
Quick start
# Inside any Git repo:
loghop init # one-time setup (hooks, shim, prompt — asks once)
loghop run # start or resume a session
loghop goal "Ship auth" # set a goal so the next run stays focused
That's it. Every loghop run now:
- Builds a handoff from the project's timeline
- Launches the provider (Claude or Codex)
- Captures the transcript when it finishes
- Appends the session to the shared timeline
Commands
loghop init set up in the current repo
loghop run [<project>] [--provider ...] start or resume a session
loghop goal "<text>" set a default project goal
loghop sessions browse recorded provider runs
loghop topics group related sessions by work item
loghop timeline inspect shared work by day/provider
loghop projects list registered projects
loghop projects remove|purge unregister or purge a project
loghop doctor [--fix] check or repair install state
loghop health run project health checks
loghop metrics [--format <format>] export project metrics (summary, prometheus, json, yaml)
loghop backup create|restore backup or restore local loghop data
loghop migrate [--dry-run] migrate local metadata schema
loghop tui open the terminal UI
--provider is optional. If omitted, loghop picks the last-used provider for the
project — or the first one on PATH.
Full command reference
loghop install first-time global install
loghop uninstall [--purge] [-y] remove loghop artifacts
loghop install-aliases install shell aliases in profiles
loghop uninstall-aliases uninstall shell aliases from profiles
loghop completion {bash,zsh,fish} shell tab-completion
loghop providers list available providers
loghop handoff build|list|show manage handoff documents
loghop resume [<project>] [--provider ...] resume a previous session/topic
loghop topics list|show|switch|close|rename manage work topics
loghop sessions show|annotate|reconcile inspect and fix sessions
loghop projects show|remove|purge|cleanup manage the project registry
loghop wrap {codex,claude} [provider args] transparent provider wrapper
loghop journal [--since 7d] [--all] session journal
loghop timeline [--since 12h] [--provider] timeline view
loghop status project status overview
loghop health production-style health checks
loghop metrics [--format <format>] export project metrics (summary, prometheus, json, yaml)
loghop backup create|restore backup or restore local loghop data
loghop migrate [--dry-run] migrate local metadata schema
Global flags: --json, --plain, --quiet, --verbose, --version, --global.
How it works
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ loghop run │────▶│ Provider │────▶│ Capture │
│ build handoff│ │ Claude/Codex │ │ transcript │
└─────────────┘ └─────────────┘ └──────┬──────┘
│
┌─────────────────────▼──────────────────────┐
│ .loghop/ │
│ timeline.jsonl ← shared across providers │
│ sessions/S-*.md ← redacted metadata │
│ handoffs/H-*.md ← context for next run │
└────────────────────────────────────────────┘
After each run, loghop reads the provider's native transcript
(~/.claude/projects/... for Claude, ~/.codex/sessions/... for Codex),
redacts secrets, and stores it under .loghop/sessions/. The next loghop run
builds a handoff from the timeline so the provider gets full context.
Integration layers
loghop init orchestrates optional integrations. Each answer is stored in
~/.loghop/config.toml. Re-running init is safe; installers are idempotent.
- Claude hooks — merges
SessionStartandSessionEndcommands into~/.claude/settings.json, preserving existing settings. - Codex shim — writes a managed executable in
~/.local/bin/codexthat delegates tologhop wrap codex. Refuses to overwrite non-loghop files. - Prompt block — writes
~/.loghop/loghop-prompt.mdand includes it from CodexAGENTS.mdand ClaudeCLAUDE.md. Asks providers to emit a structuredloghopblock with summary, decisions, and todos. - Fast-path parser — when a captured transcript contains the fenced
loghopblock, autocapture trusts it for metadata before falling back to heuristics.
Transparent capture
Add a shell alias so direct claude/codex calls go through loghop in
initialized repos. Outside a repo, the wrapper passes through to the real binary.
You can automatically install or remove these aliases in your shell profile configuration files (~/.bashrc, ~/.zshrc, ~/.config/fish/config.fish) using:
loghop install-aliases # install the alias block
loghop uninstall-aliases # remove the alias block
Or configure it manually:
alias claude='loghop wrap claude'
alias codex='loghop wrap codex'
Cross-project usage
loghop run my-project # cd into registered project, then resume
loghop journal --since 7d # last week of sessions in current repo
loghop journal --all --since 30d # last month across all projects
Terminal UI
When stdout is a terminal and Textual is installed, running loghop (no
arguments) opens an interactive TUI. Use loghop tui to open it explicitly.
pipx install 'loghop[tui]'
- Home screen — global project list and status
- Project screen — sessions, handoffs, and timeline for one repo
- Command palette — press
mto search and run commands - 4 themes — Classic dark/light, Harbor dark/light
Storage layout
.loghop/
config.toml goal, handoff counter, session counter
handoffs/
H-001.md markdown with YAML frontmatter metadata
topics/
T-001.md work topic grouping related sessions
timeline.jsonl canonical timeline across providers
sessions/
S-001.md session metadata (goal, topic, status, summary, todos)
S-001.transcript.jsonl redacted turns from the provider transcript
.loghopignore patterns excluded from the handoff packet
loghop.md regenerated summary (goal + repo snapshot)
~/.loghop/projects.toml global registry of all loghop projects
~/.loghop/config.toml global init/install choices
~/.loghop/loghop-prompt.md optional prompt include
loghop init adds both loghop.md and .loghop/ to .gitignore.
Providers
Claude Code and Codex. Auto-detected from PATH — no configuration
needed. Run loghop providers to see what's available.
Exit codes
| Code | Meaning |
|---|---|
| 0 | success |
| 1 | unexpected internal error |
| 2 | usage / validation error |
| 3 | timeout |
| 10 | provider run exited non-zero |
| 20 | project not initialized |
Security
- All files under
.loghop/are written with mode0o600; directories are0o700. - Atomic writes via
tempfile.mkstemp+os.replace+fsync. loghop health,loghop metrics,loghop backup, andloghop migratesupport operational checks, observability, recovery, and schema upgrades.- File reads reject symlinks;
.loghop/paths are validated before use. - Per-project lock on handoff creation prevents duplicate IDs under concurrent runs.
- Every handoff, transcript, and
loghop.mdpasses through a regex redactor that strips API keys, bearer tokens, JWTs, and URLs with embedded credentials. - Handoff and session artifacts include an HMAC signature over metadata and markdown body, backed by a private per-project
.loghop/integrity.key. - Capture survives interruption —
Ctrl+C, rate-limit kills, and provider timeouts all trigger atry/finallythat sweeps partial transcripts. Sessions left asrunningfor over 1 hour are auto-finalized on the next invocation; explicit recovery vialoghop sessions reconcile.
Built with
Contributing
Contributions are welcome! See CONTRIBUTING.md for development setup, coding standards, and the release process. For documentation, see the docs folder.
git clone https://github.com/elruleh/loghop.git
cd loghop
uv sync --all-extras --dev
bash scripts/release_check.sh qa
python3 scripts/e2e_user_flow.py --skip-pytest --skip-smoke
License
MIT — use it however you like.
Disclaimer
Loghop is not affiliated with, endorsed by, or connected to Anthropic or OpenAI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file loghop-0.1.0.tar.gz.
File metadata
- Download URL: loghop-0.1.0.tar.gz
- Upload date:
- Size: 295.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd08364f5a9852b97068fc96ea9f6abd1f9c7ec2fc72a2c33d77c8e06ecd1f73
|
|
| MD5 |
a4f3aaf56058df5121c1bd557ad46e5e
|
|
| BLAKE2b-256 |
c39b455a90f35ff91cd1914b3697eeb900e3851401ed2991c1524105782291f2
|
Provenance
The following attestation bundles were made for loghop-0.1.0.tar.gz:
Publisher:
release.yml on elruleh/loghop
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
loghop-0.1.0.tar.gz -
Subject digest:
dd08364f5a9852b97068fc96ea9f6abd1f9c7ec2fc72a2c33d77c8e06ecd1f73 - Sigstore transparency entry: 1602155718
- Sigstore integration time:
-
Permalink:
elruleh/loghop@8a2885b1a3d63c4e1645adf54a5b891b004a02d3 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/elruleh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8a2885b1a3d63c4e1645adf54a5b891b004a02d3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file loghop-0.1.0-py3-none-any.whl.
File metadata
- Download URL: loghop-0.1.0-py3-none-any.whl
- Upload date:
- Size: 206.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b262c65907c534345573db8b6d4b6f9bbecfcbce56bb368854eb610a8a24f6d
|
|
| MD5 |
ab0cf71a56ca168c7f12cf6345378029
|
|
| BLAKE2b-256 |
0f23ac1b6975e8ca5afdb6a7ff865244ee61d1ac059bca47fabcb4bfc5490ead
|
Provenance
The following attestation bundles were made for loghop-0.1.0-py3-none-any.whl:
Publisher:
release.yml on elruleh/loghop
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
loghop-0.1.0-py3-none-any.whl -
Subject digest:
3b262c65907c534345573db8b6d4b6f9bbecfcbce56bb368854eb610a8a24f6d - Sigstore transparency entry: 1602155759
- Sigstore integration time:
-
Permalink:
elruleh/loghop@8a2885b1a3d63c4e1645adf54a5b891b004a02d3 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/elruleh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8a2885b1a3d63c4e1645adf54a5b891b004a02d3 -
Trigger Event:
push
-
Statement type: