{"id":48218462,"url":"https://github.com/gradigit/claude-pager","last_synced_at":"2026-04-04T19:03:16.098Z","repository":{"id":339386131,"uuid":"1161710628","full_name":"gradigit/claude-pager","owner":"gradigit","description":"Fast C transcript pager for Claude Code: no blank Ctrl-G screen, clickable links/files, queued prompt composer, TurboDraft fast path.","archived":false,"fork":false,"pushed_at":"2026-03-12T19:59:35.000Z","size":561,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-13T00:42:16.908Z","etag":null,"topics":["c","claude-code","developer-tools","macos","pager","performance","terminal","turbodraft"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gradigit.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-02-19T12:31:18.000Z","updated_at":"2026-03-12T19:56:15.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/gradigit/claude-pager","commit_stats":null,"previous_names":["gradigit/claude-pager"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gradigit/claude-pager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gradigit%2Fclaude-pager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gradigit%2Fclaude-pager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gradigit%2Fclaude-pager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gradigit%2Fclaude-pager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gradigit","download_url":"https://codeload.github.com/gradigit/claude-pager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gradigit%2Fclaude-pager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31409471,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["c","claude-code","developer-tools","macos","pager","performance","terminal","turbodraft"],"created_at":"2026-04-04T19:03:02.699Z","updated_at":"2026-04-04T19:03:16.073Z","avatar_url":"https://github.com/gradigit.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# claude-pager\n\nA scrollable terminal pager for Claude Code session transcripts. Press **Ctrl-G** in Claude Code and your conversation history renders in the terminal while your GUI editor is open.\n\nclaude-pager solves two major Ctrl-G pain points:\n\n- Claude Code’s TUI going blank while an external GUI editor is open\n- Broken Cmd-click behavior on long wrapped links in terminal output\n\nIt does this with a native C pager + OSC-8 hyperlinks, so wrapped URLs and file paths stay clickable.\n\nThe runtime is a single compiled C binary — no Python, no Node, no runtime dependencies.\n\n## Before vs After: clickable links and file paths\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003cstrong\u003eBefore\u003c/strong\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003cstrong\u003eAfter (claude-pager)\u003c/strong\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cimg src=\"assets/readme/osc8-before.png\" alt=\"Before: raw, hard-to-click links and file paths in terminal output\" width=\"460\"\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"assets/readme/osc8-after.png\" alt=\"After: shortened clickable OSC-8 links and file paths in claude-pager\" width=\"460\"\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003csub\u003eclaude-pager shortens and wraps links and file paths into clickable OSC-8 hyperlinks, and keeps mouse scrolling just like regular Claude Code session context.\u003c/sub\u003e\n\n## What's New in v2\n\n\u003cimg src=\"assets/readme/v2-overview.svg\" alt=\"claude-pager v2 overview with transcript rendering, built-in prompt composer, queue editing, clickable links, and TurboDraft fast path\" width=\"100%\"\u003e\n\n- **Built-in queued prompt composer** right inside the pager, so Ctrl-G no longer means read-only transcript context\n- **Multiline prompt drafting** with **Shift+Enter**, plus queue cycle/edit/remove controls\n- **Clipboard + drag/drop attachments** that turn pasted files and images into `@/absolute/path` references\n- **TurboDraft fast path** for low-latency session open/close over a direct Unix socket\n- **Interactive terminal ergonomics**: scroll wheel browsing, click/Cmd-click links, and Shift-drag text selection\n\n## Install (quick start)\n\n### One-liner\n\n```sh\ncurl -sSL https://raw.githubusercontent.com/gradigit/claude-pager/main/install.sh | bash\n```\n\nThis clones the repo to `~/.claude-pager`, builds the binary, sets the `editor` in `~/.claude/settings.json`, preserves your original editor as `env.CLAUDE_PAGER_EDITOR`, writes `env.CLAUDE_PAGER_EDITOR_TYPE` (`tui`/`gui`), and installs the required Claude hooks for transcript lookup + queued prompt draining. No shell config changes needed.\n\n### AI agent install\n\nPaste the repo URL into Claude Code or any AI coding agent. The [agent instructions](#agent-instructions) below have everything it needs to install and configure claude-pager automatically.\n\nImportant: Claude hook entries must use hook-group objects with a nested `hooks` array. Flat hook objects like `{\"type\":\"command\",\"command\":\"...\"}` directly under `hooks.SessionStart` or `hooks.Stop` are invalid in current Claude releases.\n\n### Prebuilt binaries\n\nIf you don't want to compile locally, download the latest release assets from the GitHub releases page:\n\n- `claude-pager-\u003cversion\u003e-macos-arm64.tar.gz` (Apple Silicon)\n- `claude-pager-\u003cversion\u003e-macos-x86_64.tar.gz` (Intel)\n- `checksums.txt`\n\nThen verify:\n\n```sh\nshasum -a 256 -c checksums.txt\n```\n\nExtract the archive and use `bin/claude-pager-open` as your Claude Code editor path.\n\n## ⚡ Performance\n\nclaude-pager is tuned for low-latency Ctrl-G flow, with instrumented timings from a production benchmark run (52 cycles total, 2 warmup excluded, 50 measured).\n\n### claude-pager internal rendering timings\n\n| Component | Median |\n| --- | ---: |\n| Claude Code exec overhead | **6.3ms** |\n| claude-pager first draw | **2.7ms** |\n| Terminal-ready probe | **0.04ms** |\n\n### Ctrl-G flow timings (TurboDraft fast path)\n\n| Metric | Median | p95 |\n| --- | ---: | ---: |\n| Ctrl-G → editor window visible | **60.1ms** | **76.1ms** |\n| Cmd-Q → back to Claude Code | **53.1ms** | **61.3ms** |\n\nThese Ctrl-G flow timings are measured with TurboDraft using claude-pager’s direct Unix-socket fast path. Other popular GUI editors go through the generic launch/wait path and typically do **not** hit sub-100ms Ctrl-G end-to-end flow timings.\n\nclaude-pager itself is extremely fast; most remaining end-to-end latency is outside claude-pager (external editor + window rendering path).\n\n## ✨ Speed-of-thought editing with TurboDraft\n\nIf you want the lowest-latency prompt editing feel, use [**TurboDraft**](https://github.com/gradigit/turbodraft) (the sister tool) with claude-pager.\n\n- claude-pager: fast transcript context + Ctrl-G flow\n- TurboDraft: near-instant editing experience once the editor is open\n\n## Features\n\n- Keeps your terminal transcript visible while GUI editors are open (no blank Ctrl-G screen)\n- Scrollable viewport with mouse wheel and keyboard navigation\n- Markdown rendering: headings, bold, inline code, code blocks, lists\n- GFM-style table rendering with bounded row/column budgets for predictable performance\n- Diff coloring (+green / -red / @@cyan)\n- Context usage bar showing token consumption\n- OSC-8 hyperlink rendering so long wrapped links remain easy to open\n- OSC-8 file/path hyperlink rendering so local paths are easy to open\n- Boxed multiline prompt composer is active by default while browsing transcript\n- Composer auto-wraps and expands vertically for longer prompts\n- File/image path references auto-prepended as `@/absolute/path` when pasted into queue input\n- `Ctrl+V` in queue input can attach clipboard files (Finder copy) and clipboard images as `@` references\n- Drag-and-drop file paths into queue input are accepted as `@` references\n- Terminal resize support (SIGWINCH)\n- Works with any GUI editor (TurboDraft, VS Code, Sublime, etc.)\n- TurboDraft fast path: talks directly to TurboDraft's Unix socket, bypassing shell overhead and handing off session-scoped queue metadata\n- Queue draining is handled by the shipped Claude Stop hook so queued prompts continue automatically\n\n## Requirements\n\n- macOS (arm64 or x86_64)\n- A C compiler (Xcode Command Line Tools: `xcode-select --install`)\n- `jq` (installed automatically via Homebrew if missing)\n\n## Build from source (manual)\n\n```sh\ngit clone https://github.com/gradigit/claude-pager.git\ncd claude-pager/bin\nmake\n```\n\nThis produces `bin/claude-pager-open` (~70KB, zero dependencies).\n\n## Setup\n\nThe installer handles everything automatically. If you installed manually:\n\n### 1. Set the editor in settings.json\n\nAdd to `~/.claude/settings.json`:\n\n```json\n{\n  \"editor\": \"/path/to/claude-pager-open\",\n  \"env\": {\n    \"CLAUDE_PAGER_EDITOR\": \"code --wait\",\n    \"CLAUDE_PAGER_EDITOR_TYPE\": \"gui\"\n  }\n}\n```\n\nClaude Code sets `editor` as the binary it spawns on Ctrl-G. Since `env` values may not be exported to the editor process, claude-pager reads `~/.claude/settings.json` directly for `env.CLAUDE_PAGER_EDITOR` and `env.CLAUDE_PAGER_EDITOR_TYPE`.\n\n### 2. Install the required hooks\n\nclaude-pager uses two Claude hooks:\n\n- **SessionStart** → remembers the exact transcript for the current terminal session\n- **Stop** → drains the next queued prompt from the session queue so prompt queuing continues automatically\n\nAdd to `~/.claude/settings.json`:\n\n```json\n{\n  \"hooks\": {\n    \"SessionStart\": [\n      {\n        \"hooks\": [\n          {\n            \"type\": \"command\",\n            \"command\": \"/path/to/claude-pager/shim/save-session-transcript.sh\"\n          }\n        ]\n      }\n    ],\n    \"Stop\": [\n      {\n        \"hooks\": [\n          {\n            \"type\": \"command\",\n            \"command\": \"/path/to/claude-pager/shim/queue-drain-stop.sh\",\n            \"timeout\": 10\n          }\n        ]\n      }\n    ]\n  }\n}\n```\n\nWithout the SessionStart hook, the pager falls back to the most recent transcript in your project directory. Without the Stop hook, the queued prompt composer UI still appears, but queued prompts will not auto-drain back into Claude after the current response completes.\n\n## Switching Editors\n\nYour editor is stored in `env.CLAUDE_PAGER_EDITOR` in `~/.claude/settings.json`. Change it to switch editors:\n\n```json\n{\n  \"env\": {\n    \"CLAUDE_PAGER_EDITOR\": \"cursor --wait\",\n    \"CLAUDE_PAGER_EDITOR_TYPE\": \"gui\"\n  }\n}\n```\n\nCommon values:\n\n| Editor | Value |\n| --- | --- |\n| VS Code | `code --wait` |\n| Cursor | `cursor --wait` |\n| Zed | `zed --wait` |\n| Sublime Text | `subl --wait` |\n| Vim | `vim` |\n| Neovim | `nvim` |\n\nThe resolution order is: `CLAUDE_PAGER_EDITOR` (env or settings.json) → `VISUAL` → `EDITOR` → system default (`open -W -t`).\n\nTUI editors (vim, nvim, emacs, nano, etc.) are exec'd directly without the pager. GUI editors are forked with the pager running alongside.\n\nYou can force the path with `CLAUDE_PAGER_EDITOR_TYPE=tui` or `CLAUDE_PAGER_EDITOR_TYPE=gui` in the `env` section (read from env or settings.json).\n\n## Key Bindings\n\n| Key | Action |\n| --- | --- |\n| Scroll wheel | Scroll up/down |\n| Click / Cmd-click | Open hovered OSC-8 link or file path |\n| Shift-drag | Select transcript text while mouse interactions stay enabled |\n| Arrow keys (in composer) | Move caret and edit wrapped prompt text |\n| Page Up/Down | Scroll one page |\n| Home / End (in composer) | Jump caret to start / end |\n| Shift+Up / Shift+Down | Cycle queued prompts and load selected one for editing |\n| Shift+Enter (in composer) | Insert a newline into the queued prompt |\n| Ctrl+D (in input mode) | Remove selected queued prompt |\n| Ctrl+V (in input mode) | Attach clipboard file/image as `@/absolute/path` reference |\n| Enter (in input mode) | Queue prompt or update the selected queued prompt |\n| Esc (in input mode) | Restore stashed draft or clear current input text |\n| Mouse / Page Up / Page Down | Browse transcript while input stays active |\n| Ctrl+Q | Close the active TurboDraft session immediately on the TurboDraft fast path |\n\n## How It Works\n\nWhen you press Ctrl-G in Claude Code:\n\n1. Claude Code opens an alt screen and spawns the editor shim\n2. The C binary finds your session transcript via a tty-keyed temp file (~0.1ms)\n3. If TurboDraft is available: connects to its socket and sends `session.open` (~0.02ms) with `cwd`, protocol version, and session-scoped queue metadata\n4. It forks and renders the pager directly in C (~3ms for pre-render, ~5ms for full transcript)\n5. Your editor opens the file — the pager is already visible\n6. Queued prompts are persisted to a session-scoped queue file while you work in the pager composer\n7. The shipped Claude Stop hook drains queued prompts back into Claude after each response completes\n8. On `Ctrl+Q` in the TurboDraft fast path: the pager requests `turbodraft.session.close` for the active session and waits for `turbodraft.session.wait`\n9. On close: once the session actually closes, the binary kills the pager and returns control to Claude Code\n\nThe pager keeps mouse interactions enabled for scroll-wheel browsing, link activation, and Shift-drag text selection.\n\n## Architecture\n\n```\nclaude-pager-open (C binary, ~70KB)\n├── Editor resolution (CLAUDE_PAGER_EDITOR from env/settings.json → VISUAL → EDITOR → system default)\n├── TUI detection (known TUI list + optional CLAUDE_PAGER_EDITOR_TYPE override + optimistic unknown-editor probe)\n├── TurboDraft socket client (JSON-RPC 2.0 over Unix domain socket)\n├── Generic editor path (fork editor + fork pager + waitpid)\n├── Transcript parser (minimal JSON scanner, single-pass JSONL)\n├── Markdown renderer (ANSI escape codes)\n├── Scrollable viewport (raw terminal mode, keyboard/mouse input)\n└── Recursion guard (_CLAUDE_PAGER_ACTIVE env var)\n```\n\n## Agent Instructions\n\nThis section is for AI coding agents (Claude Code, Cursor, Copilot, etc.). Everything here is deterministic — no user input is needed.\n\n### 1. Check prerequisites\n\n```sh\n# macOS required; ensure a C compiler is available\nxcode-select -p \u003e/dev/null 2\u003e\u00261 || xcode-select --install\n# jq required for settings.json manipulation\ncommand -v jq \u003e/dev/null 2\u003e\u00261 || brew install jq\n```\n\n### 2. Clone and build\n\n```sh\ngit clone https://github.com/gradigit/claude-pager.git ~/.claude-pager\nmake -C ~/.claude-pager/bin\n# verify binary exists\ntest -x ~/.claude-pager/bin/claude-pager-open\n```\n\n### 3. Configure settings.json\n\nRead `~/.claude/settings.json` (create with `{}` if missing). Use `jq` to:\n\n1. Save the current `editor` value as `env.CLAUDE_PAGER_EDITOR` (if it exists and isn't already claude-pager)\n2. Set `editor` to the binary path\n3. Infer `env.CLAUDE_PAGER_EDITOR_TYPE` (`tui` or `gui`)\n4. Add the SessionStart + Stop hooks\n\nImportant: Claude hooks must use wrapped hook-group objects with nested `hooks` arrays. Do not write legacy flat command objects directly under `hooks.SessionStart` or `hooks.Stop`.\n\n```sh\nBINARY=\"$HOME/.claude-pager/bin/claude-pager-open\"\nHOOK_SESSION=\"$HOME/.claude-pager/shim/save-session-transcript.sh\"\nSTOP_HOOK=\"$HOME/.claude-pager/shim/queue-drain-stop.sh\"\nSETTINGS=\"$HOME/.claude/settings.json\"\n\nmkdir -p \"$(dirname \"$SETTINGS\")\"\n[[ -f \"$SETTINGS\" ]] || echo '{}' \u003e \"$SETTINGS\"\n\n# Preserve old editor\nOLD=$(jq -r '.editor // empty' \"$SETTINGS\")\nif [[ -n \"$OLD\" \u0026\u0026 \"$OLD\" != *\"claude-pager\"* ]]; then\n    jq --arg ed \"$OLD\" '.env.CLAUDE_PAGER_EDITOR = $ed' \"$SETTINGS\" \u003e \"$SETTINGS.tmp\" \u0026\u0026 mv \"$SETTINGS.tmp\" \"$SETTINGS\"\nfi\n\n# If no editor was preserved and none detected, find one\nif [[ -z \"$(jq -r '.env.CLAUDE_PAGER_EDITOR // empty' \"$SETTINGS\")\" ]]; then\n    for cmd in cursor code zed subl; do\n        if command -v \"$cmd\" \u0026\u003e/dev/null; then\n            jq --arg ed \"$cmd --wait\" '.env.CLAUDE_PAGER_EDITOR = $ed' \"$SETTINGS\" \u003e \"$SETTINGS.tmp\" \u0026\u0026 mv \"$SETTINGS.tmp\" \"$SETTINGS\"\n            break\n        fi\n    done\nfi\n\n# Set editor to claude-pager-open\njq --arg bin \"$BINARY\" '.editor = $bin' \"$SETTINGS\" \u003e \"$SETTINGS.tmp\" \u0026\u0026 mv \"$SETTINGS.tmp\" \"$SETTINGS\"\n\n# Infer editor type\ntok=\"$(jq -r '.env.CLAUDE_PAGER_EDITOR // empty' \"$SETTINGS\" | awk '{print $1}' | xargs basename 2\u003e/dev/null || true)\"\ncase \"$tok\" in\n  vi|vim|nvim|lvim|nvi|vim.basic|vim.tiny|vim.nox|vim.gtk|vim.gtk3|emacs|nano|micro|helix|hx|kakoune|kak|joe|ed|ne|mg|jed|tilde|dte|mcedit|amp) ty=\"tui\" ;;\n  *) ty=\"gui\" ;;\nesac\nif [[ -n \"$tok\" ]]; then\n  jq --arg ty \"$ty\" '.env.CLAUDE_PAGER_EDITOR_TYPE = $ty' \"$SETTINGS\" \u003e \"$SETTINGS.tmp\" \u0026\u0026 mv \"$SETTINGS.tmp\" \"$SETTINGS\"\nfi\n\n# Normalize legacy flat hook objects into Claude's current matcher+hooks schema\njq '\n  def normalize_event_array:\n    if type == \"array\" then\n      map(\n        if (type == \"object\" and (.hooks? | type) == \"array\") then\n          .\n        elif (type == \"object\" and .type == \"command\" and (.command? | type) == \"string\") then\n          {hooks: [(\n            if has(\"timeout\") then\n              {type, command, timeout}\n            else\n              {type, command}\n            end\n          )]}\n        else\n          .\n        end\n      )\n    else\n      []\n    end;\n  .hooks = (if (.hooks | type) == \"object\" then .hooks else {} end) |\n  .hooks.SessionStart = ((.hooks.SessionStart // []) | normalize_event_array) |\n  .hooks.Stop = ((.hooks.Stop // []) | normalize_event_array)\n' \"$SETTINGS\" \u003e \"$SETTINGS.tmp\" \u0026\u0026 mv \"$SETTINGS.tmp\" \"$SETTINGS\"\n\n# Add SessionStart hook (if not already present)\nif ! jq -e --arg cmd \"$HOOK_SESSION\" '.hooks.SessionStart[]?.hooks[]? | select(.command == $cmd)' \"$SETTINGS\" \u0026\u003e/dev/null; then\n    jq --arg cmd \"$HOOK_SESSION\" '\n        .hooks.SessionStart = ((.hooks.SessionStart // []) + [{\n            \"hooks\": [\n                {\n                    \"type\": \"command\",\n                    \"command\": $cmd\n                }\n            ]\n        }])\n    ' \"$SETTINGS\" \u003e \"$SETTINGS.tmp\" \u0026\u0026 mv \"$SETTINGS.tmp\" \"$SETTINGS\"\nfi\n\n# Add Stop hook (if not already present)\nif ! jq -e --arg cmd \"$STOP_HOOK\" '.hooks.Stop[]?.hooks[]? | select(.command == $cmd)' \"$SETTINGS\" \u0026\u003e/dev/null; then\n    jq --arg cmd \"$STOP_HOOK\" '\n        .hooks.Stop = ((.hooks.Stop // []) + [{\n            \"hooks\": [\n                {\n                    \"type\": \"command\",\n                    \"command\": $cmd,\n                    \"timeout\": 10\n                }\n            ]\n        }])\n    ' \"$SETTINGS\" \u003e \"$SETTINGS.tmp\" \u0026\u0026 mv \"$SETTINGS.tmp\" \"$SETTINGS\"\nfi\n\n# Validate final hook shape\njq -e --arg session_cmd \"$HOOK_SESSION\" --arg stop_cmd \"$STOP_HOOK\" '\n  (.hooks.SessionStart | type) == \"array\" and\n  any(.hooks.SessionStart[]?; (.hooks | type) == \"array\") and\n  any(.hooks.SessionStart[]?.hooks[]?; (.type == \"command\") and (.command == $session_cmd)) and\n  (.hooks.Stop | type) == \"array\" and\n  any(.hooks.Stop[]?; (.hooks | type) == \"array\") and\n  any(.hooks.Stop[]?.hooks[]?; (.type == \"command\") and (.command == $stop_cmd) and ((.timeout // 10) == 10))\n' \"$SETTINGS\" \u003e/dev/null\n```\n\n### 4. Done\n\nTell the user to restart Claude Code and press **Ctrl-G**. The pager will render their conversation transcript while the editor is open.\n\n### Agent notes\n\n- The binary auto-detects TurboDraft's Unix socket — no special config needed for TurboDraft users\n- Editor resolution: `CLAUDE_PAGER_EDITOR` (env or settings.json) → `VISUAL` → `EDITOR` → `open -W -t` (macOS default)\n- `CLAUDE_PAGER_EDITOR_TYPE` is also read from env or settings.json (`tui`/`gui` override)\n- The SessionStart hook enables multi-session transcript lookup; without it the pager falls back to the most recent transcript in the project directory\n- The Stop hook drains queued prompts from the session queue back into Claude after each completed response\n- `_CLAUDE_PAGER_ACTIVE` env var is set internally to prevent recursion — agents do not need to set this\n- No shell config changes (VISUAL/EDITOR) are needed — settings.json is the canonical configuration path\n\n## Development\n\n```sh\ngit clone https://github.com/gradigit/claude-pager.git\ncd claude-pager/bin\nmake            # builds claude-pager-open\nmake clean      # removes build artifacts\n```\n\nThe C source is in `bin/claude-pager-open.c` (editor resolution + socket + fork logic) and `bin/pager.c` (pager rendering).\n\nThe runtime is fully C-based: `bin/claude-pager-open.c` handles editor/session orchestration and `bin/pager.c` handles rendering.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgradigit%2Fclaude-pager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgradigit%2Fclaude-pager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgradigit%2Fclaude-pager/lists"}