Skip to main content

context-llemur 🐒

Stop re-explaining your context to every LLM.

Every AI conversation starts from zero. Whether you're switching from Claude to Cursor, or from ChatGPT to a local LLM, you're constantly re-explaining your project context. ctx solves this by giving you portable, version-controlled context that travels between ALL your AI tools.

ctx Features

  • MCP Server Integration: Full Model Context Protocol support
  • Git-Based: It's just git under the hood
  • CLI for Humans: Take over whenever you feel like it
  • Portable: Use it with any LLM - no vendor lock-in, no assumptions

Quickstart

CLI

# Create a new context repository (defaults to ./context)
ctx new

# add/edit some files inside the `context/` directory
# or use your favourite LLM to edit for you (e.g. cursor, MCP)
echo "The next goal of this project is to..." >> context/goals.txt

# Save your context for versioning and tracking 
ctx save "Updated goals"  # equivalent to git add -A && git commit -m "..."

MCP

ctx includes a full MCP server with tools that give AI agents persistent, version-controlled memory.

Starting the MCP Server

ctx mcp

Claude Desktop Integration

Add this to your ~/Library/Application\ Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "context-llemur": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "/path/to/your/project/",
        "--with",
        "context-llemur",
        "ctx",
        "mcp"
      ]
    }
  }
}

Now start your conversation with ctx load and your LLM will have access to the entire context folder and all MCP-supported operations:

  • Repository Management: Create, switch, and manage contexts
  • Semantic Workflows: Explore topics, save insights, integrate knowledge
  • File Operations: Read, write, and organize context files
  • Navigation: Browse branches, history, and search content

Installation

Install with uv:

uv add context-llemur

After installation, activate your environment to use the ctx command directly:

source .venv/bin/activate
ctx --help

Alternatively, you can use uv run ctx ...

To install with pip:

pip install context-llemur

Core Commands

ctx Management

  • ctx new [name] - Create new context repository (default: ./context/)
  • ctx status - Show current repository status
  • ctx list - List all discovered context repositories
  • ctx switch <name> - Switch to a different context repository

ctx Workflows

  • ctx explore <topic> - Start exploring a new topic (creates a new branch)
  • ctx save <message> - Save current insights, equivalent to git add -A && git commit -m
  • ctx integrate <exploration> - Merge insights back to main context
  • ctx diff - Show current changes
  • ctx discard [--force] - Reset to last commit, dropping all changes

File Operations

  • ctx mv <source> <destination> - Move or rename files (git mv equivalent)
  • ctx rm <filepath> [--force] - Remove files from repository (git rm equivalent)

Content Operations

  • ctx load [directory] - Display all file contents with clear delimiters
  • ctx recent - Show recent activity and modified files
  • ctx mcp - Start MCP server for AI agent integration

Core Philosophy

  • Context is not code The context of a project evolves naturally over time - goals, TODOs, rules, milestones, etc. These concepts are traditionally tracked outside of repos (think of PRs, Issues, etc.) - ctx tracks them as individual git repositories.
  • Context should be portable You should be able to provide the context easily to any LLM or human, without any friction. Context should be as platform agnostic as possible.
  • Context history matters - Just like code, it should be easy to track what changed in context, revert to previous states and freely explore without fear of losing context
  • Each context is different As little assumptions as possible should have to be made about the structure and contents of context

Design

An important design decision of ctx is to not use embeddings for retrieval. Instead, it relies on LLMs and humans to manage the context in a structured manner. The idea is that context windows are getting longer, and agents are getting more capable of finding information when properly structured.

At its core, a ctx folder is an independently tracked git repository. It can easily be loaded as an MCP server, and exposes all ctx primitives by default to any LLM with its own ctx.txt file.

Managing Contexts

ctx supports switching between multiple independent contexts.

Creating a new context will automatically switch to the new context. Switch back to the previous context using ctx switch.

Contexts are managed using the following two files:

  • .ctx.config: TOML file at the root of the project which tracks active and available repositories
  • .ctx marker: Empty file in each context repository for identification

Example .ctx.config:

active_ctx = "research"
discovered_ctx = ["context", "research", "experiments"]

This design allows you to:

  • Create multiple context repositories in the same workspace
  • Switch between them easily with ctx switch <name>
  • Work from your project root without changing directories
  • Keep repositories portable and git-friendly

Advanced Workflows

You can explore new ideas and integrate them back to the main context when ready:

ctx explore "new-feature"
echo "the first feature we will work on will be..." > TODOS.txt
ctx save "add new feature"
ctx integrate "new-feature"

ctx is mostly wrapper commands around a git repository, so if you navigate to your ctx repository, you can also just use whatever git commands you are used to.

Git Command Mapping

For users familiar with git, here's the direct mapping:

ctx Command Git Equivalent Purpose
ctx save "<message>" git add -A && git commit -m "<message>" Stage and commit changes
ctx status git status && git branch Show repo and branch status
ctx discard git reset --hard HEAD Reset to last commit
ctx mv <source> <destination> git mv <source> <destination> Move or rename files
ctx rm <filepath> git rm <filepath> Remove files from repository
ctx explore <topic> git checkout -b <topic> Create and switch to new branch
ctx integrate <branch> git merge <branch> Merge branch into current

Use Cases

Cursor/Agentic IDEs/CLI tools

The primary use-case for ctx is for it to be used with agentic LLMs. In fact, ctx was developed using ctx and cursor!

A suggested workflow is to include the entire context folder at the start of each conversation. This can be done by adding e.g. a .cursorrule to always include the context/ folder or by using the MCP server and the ctx load function.

By default, each new context folder includes the ctx.txt file, which explains to the LLM what context is, so it out-of-the-box will be aware that it is using ctx and know how to interact with it. MCP servers are also self-documenting so the LLM will immediately know what it can do with ctx.

Claude Desktop / Other LLMs

Keep track of topics you care about in an explicit way. One use-case I've been using this for is tracking workouts and having Claude generate new workouts for me based on my workout history and leveraging its artifcats.

I basically just run ctx load + propose me a new workout inside Claude Desktop and it immediately will know what to do. I can in the same conversation log what I did, and ask Claude to save it back to the context.


⚠️ ctx is in active development and things might change.

Metadata

Release files for context-llemur 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for context-llemur 0.2.2
File Size Uploaded Provenance
context_llemur-0.2.2.tar.gz 24.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for context-llemur 0.2.2
File Interpreter ABI Platform
context_llemur-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 51.8 kB

Release files / context_llemur-0.2.2.tar.gz

Download URL context_llemur-0.2.2.tar.gz
Size 24.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9cacd51524f529dcd4b3a8ee617f0bc88448be005f5ba7fda92fc3d24ee8f73c
BLAKE2b-256 checksum
How to use checksums
bd49881bf4ec51e4f9c9f9ccd2bd98d4485df093b0dbcdd0a20fbdba9effb072
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.16

Release files / context_llemur-0.2.2-py3-none-any.whl

Download URL context_llemur-0.2.2-py3-none-any.whl
Size 27.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5bb73ee3650899c49bc20bfbe541ad1d7f2cbc669184637f3a8e327cc49c8444
BLAKE2b-256 checksum
How to use checksums
e175a7cd3ca971c51f4b25ad217bdc010ea049f8f99665e32ee6d95aa58a7432
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.16

Security for context-llemur 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page