Grepple is a local session-centric terminal log observer for AI agents. It is designed to feel like the default tool for live local logs/processes: dev servers, backend/frontend runtimes, startup failures, and stack traces.
It provides:
- a CLI (
grepple) for starting/attaching sessions and reading logs - a skill file (
SKILL.md) for Claude Code — CLI-only, no MCP server needed - an MCP stdio server (
grepple mcporgrepple-mcp) exposing structured tools - first-party installer helpers for
codex,claude, andopencode
cargo buildDefault install (recommended):
cargo install --path .This installs grepple, which already includes MCP mode via:
grepple mcpOptional: also install dedicated grepple-mcp binary:
cargo install --path . --features with-mcp-binStart a live interactive shell session under Grepple:
greppleLeave that shell the normal way with exit or Ctrl-D. If you have the shell helpers installed,
grepple exit and grepple quit also tear down shell jobs before exiting while you are inside a
Grepple shell.
Run an explicit command under Grepple:
grepple run --name api -- pnpm devBy default, grepple run mirrors stdout/stderr to your terminal (like running the command directly)
while still capturing logs for Grepple tools. To start in background mode instead:
grepple run --detached --name api -- pnpm devList sessions:
grepple sessionsRead logs incrementally:
grepple logs <session_id> --stream combined --offset 0 --max-bytes 32768Search logs:
grepple logs <session_id> --search "error|panic" --regexStop a managed session:
grepple stop <session_id>Clear all locally stored session snapshots/logs:
grepple sessions clear --yesGrepple is built around sessions. A session is a local record of a shell, command, or attached runtime, with metadata plus log files that Grepple and MCP tools can inspect later.
grepplestarts a new interactive shell session on a PTY. Grepple sits between your terminal and the child shell, forwards keyboard input to it, mirrors the rendered output back to your screen, and writes that transcript to the session logs.grepple run -- <command>starts a managed non-interactive process. Grepple capturesstdout/stderr, mirrors them in the foreground by default, and can also keep the process in the background with--detached.grepple attachis the attach/import path for tmux panes. It captures pane output into a Grepple session so the same log-reading tools can inspect it.- Each session is stored on disk under Grepple's state directory with
meta.json,stdout.log,stderr.log,combined.log, and an event history. This gives MCP tools a stable local source of truth instead of depending on a still-open terminal window. - Session ranking uses local context like cwd, git worktree, branch, running status, and command labels so agents can usually find the most relevant runtime for the repo they are working in.
In short: Grepple does not just tail random files. It creates or attaches to session sources, stores structured local session state, and then lets the CLI and MCP layer read, rank, search, and summarize those sessions.
Generate shell helpers for a short alias (g) and run wrapper (gr):
grepple shell init zsh
grepple shell init fishg maps to bare grepple, so it starts a live shell session. gr remains the explicit
grepple run -- ... wrapper for one-off commands. Inside a Grepple shell, the helper also makes
grepple exit, grepple quit, g exit, and g quit tear down shell jobs and resolve to exit.
Install for current shell session:
eval "$(grepple shell init zsh)"Fish:
grepple shell init fish | sourcePersist in shell config:
grepple shell init zsh >> ~/.zshrc
grepple shell init fish >> ~/.config/fish/config.fishInstead of running grepple as an MCP server, you can use the CLI directly through a
Claude Code skill file. Claude runs grepple commands via Bash, guided by the skill
instructions. This is simpler to set up — no MCP server process, no stdio protocol.
Install the skill:
grepple install claude-skill --scope userThis writes the skill file to ~/.claude/commands/grepple.md. Use --scope project to
install into the current project's .claude/commands/ instead.
Use it in Claude Code:
/grepple check for errors on the dev server
/grepple show me the last 50 lines of the api logs
/grepple what's running in this repo
The skill teaches Claude how to discover sessions, read/search logs, and manage
processes using the same grepple CLI commands documented above.
Codex:
grepple install codex
# equivalent dry-run
# grepple install codex --dry-rungrepple install codex also sets startup_timeout_sec = 30 for the installed MCP entry in ~/.codex/config.toml.
By default, install/add uses a terminal UI with progress and success/failure state.
For machine-readable output, pass --json.
Claude Code:
grepple install claude --scope userOpenCode:
grepple install opencode --scope usergrepple install opencode now also adds a small instruction file so OpenCode prefers
Grepple first for logs/errors/server/dev-server questions before broad code search.
Remove grepple from any client:
grepple uninstall codex
grepple uninstall claude --scope user
grepple uninstall claude-skill --scope user
grepple uninstall opencode --scope userEach uninstall reverses what its corresponding install did — removes the MCP entry,
config keys, skill files, and instruction files. Use --dry-run to preview.
Run the server over stdio (default):
grepple mcpOr, if installed with with-mcp-bin:
grepple-mcpIf Codex reports:
MCP client for `grepple` timed out after 10 seconds
use a prebuilt binary command in your MCP config (grepple mcp or grepple-mcp), not cargo run ..., and ensure timeout is set (the installer now sets this automatically for Codex):
[mcp_servers.grepple]
startup_timeout_sec = 30Grepple MCP exposes these core tools:
session_listsession_statuscurrent_repo_sessionspick_best_sessionsession_start_commandsession_attachsession_stoplog_readlog_searchlog_taillog_statslog_error_countssession_presetinstall_client
The high-level debugging helpers are:
pick_best_session: resolve the most relevant running session for the current repo/worktreecurrent_repo_sessions: ranked current-repo candidates with match reasonslog_error_counts: first-class error counting with best-effort time-window supportsession_preset: one-shot presets forrecent_errors,startup_failures,watch_errors, andsession_summary
GREPPLE_STATE_DIR: override state directoryGREPPLE_MAX_STATE_BYTES: hard cap for total grepple state size in bytes (default2147483648; set0to disable cap)GREPPLE_REDACT=0: disable output redaction inlog_read/log_search/log_tail