{"id":50087500,"url":"https://github.com/rbryce90/linux-time-machine","last_synced_at":"2026-05-22T21:04:51.703Z","repository":{"id":353884741,"uuid":"1216610280","full_name":"rbryce90/linux-time-machine","owner":"rbryce90","description":"Local-first Linux observability with historical scrubbing, semantic journald search, and an MCP server for Claude-driven investigation. Go + SQLite + Ollama embeddings.","archived":false,"fork":false,"pushed_at":"2026-04-26T03:11:16.000Z","size":146,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-26T04:22:13.075Z","etag":null,"topics":["bubbletea","embeddings","golang","linux","local-first","mcp","model-context-protocol","observability","ollama","rag","sre","systems-monitoring","time-series","tui"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/rbryce90.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-04-21T04:25:13.000Z","updated_at":"2026-04-26T02:29:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rbryce90/linux-time-machine","commit_stats":null,"previous_names":["rbryce90/linux-time-machine"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/rbryce90/linux-time-machine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbryce90%2Flinux-time-machine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbryce90%2Flinux-time-machine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbryce90%2Flinux-time-machine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbryce90%2Flinux-time-machine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rbryce90","download_url":"https://codeload.github.com/rbryce90/linux-time-machine/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbryce90%2Flinux-time-machine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33368590,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T12:23:38.849Z","status":"online","status_checked_at":"2026-05-22T02:00:06.671Z","response_time":265,"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":["bubbletea","embeddings","golang","linux","local-first","mcp","model-context-protocol","observability","ollama","rag","sre","systems-monitoring","time-series","tui"],"created_at":"2026-05-22T21:04:50.700Z","updated_at":"2026-05-22T21:04:51.696Z","avatar_url":"https://github.com/rbryce90.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# linux-time-machine\n\n**AI-native local system observability.** A single Go binary. No cloud.\n\nReplaces the fragmented stack of `btop` + `iotop` + `nethogs` + `journalctl` with a unified tool that keeps **history**, supports **semantic log search**, and exposes everything to Claude via **MCP** for natural-language investigation of your own machine.\n\n## Why\n\nExisting tools each answer one question and only about *right now*. You notice a CPU spike at 3am — btop can't tell you what happened. You search for \"authentication issues\" — `journalctl | grep` only matches keywords, not meaning.\n\n`linux-time-machine` keeps a rolling time-series of every metric and every journal line on your machine, and exposes them as MCP tools so Claude Desktop or Claude Code can scrub backwards and reason over it in English.\n\n## What it does today\n\n### TUI\n\n- Live CPU / memory / disk / network rates, top processes, 2-minute multi-metric trend sparklines\n- **History scrubbing**: press `h`, arrow-keys back in time, watch past state replay — the panel re-renders at whatever moment you land on\n- Tokyo Night pink-accent theme, responsive to terminal width\n\n### MCP server (7 tools)\n\nSystem:\n- `system_current_metrics` — snapshot\n- `system_metrics_history` — samples over a time range\n- `system_top_processes` — top-N by CPU or memory\n\nEvents (systemd journal):\n- `events_latest` — tail\n- `events_search` — case-insensitive substring over message + unit\n- `events_near_time` — events in a window around a past moment\n- `events_semantic_search` — embedding-backed RAG over the journal (requires Ollama)\n\nAll tools advertise typed JSON schemas so even smaller local models (Llama 3B, Qwen 3B) can call them reliably.\n\n## Install\n\n### Prerequisites\n\n- Linux with systemd\n- Go 1.22+\n- *Optional*: [Ollama](https://ollama.com) with `nomic-embed-text` pulled, for semantic search\n\n### Build from source\n\n```bash\ngit clone https://github.com/rbryce90/linux-time-machine\ncd linux-time-machine\ngo build -o ~/.local/bin/linux-time-machine ./cmd/linux-time-machine\n```\n\n### Run the TUI\n\n```bash\n~/.local/bin/linux-time-machine\n```\n\nData collects into `./linux-time-machine.db`. Press `h` to scrub history, `q` to quit.\n\n### Wire into Claude Code\n\n```bash\nclaude mcp add linux-time-machine \\\n  --scope user \\\n  -- \\\n  ~/.local/bin/linux-time-machine \\\n  --mcp \\\n  --db ~/.local/share/linux-time-machine.db\n```\n\nThen in any Claude Code session:\n\n\u003e *What's eating my CPU right now?*\n\u003e\n\u003e *Any authentication issues in my journal today?*\n\u003e\n\u003e *Summarize CPU usage over the last 5 minutes — any spikes?*\n\n### Wire into Claude Desktop\n\nAdd to `~/.config/Claude/claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"linux-time-machine\": {\n      \"command\": \"/home/you/.local/bin/linux-time-machine\",\n      \"args\": [\"--mcp\", \"--db\", \"/home/you/.local/share/linux-time-machine.db\"]\n    }\n  }\n}\n```\n\n## Architecture\n\nDomain-driven Go with each subsystem self-contained under `internal/domains/*`:\n\n```\ninternal/\n├── app/          # config, registry, lifecycle\n├── storage/      # shared SQLite with WAL\n├── mcp/          # Tool interface + server on top of the official MCP SDK\n├── tui/          # bubbletea host + Tokyo Night theme\n├── accessor/\n│   └── ollama/   # embedding + chat client\n├── llm/          # provider-agnostic chat + tool types\n├── agent/        # tool-calling loop with parallel invocation\n├── types/        # shared primitives\n└── domains/\n    ├── system/   # gopsutil collector → SQLite, TUI panel, MCP tools\n    └── events/   # journalctl subprocess + background embedder,\n                  # SQLite with embedding BLOB, semantic search\n```\n\nAdding a new domain is one folder + one line in `cmd/linux-time-machine/main.go`.\n\n## Status\n\n**v0.1** — working, shippable for single-user use.\n\n### Working\n- TUI with live + historical modes\n- SQLite time-series with WAL concurrency\n- Semantic search over journald via Ollama embeddings\n- MCP stdio server with typed tool schemas\n- Parallel tool invocation in the agent layer\n\n### In-flight (next release)\n- In-app chat panel (talk to a local LLM inside the TUI)\n- `--http` transport so a persistent collector can serve multiple clients\n\n### Planned\n- Network flow tracking (`/proc/net` + GeoIP + threat intel)\n- Retention policies for time-series tables\n- Tests + CI\n- Precompiled release binaries\n\n## Known limitations\n\n- Linux-only (uses systemd's `journalctl`; `/proc` for per-process CPU). macOS + Windows would need different collectors.\n- Event semantic search requires Ollama running locally with an embedding model.\n- Single-writer SQLite; fine for one laptop.\n- MCP stdio-only today — the collector only runs while a client is connected. HTTP transport is the fix (planned).\n\n## License\n\nMIT — see [LICENSE](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbryce90%2Flinux-time-machine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frbryce90%2Flinux-time-machine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbryce90%2Flinux-time-machine/lists"}