Metadata-Version: 2.4
Name: agentgrep
Version: 0.1.0a10
Summary: Read-only search for local AI agent prompts and history (Codex, Claude Code, Cursor, Gemini, Grok)
Project-URL: Bug Tracker, https://github.com/tony/agentgrep/issues
Project-URL: Repository, https://github.com/tony/agentgrep
Author-email: Tony Narlock <tony@git-pull.com>
License: MIT
License-File: LICENSE
Keywords: agent-history,ai,claude,codex,cursor,gemini,grok,mcp,search
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Python: <4.0,>=3.14
Requires-Dist: fastmcp>=3.0.0
Requires-Dist: pydantic>=2.11.3
Requires-Dist: rapidfuzz>=3.10.0
Requires-Dist: textual>=3.2.0
Description-Content-Type: text/markdown

# agentgrep

[![PyPI version](https://img.shields.io/pypi/v/agentgrep.svg)](https://pypi.org/project/agentgrep/)
[![Python versions](https://img.shields.io/pypi/pyversions/agentgrep.svg)](https://pypi.org/project/agentgrep/)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

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

```console
$ uvx agentgrep --help
```

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

## CLI quickstart

Search prompts and history across every configured agent:

```console
$ agentgrep grep "deploy"
```

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

```console
$ agentgrep find --json
```

Open the read-only Textual TUI for interactive browsing:

```console
$ 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:

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

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

## Library quickstart

```python
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

- Documentation: <https://agentgrep.org/>
- Source: <https://github.com/tony/agentgrep>
- Issues: <https://github.com/tony/agentgrep/issues>
- Changelog: [CHANGES](CHANGES)
- License: [MIT](LICENSE)
