Skip to main content

Local-first memory and RAG system for Claude Code - semantic search over code, docs, and team knowledge

Project description

ragtime-cli

Local-first memory and RAG system for Claude Code. Semantic search over code, docs, and team knowledge.

Features

  • Memory Storage: Store structured knowledge with namespaces, types, and metadata
  • Semantic Search: Query memories and docs with natural language
  • Cross-Branch Sync: Share context with teammates before PRs merge
  • MCP Server: Native Claude Code integration
  • Claude Commands: Pre-built /remember, /recall, /handoff, /start commands

Installation

pip install ragtime-cli

Quick Start

# Initialize in your project
ragtime init

# Store a memory
ragtime remember "Auth uses JWT with 15-min expiry" \
  --namespace app \
  --type architecture \
  --component auth

# Search memories
ragtime search "authentication" --namespace app

# Install Claude commands
ragtime install --workspace

CLI Commands

Memory Storage

# Store a memory
ragtime remember "content" --namespace app --type architecture --component auth

# List memories
ragtime memories --namespace app --type decision

# Graduate branch memory to app
ragtime graduate <memory-id>

# Delete a memory
ragtime forget <memory-id>

Search & Indexing

# Index docs
ragtime index --type docs

# Semantic search
ragtime search "how does auth work" --namespace app --limit 10

# Reindex memory files
ragtime reindex

Cross-Branch Sync

# Sync teammate's branch memories
ragtime sync origin/jm/feature-auth

# Clean up stale synced folders
ragtime prune --dry-run
ragtime prune

Claude Integration

# Install Claude commands to workspace
ragtime install --workspace

# Install globally
ragtime install --global

# List available commands
ragtime install --list

MCP Server

Add to your Claude config (.mcp.json):

{
  "mcpServers": {
    "ragtime": {
      "command": "ragtime-mcp",
      "args": ["--path", "."]
    }
  }
}

Available tools:

  • remember - Store a memory
  • search - Semantic search
  • list_memories - List with filters
  • get_memory - Get by ID
  • store_doc - Store document verbatim
  • forget - Delete memory
  • graduate - Promote branch → app
  • update_status - Change memory status

Storage Structure

.claude/memory/
├── app/{component}/            # Graduated app knowledge
│   └── {id}-{slug}.md
├── team/                       # Team conventions
│   └── {id}-{slug}.md
├── users/{username}/           # User preferences
│   └── {id}-{slug}.md
└── branches/
    ├── {branch-slug}/          # Your branch (tracked in git)
    │   ├── context.md          # Session handoff
    │   └── {id}-{slug}.md
    └── {branch}(unmerged)/     # Synced from teammates (gitignored)

Memory Format

Memories are markdown files with YAML frontmatter:

---
id: abc123
namespace: app
type: architecture
component: auth
confidence: high
status: active
added: '2026-01-31'
author: bretwardjames
---

Auth uses JWT tokens with 15-minute expiry for security.
Sessions are stored in Redis, not cookies.

Namespaces

Namespace Purpose
app How the codebase works (architecture, decisions)
team Team conventions and standards
user-{name} Individual preferences
branch-{name} Work-in-progress context

Memory Types

Type Description
architecture System design, patterns
feature How features work
decision Why we chose X over Y
convention Team standards
pattern Reusable approaches
context Session handoff

Claude Commands

After ragtime install --workspace:

Command Purpose
/remember Capture knowledge mid-session
/recall Search memories
/handoff Save session context
/start Resume work on an issue
/pr-graduate Curate branch knowledge after merge
/audit Find duplicates/conflicts

License

MIT

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

ragtime_cli-0.1.0.tar.gz (28.8 kB view details)

Uploaded Source

Built Distribution

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

ragtime_cli-0.1.0-py3-none-any.whl (34.7 kB view details)

Uploaded Python 3

File details

Details for the file ragtime_cli-0.1.0.tar.gz.

File metadata

  • Download URL: ragtime_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 28.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for ragtime_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7de2228bcdeb337766d1fb71d2cc5588bb447a51a50283be20a8fe037cdd2a7e
MD5 b5110d2e9ae95a3b0e2dd7f017218312
BLAKE2b-256 58cc56d26d5b40736d73e485a2cbbfb62a1510e9d4af960e2da2c0446fe73035

See more details on using hashes here.

File details

Details for the file ragtime_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ragtime_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 34.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for ragtime_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 229240dc33de94e94ce22e642b40763dba6a50cf0df2380ca2ba42d0f974621c
MD5 5164f4c2b8eb62cfedb6dd8a24826e9f
BLAKE2b-256 2485779f6846b7e25de9de59277279e09be28b4677aa77b89f473d69a242675a

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