https://github.com/contextfs/contextfs
Universal AI Memory Layer - Cross-client, cross-repo context management with RAG. Works with Claude Code, Claude Desktop, Gemini CLI, and any MCP client.
https://github.com/contextfs/contextfs
ai chromadb claude claude-code context gemini gemini-cli llm mcp memory python rag semantic-search
Last synced: 18 days ago
JSON representation
Universal AI Memory Layer - Cross-client, cross-repo context management with RAG. Works with Claude Code, Claude Desktop, Gemini CLI, and any MCP client.
- Host: GitHub
- URL: https://github.com/contextfs/contextfs
- Owner: contextfs
- Created: 2025-12-15T23:57:14.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-01-19T20:03:13.000Z (28 days ago)
- Last Synced: 2026-01-19T22:05:32.315Z (28 days ago)
- Topics: ai, chromadb, claude, claude-code, context, gemini, gemini-cli, llm, mcp, memory, python, rag, semantic-search
- Language: Python
- Homepage: https://contextfs.ai
- Size: 5.74 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ContextFS
**Persistent Memory for AI Agents** - Give your AI tools memory that persists across sessions.
[](https://pypi.org/project/contextfs/)
[](https://github.com/contextfs/contextfs/actions/workflows/ci.yml)
[](https://codecov.io/gh/contextfs/contextfs)
[](https://opensource.org/licenses/MIT)
[](https://www.python.org/downloads/)
**[Full Documentation](https://contextfs.ai/docs)** | **[Get Started](https://contextfs.ai)**
## Install
```bash
# With pip
pip install contextfs
# With uv (recommended)
uv pip install contextfs
# Run directly without installing
uvx contextfs
```
## Quick Start
```bash
# Initialize your repo for indexing
contextfs index init
# Save a memory
contextfs memory save "Use PostgreSQL for database" --type decision
# Search memories
contextfs memory search "database"
# Index your codebase for semantic search
contextfs index index
```
## MCP Integration
Add to your AI tool's MCP config:
```json
{
"mcpServers": {
"contextfs": {
"command": "uvx",
"args": ["contextfs"]
}
}
}
```
**Works with:** Claude Code, Claude Desktop, Cursor, VS Code, and any MCP-compatible client.
See [tool-specific setup guides](https://contextfs.ai/docs) for detailed instructions.
## Key Features
- **Semantic Search** - Find relevant memories using natural language
- **Auto Code Indexing** - Index your entire codebase for context-aware AI
- **Cross-Session Memory** - Decisions, facts, and patterns persist across conversations
- **Multi-Tool Sync** - Share memory between Claude, Cursor, VS Code, and more
## Python SDK
```python
from contextfs import ContextFS
ctx = ContextFS()
# Save
ctx.save("Use JWT for auth", type="decision", tags=["auth"])
# Search
results = ctx.search("authentication")
```
## Cloud Sync
Enable cross-device memory sync:
```bash
contextfs cloud login
contextfs cloud sync
```
Sign up at [contextfs.ai](https://contextfs.ai) for cloud features.
## Documentation
Visit **[contextfs.ai/docs](https://contextfs.ai/docs)** for:
- Installation guides for each AI tool
- API reference
- Memory types and best practices
- Cloud sync setup
## License
MIT - Matthew Long and The YonedaAI Collaboration