Metadata-Version: 2.4
Name: claudecode-memanto
Version: 0.1.0
Summary: Cross-session engineering memory for Claude Code + mattpocock/skills, powered by Memanto. Real lifecycle hooks + LLM distillation = zero repeated instructions.
Project-URL: Homepage, https://www.memanto.ai
Project-URL: Documentation, https://docs.memanto.ai
Project-URL: Repository, https://github.com/moorcheh-ai/memanto
Project-URL: Bug Tracker, https://github.com/moorcheh-ai/memanto/issues
Author-email: Memanto <info@memanto.ai>
License: MIT
Keywords: agent memory,anthropic,claude,claude-code,hooks,mattpocock,memanto,moorcheh,semantic memory,skills
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: <4,>=3.10
Requires-Dist: memanto>=0.1.0
Requires-Dist: python-dotenv>=1.0.0
Provides-Extra: dev
Requires-Dist: mypy<2,>=1.10.0; extra == 'dev'
Requires-Dist: pytest-mock<4,>=3.12.0; extra == 'dev'
Requires-Dist: pytest<9,>=8.2.0; extra == 'dev'
Requires-Dist: ruff<0.15,>=0.14.6; extra == 'dev'
Description-Content-Type: text/markdown

# Claude Code + Memanto Integration

This package provides native integration of [Memanto's](https://memanto.ai) persistent, cross-session memory capabilities into [Claude Code](https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview) and the [`mattpocock/skills`](https://github.com/mattpocock/skills) ecosystem.

## Installation

```bash
pip install claudecode-memanto
```

![How it works](./assets/how-it-works-three-real-lifecycle-hooks.png)

### Component architecture

![Component architecture](./assets/component-architecture.png)

## Features

- **Global Lifecycle Hooks**: Automatically inject memory context and distill sessions into persistent storage without modifying any skills.
- **Prompt Injection**: Use the CLI inside `CLAUDE.md` to instruct the agent to retrieve and store memories itself.
- **Zero Repeated Instructions**: Your architectural choices, codebase quirks, and coding preferences persist across terminal sessions.

## Usage

### Method 1: Lifecycle Hooks (Recommended)

Install the global lifecycle hooks into your Claude Code settings. This automatically injects context (`UserPromptExpansion`) and extracts durable decisions after execution (`Stop`) without requiring the agent to run manual CLI commands.

```bash
# Register hooks locally (.claude/settings.json)
claudecode-memanto install

# Or globally (~/.claude/settings.json)
claudecode-memanto install --global
```

Ensure `MOORCHEH_API_KEY` is set in your environment. Run any skill (e.g., `/tdd`) and Claude Code will automatically recall relevant engineering memories.

### Method 2: Prompt Injection (Explicit)

If you prefer explicit control and want the agent to use tools rather than hidden hooks, you can use prompt injection via your `CLAUDE.md` file.

Install the prompt injection instructions into your global `~/.claude/CLAUDE.md` file (or your project-local `.claude/CLAUDE.md`). This provides Claude with the explicit instructions to run the CLI:

```bash
# Append instructions to your local .claude/CLAUDE.md
claudecode-memanto install --method prompt

# Or append globally to ~/.claude/CLAUDE.md
claudecode-memanto install --method prompt --global
```

## Configuration

You can configure the integration via environment variables:
- `MOORCHEH_API_KEY`: Required. Your API key.
- `MEMANTO_AGENT_ID`: Set a custom agent ID namespace.
- `MEMANTO_RECALL_LIMIT`: Max memories to inject (default: 15).
