Skip to main content

Code Memory for AI Programming Tools - Persistent memory for Kimi CLI, Claude Code, and other AI coding assistants

Project description

MemNexus - Code Memory for AI Programming Tools

English | 简体中文

Code Memory Layer - Persistent memory for AI coding assistants

Python 3.12+ MIT License Release PyPI

Quick StartFeaturesKimi PluginDocumentation

🎯 Overview

MemNexus provides persistent memory for AI programming tools like Claude Code, Kimi CLI, and Codex.

When you switch between AI tools or start a new session, MemNexus remembers:

  • What you built and why
  • Code changes and their history
  • Project context and decisions

Problem it solves:

"Yesterday I used Claude to build a login feature. Today I'm using Kimi to optimize it. Do I have to explain the entire project structure again?"

With MemNexus: No. Your AI assistants remember.

🚀 Quick Start

Installation

# Install with pip
pip install memnexus

# Or with uv (recommended)
uv tool install memnexus

Initialize Project

# In your project directory
cd my-project
memnexus init

# Index your project
memnexus index --git --code

Use with Kimi CLI

MemNexus provides a Kimi CLI plugin for seamless integration:

# The plugin is automatically available after installation
# Use these commands in Kimi CLI:

/memory search "login implementation"     # Search project memory
/memory store "Use Redis for caching"     # Store important decisions
/memory status                            # Check indexing status
/memory find authenticate_user            # Find specific function

Use as Library

import asyncio
from memnexus import CodeMemory

async def main():
    # Initialize
    memory = await CodeMemory.init("./my-project")
    
    # Index project
    await memory.index_git_history()
    await memory.index_codebase()
    
    # Search
    results = await memory.search("authentication")
    for r in results:
        print(f"{r.source}: {r.content[:100]}")

asyncio.run(main())

Use the HTTP API

# Start server
memnexus server

# In another terminal
curl "http://localhost:8080/api/v1/search?query=login"

✨ Features

Core Features

  • 🧠 Vector Memory - Semantic search using LanceDB
  • 📜 Git Integration - Index and search commit history
  • 📁 Code-Aware RAG - Parse and understand code structure
  • 🔌 Kimi CLI Plugin - Native integration with Kimi CLI 1.25.0+
  • ⚡ Fast & Local - Runs locally, no cloud required
  • 🌐 HTTP API - RESTful API for custom integrations

Supported Languages

  • Python (fully supported)
  • JavaScript/TypeScript (coming soon)
  • Rust, Go (planned)

🔌 Kimi CLI Plugin

MemNexus provides first-class integration with Kimi CLI through its plugin system.

Available Commands

Command Description Example
/memory search <query> Search project memory /memory search "auth implementation"
/memory store <content> Store important info /memory store "Use JWT" --category decision
/memory status Check project status /memory status
/memory index Index project /memory index --git --code
/memory find <symbol> Find code symbol /memory find authenticate_user
/memory history <file> Get file history /memory history src/auth.py

Example Session

You: /memory search "how does authentication work?"

Kimi: Based on project memory, I found:

1. [Code] AuthController.authenticate_user (auth.py:24)
   def authenticate_user(self, username: str, password: str) -> Optional[dict]:
   """Authenticate user with credentials..."""

2. [Git] Commit a1b2c3d - "feat(auth): Add JWT authentication"
   Author: John Doe | Date: 2024-03-20
   
3. [Memory] Decision: "Use JWT instead of sessions for stateless auth"
   Category: architecture | Tags: auth, jwt

You: /memory store "Need to add rate limiting to auth endpoints" --category todo --tags auth security

Kimi: ✅ Stored in memory (ID: abc123)

📖 Documentation

🏗️ Architecture

┌─────────────────────────────────────────────────────────────┐
│                     AI Programming Tools                     │
│         (Claude Code, Kimi CLI, Codex, etc.)                 │
└───────────────────────────┬─────────────────────────────────┘
                            │
        ┌───────────────────┼───────────────────┐
        │                   │                   │
        ▼                   ▼                   ▼
┌──────────────┐   ┌──────────────┐   ┌─────────────────┐
│  Kimi Plugin │   │   HTTP API   │   │  Python Library │
└──────┬───────┘   └──────┬───────┘   └────────┬────────┘
       │                  │                    │
       └──────────────────┼────────────────────┘
                          │
                          ▼
┌─────────────────────────────────────────────────────────────┐
│                      MemNexus Core                           │
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────────────┐  │
│  │    Git      │  │    Code     │  │   Vector Memory     │  │
│  │  Extractor  │  │   Parser    │  │    (LanceDB)        │  │
│  └─────────────┘  └─────────────┘  └─────────────────────┘  │
└─────────────────────────────────────────────────────────────┘

🛣️ Roadmap

Phase 1: Core (Completed ✅)

  • ✅ Git history indexing
  • ✅ Code parsing and indexing
  • ✅ Vector search
  • ✅ Kimi CLI plugin

Phase 2: Integration (In Progress)

  • 🔄 VSCode extension
  • 🔄 Claude Code integration
  • 🔄 More language support

Phase 3: Ecosystem (Planned)

  • 📋 Team collaboration
  • 📋 Cloud sync (optional)
  • 📋 Advanced code intelligence

See ROADMAP.md for details.

🤝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

📝 License

MemNexus is licensed under the MIT License.


MemNexus - Let your AI assistants remember

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

memnexus-0.2.0.tar.gz (387.1 kB view details)

Uploaded Source

Built Distribution

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

memnexus-0.2.0-py3-none-any.whl (110.5 kB view details)

Uploaded Python 3

File details

Details for the file memnexus-0.2.0.tar.gz.

File metadata

  • Download URL: memnexus-0.2.0.tar.gz
  • Upload date:
  • Size: 387.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for memnexus-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ff0dcf387f0df825f319ebdea527791e52fb65bd80a8eef11b53bad8148fe2e2
MD5 dace322ece61306ec9ccbad60a50be2f
BLAKE2b-256 aba3ce692304efb7228c9f46925d5aaf96c9629a671efdea4d28c5f5f65847a8

See more details on using hashes here.

File details

Details for the file memnexus-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: memnexus-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 110.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for memnexus-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 024d74acbf233f345395cf72f073a8a2cd505da1d8990157a274612dd9f99240
MD5 703bf747d406340eb00a998b3c070152
BLAKE2b-256 53b46f08f977019cbcfeaf633f342a3248a6780ebf0c998c82f8f02205064f30

See more details on using hashes here.

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