{"id":51246935,"url":"https://github.com/andylizf/lich","last_synced_at":"2026-06-29T05:01:47.848Z","repository":{"id":355225183,"uuid":"1227278118","full_name":"andylizf/lich","owner":"andylizf","description":"Detach. It keeps running. Native scrollback on reattach.","archived":false,"fork":false,"pushed_at":"2026-05-25T02:27:14.000Z","size":280,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-25T04:19:46.252Z","etag":null,"topics":["agents","claude-code","cli","codex","session-manager","terminal"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andylizf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":null,"dco":null,"cla":null}},"created_at":"2026-05-02T13:10:47.000Z","updated_at":"2026-05-25T02:27:18.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/andylizf/lich","commit_stats":null,"previous_names":["andylizf/abduco-inline","andylizf/lich"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/andylizf/lich","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andylizf%2Flich","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andylizf%2Flich/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andylizf%2Flich/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andylizf%2Flich/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andylizf","download_url":"https://codeload.github.com/andylizf/lich/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andylizf%2Flich/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34913586,"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-29T02:00:05.398Z","response_time":58,"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":["agents","claude-code","cli","codex","session-manager","terminal"],"created_at":"2026-06-29T05:01:43.511Z","updated_at":"2026-06-29T05:01:47.831Z","avatar_url":"https://github.com/andylizf.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003elich\u003c/h1\u003e\n\u003cp align=\"center\"\u003eDetach. It keeps running.\u003cbr\u003eWorks with Claude Code, Codex, and anything else that runs in a terminal.\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/andylizf/lich/actions/workflows/linux.yml\"\u003e\u003cimg src=\"https://github.com/andylizf/lich/actions/workflows/linux.yml/badge.svg\" alt=\"Linux CI\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/andylizf/lich/actions/workflows/macos.yml\"\u003e\u003cimg src=\"https://github.com/andylizf/lich/actions/workflows/macos.yml/badge.svg\" alt=\"macOS CI\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#install\"\u003eInstall\u003c/a\u003e \u0026middot;\n  \u003ca href=\"#usage\"\u003eUsage\u003c/a\u003e \u0026middot;\n  \u003ca href=\"#automation\"\u003eAutomation\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n```sh\nlich -n my-agent claude\nlich -n my-agent codex --no-alt-screen\n```\n\nClose your terminal. Come back later. Everything your agent did is in your normal scrollback, as if you never left.\n\n## Install\n\nDownload a pre-built binary from the [releases page](https://github.com/andylizf/lich/releases):\n\n```sh\n# Linux x86_64\ncurl -Lo lich https://github.com/andylizf/lich/releases/latest/download/lich-linux-x86_64\nchmod +x lich\nsudo mv lich /usr/local/bin/\n\n# macOS arm64\ncurl -Lo lich https://github.com/andylizf/lich/releases/latest/download/lich-macos-arm64\nchmod +x lich\nsudo mv lich /usr/local/bin/\n```\n\nOr build from source (requires Rust):\n\n```sh\ngit clone https://github.com/andylizf/lich\ncd lich\ncargo build --release\nsudo install -m 755 target/release/lich /usr/local/bin/lich\n```\n\n## Usage\n\n```sh\n# Start a session\nlich -n my-agent claude\nlich -n my-agent codex --no-alt-screen\n\n# Reattach. History lands in your normal terminal scrollback.\nlich -A my-agent\n\n# List sessions\nlich\n\n# Detach: Ctrl-\\\n```\n\nIf the agent has its own alternate-screen mode, disable it too (e.g. `codex --no-alt-screen`). lich only controls the attach client and does not intercept sequences the agent emits itself.\n\n## Automation\n\nlich adds flags for scripting and orchestration on top of standard abduco.\n\n### Read session output\n\n```sh\n# Full scrollback\nlich -d my-agent\n\n# Last N lines\nlich -d -L 50 my-agent\n\n# Last N bytes\nlich -d -N 4096 my-agent\n```\n\n### Send input\n\n```sh\n# Key names\nlich -K my-agent \"echo hello\" Enter\nlich -K my-agent C-c\nlich -K my-agent Up Enter\n\n# Literal bytes (raw, no key-name parsing)\nlich -K -x my-agent $'echo hello\\n'\n```\n\nKey names: `Enter`, `Tab`, `Esc`, `Space`, `Backspace`, `Up`, `Down`, `Left`, `Right`, `C-\u003cx\u003e` (e.g. `C-c`, `C-d`).\n\n### Polling loop\n\n```sh\nlich -n my-agent claude\n\nwhile true; do\n  output=\"$(lich -d -L 20 my-agent)\"\n  if echo \"$output\" | grep -q \"Task complete\"; then break; fi\n  lich -K my-agent \"continue\" Enter\n  sleep 5\ndone\n```\n\n## Compared to\n\n|                            | tmux | screen | abduco | dtach | **lich** |\n| -------------------------- | :--: | :----: | :----: | :---: | :------: |\n| Persist across disconnect  |  ✓   |   ✓    |   ✓    |   ✓   |    ✓     |\n| Native terminal scrollback |  ✗   |   ✗    |   ✗    |   ✗   |    ✓     |\n| History replay on attach   |  ✓   |   ✓    |   ✓    |   ✗   |    ✓     |\n| Read output / send keys    |  ✓   |   ~    |   ✗    |   ✗   |    ✓     |\n| Zero config, no new UI     |  ✗   |   ✗    |   ✓    |   ✓   |    ✓     |\n\ntmux and screen replay history inside their own alternate-screen UI. lich replays directly into your terminal's native scrollback. `~` screen can send input via `-X stuff` and capture output via `hardcopy`, but with no stdout API and no way to request the last N lines directly.\n\n## What changed from upstream\n\nTwo additions on top of [abduco](https://github.com/martanne/abduco):\n\n**Native scrollback.** The `CSI ?1049 h/l` alternate-screen sequences are removed from the client attach path. Session output lands in your terminal's native scrollback instead of disappearing when you detach.\n\n**Automation API.** abduco has no way to read or write a session from a script. lich adds:\n\n| Flag | What it does |\n|------|-------------|\n| `-d` | Dump full session output to stdout |\n| `-d -L \u003cn\u003e` | Last N lines |\n| `-d -N \u003cbytes\u003e` | Last N bytes |\n| `-K name token...` | Send keystrokes by name |\n| `-K -x name string` | Send raw bytes |\n\nEverything else (session management, pty forwarding, terminal raw mode, exit status) is unchanged from upstream.\n\nISC license. Upstream copyright Marc André Tanner.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandylizf%2Flich","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandylizf%2Flich","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandylizf%2Flich/lists"}