Skip to main content

Read-only search for local AI agent prompts and history (Codex, Claude Code, Cursor, Gemini, Grok)

Project description

agentgrep

PyPI version Python versions License: MIT

Read-only search for local AI agent prompts and history across Codex, Claude Code, Cursor, Gemini, and Grok.

agentgrep provides a CLI and an MCP server over the same discovery + parsing layer:

  • A terminal CLI (agentgrep) with a Textual TUI for interactive browsing of normalized records.
  • An MCP server (agentgrep-mcp) that exposes search, discovery, catalog, and validation tools to any client that speaks Model Context Protocol.

Pre-alpha. APIs may change.

Install

$ uvx agentgrep --help

Other install methods (pipx, uv add, pip install) and full setup snippets live in the installer widget on agentgrep.org/cli/.

CLI quickstart

Search prompts and history across every configured agent:

$ agentgrep grep "deploy"

Stream JSON so a non-MCP agent or shell pipeline can consume the results:

$ agentgrep find --json

Open the read-only Textual TUI for interactive browsing:

$ agentgrep grep --ui

--json and --ndjson make every command pipe-friendly. Agents that don't speak MCP can drive the CLI directly; see https://agentgrep.org/cli/ for the per-subcommand reference.

MCP server: quickest setup

In Claude Code:

$ claude mcp add agentgrep -- uvx --from agentgrep agentgrep-mcp

For Claude Desktop / Codex / Cursor / Gemini snippets, see https://agentgrep.org/mcp/.

Library quickstart

from pathlib import Path

import agentgrep

backends = agentgrep.select_backends()
query = agentgrep.SearchQuery(
    terms=("hello",),
    search_type="all",
    any_term=False,
    regex=False,
    case_sensitive=False,
    agents=agentgrep.AGENT_CHOICES,
    limit=10,
)
for record in agentgrep.run_search_query(Path.home(), query, backends=backends):
    print(record.agent, record.title or record.path)

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentgrep-0.1.0a11.tar.gz (467.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentgrep-0.1.0a11-py3-none-any.whl (156.2 kB view details)

Uploaded Python 3

File details

Details for the file agentgrep-0.1.0a11.tar.gz.

File metadata

  • Download URL: agentgrep-0.1.0a11.tar.gz
  • Upload date:
  • Size: 467.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agentgrep-0.1.0a11.tar.gz
Algorithm Hash digest
SHA256 866296092a95d942c0e5b6328e82ea7386612accf837af1902d130c8d9b811b3
MD5 080021403a6f743780a93b9e7ae52521
BLAKE2b-256 a0de3ced5d4a9a22fe895139f42110f5cd04e40aaa6985325752dd826051dc8d

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentgrep-0.1.0a11.tar.gz:

Publisher: tests.yml on tony/agentgrep

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agentgrep-0.1.0a11-py3-none-any.whl.

File metadata

  • Download URL: agentgrep-0.1.0a11-py3-none-any.whl
  • Upload date:
  • Size: 156.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agentgrep-0.1.0a11-py3-none-any.whl
Algorithm Hash digest
SHA256 dbb0a46674b6c1c6bd949134b909c9215fbbc38847dd218521ba03142d49d0b5
MD5 6b9b740da6f3d5830f25444eb9480b83
BLAKE2b-256 b714c552dcce950452a9bd6c0f28ccebbbd69d1002f60a246476310e967638e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentgrep-0.1.0a11-py3-none-any.whl:

Publisher: tests.yml on tony/agentgrep

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page