{"id":41304716,"url":"https://github.com/joemckenney/wake","last_synced_at":"2026-01-31T20:05:42.557Z","repository":{"id":334142470,"uuid":"1139978543","full_name":"joemckenney/wake","owner":"joemckenney","description":"Wake records your terminal sessions so Claude Code can see what you've been doing.","archived":false,"fork":false,"pushed_at":"2026-01-23T06:12:20.000Z","size":65,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-23T19:19:34.131Z","etag":null,"topics":["claude-code","cli","developer-tools","mcp","rust","shell","terminal"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/joemckenney.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-01-22T17:05:01.000Z","updated_at":"2026-01-23T17:25:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/joemckenney/wake","commit_stats":null,"previous_names":["joemckenney/wake"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/joemckenney/wake","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joemckenney%2Fwake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joemckenney%2Fwake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joemckenney%2Fwake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joemckenney%2Fwake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joemckenney","download_url":"https://codeload.github.com/joemckenney/wake/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joemckenney%2Fwake/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28952586,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T18:30:42.805Z","status":"ssl_error","status_checked_at":"2026-01-31T18:30:19.593Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["claude-code","cli","developer-tools","mcp","rust","shell","terminal"],"created_at":"2026-01-23T04:59:53.472Z","updated_at":"2026-01-31T20:05:42.551Z","avatar_url":"https://github.com/joemckenney.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/logo.svg\" alt=\"wake\" width=\"80\" height=\"80\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003ewake\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\u003cstrong\u003eThe trail you leave behind.\u003c/strong\u003e\u003c/p\u003e\n\nWake records your terminal sessions—commands, outputs, git context—so Claude Code can see what you've been doing.\n\n## Installation\n\n```sh\ncurl -sSf https://raw.githubusercontent.com/joemckenney/wake/main/install.sh | sh\n```\n\n## Setup\n\nAdd to `~/.zshrc` or `~/.bashrc`:\n\n```sh\neval \"$(wake init zsh)\"   # or: wake init bash\n```\n\nAdd the MCP server to Claude Code:\n\n```sh\nclaude mcp add --transport stdio --scope user wake-mcp -- wake-mcp\n```\n\n## Usage\n\n### The Workflow\n\n1. **Start** — `wake shell`\n2. **Work** — builds, deploys, debugging\n3. **Ask Claude** — it sees your terminal history, no copy-pasting\n\n### Example\n\n```\n$ wake shell\n$ kubectl logs deploy/api-server | tail -100\n  # wall of errors\n$ kubectl describe pod api-server-7f8b9\n  # more stuff you don't have time to read\n```\n\n\u003e **You:** Summarize what's happening with the API server\n\u003e\n\u003e **Claude:** The API server is crash-looping. From the logs, it's failing to connect to Redis on startup—connection refused to `redis:6379`. The pod events show 5 restarts in the last 10 minutes. Looks like the Redis service might be down.\n\n### CLI Reference\n\n```sh\nwake shell              # Start recorded session\nwake log                # Recent commands\nwake search \"error\"     # Search history\nwake dump               # Export session as markdown\nwake annotate \"note\"    # Add a breadcrumb for context\nwake prune              # Delete old sessions\nwake prune --dry-run    # Preview what would be deleted\nwake prune --force      # Skip confirmation\nwake prune --older-than 7  # Override retention period (days)\nwake llm status         # Check model status (downloaded/loaded)\nwake llm download       # Pre-download model (optional, auto-downloads on first use)\n```\n\n### MCP Tools\n\nClaude Code uses these tools via the MCP server:\n\n| Tool | Purpose |\n|------|---------|\n| `wake_status` | Current session info |\n| `wake_list_commands` | List recent commands with metadata and summaries (no full output) |\n| `wake_get_output` | Fetch full output for specific command IDs |\n| `wake_log` | Recent commands with truncated output |\n| `wake_search` | Search command history |\n| `wake_dump` | Export session as markdown |\n| `wake_annotate` | Add notes to the session |\n\nThe `wake_list_commands` + `wake_get_output` pattern enables **tiered retrieval**—Claude sees command metadata first, then fetches full output only when needed. This reduces context usage for long sessions.\n\n### Configuration\n\nCreate `~/.wake/config.toml`:\n\n```toml\n[retention]\ndays = 21      # Delete sessions older than this (default: 21)\n\n[output]\nmax_mb = 5     # Max output size per command in MB (default: 5)\n\n[summarization]\nenabled = false  # Disable LLM summarization (default: true)\nmin_bytes = 500  # Minimum output size to trigger summarization (default: 1024)\n```\n\nOr use environment variables (take precedence over config file):\n\n```sh\nexport WAKE_RETENTION_DAYS=14\nexport WAKE_MAX_OUTPUT_MB=10\n```\n\nOld sessions are automatically pruned on each `wake shell` start.\n\n### LLM Summarization\n\nWake automatically summarizes command outputs using a local LLM (Qwen3-0.6B). Summaries appear in `wake_list_commands` output, helping Claude quickly understand what happened without reading full output.\n\n**Enabled by default.** On first run, the model (~380MB) downloads automatically.\n\n- **CPU-friendly** — The small model runs efficiently without a GPU\n- **Privacy** — All inference happens locally, nothing leaves your machine\n- **Manual download** — `wake llm download` to pre-download the model\n- **Disable** — Set `enabled = false` in config if you don't want summarization\n\n**How it works:**\n1. When a command completes with output \u003e `min_bytes`, it's queued for summarization\n2. A background task runs inference on the local model\n3. Summaries are stored in the database and exposed via MCP tools\n\n**GPU acceleration (build from source):**\n\nThe default build and pre-built binaries use CPU inference, which is fast enough for the small model. For faster inference on supported hardware, build with GPU features:\n\n```sh\ncargo build --release --features cuda   # NVIDIA (requires CUDA toolkit)\ncargo build --release --features metal  # Apple Silicon\n```\n\n## How It Works\n\n```\n┌─────────────────────────────────────────────────────────────────────┐\n│                            wake shell                               │\n│                                                                     │\n│  ┌───────────┐       ┌─────────────┐      ┌──────────────────────┐  │\n│  │   Your    │  pty  │    Shell    │ hook │    Unix Socket       │  │\n│  │  Terminal │◄─────►│  (zsh/bash) │─────►│  /tmp/wake-*.sock    │  │\n│  └───────────┘       └─────────────┘      └──────────┬───────────┘  │\n│        │                   │                         │              │\n│        │                   │ stdout                  │ cmd events   │\n│        │                   ▼                         ▼              │\n│        │              ┌────────────────────────────────┐            │\n│        │              │         Output Buffer          │            │\n│        │              └───────────────┬────────────────┘            │\n│        │                              │                             │\n│        │                              ▼                             │\n│        │                       ┌─────────────┐    ┌──────────────┐  │\n│        │                       │  SQLite DB  │◄───│ LLM Summary  │  │\n│        │                       │  ~/.wake/   │    │ (background) │  │\n│        │                       └─────────────┘    └──────────────┘  │\n└────────┼────────────────────────────────────────────────────────────┘\n         │                              ▲\n         │ you                          │ reads\n         ▼                              │\n┌──────────────┐               ┌──────────────┐          ┌───────────┐\n│   Human at   │               │   wake-mcp   │   mcp    │  Claude   │\n│   Keyboard   │               │  MCP Server  │◄────────►│   Code    │\n└──────────────┘               └──────────────┘          └───────────┘\n```\n\n### Components\n\n| Component    | Purpose                                                        |\n| ------------ | -------------------------------------------------------------- |\n| `wake shell` | Spawns a PTY, captures all I/O, listens for hook events        |\n| Shell hooks  | Installed via `wake init`, notify wake when commands start/end |\n| Unix socket  | IPC between shell hooks and the wake process                   |\n| SQLite DB    | Stores sessions, commands, outputs, annotations, summaries     |\n| LLM engine   | Background task that summarizes command outputs locally        |\n| `wake-mcp`   | MCP server that exposes wake data to Claude Code               |\n\n### Data Flow\n\n1. `wake shell` spawns your shell inside a PTY and sets `$WAKE_SESSION`\n2. Shell hooks fire on each command, sending metadata via Unix socket\n3. PTY output is captured and associated with the current command\n4. On command completion, exit code + output are written to SQLite\n5. Large outputs are queued for LLM summarization in the background\n6. Claude Code queries `wake-mcp`, which reads from the database\n\n### Constraints\n\n- **One session per shell** — Each `wake shell` creates an isolated session\n- **Output truncation** — Commands with \u003e5MB output are truncated (configurable)\n- **Auto-cleanup** — Sessions older than 21 days are automatically deleted (configurable)\n- **Local only** — All data stays in `~/.wake/`, nothing leaves your machine\n- **Shell support** — Hooks work with zsh and bash (fish/other shells not yet supported)\n\n## Building from Source\n\n```sh\ngit clone https://github.com/joemckenney/wake\ncd wake\ncargo build --release\n\n# With GPU acceleration (optional)\ncargo build --release --features cuda   # NVIDIA\ncargo build --release --features metal  # Apple Silicon\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoemckenney%2Fwake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoemckenney%2Fwake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoemckenney%2Fwake/lists"}