Erasmus is an advanced context management library for software development. It provides intelligent context tracking, protocol-driven workflows, multi-IDE support, and automated documentation. It is designed to power AI coding assistants and streamline project management.
- Path Management: Centralized, cross-platform path handling for Windsurf, Cursor, Codex, Claude, and Warp
- Environment Configuration: Type-safe, dynamic environment variable management
- Context Management: Save/load
.ctx.architecture.md,.ctx.progress.md,.ctx.tasks.md - Protocol Handling: Define, store, and execute development protocols (developer, documentation, dependency, etc.)
- File Monitoring: Real-time tracking of context files and automatic rules file updates
- MCP Integration: CLI and protocol support for GitHub/MCP workflows
- Path Management (
erasmus/utils/paths.py) - Environment Management (
erasmus/environment.py) - Context Management (
erasmus/context.py) - Protocol Handler (
erasmus/protocol.py) - File Monitor Service (
erasmus/file_monitor.py) - CLI (
erasmus/cli/main.pyand subcommands) - MCP Integration (CLI and protocol support)
- Templates and Protocols (
.erasmus/templates/)
erasmus/
├── erasmus/
│ ├── cli/
│ ├── context.py
│ ├── environment.py
│ ├── file_monitor.py
│ ├── protocol.py
│ ├── utils/
│ └── ...
├── .erasmus/
│ ├── templates/
│ ├── protocols/
│ └── ...
├── .ctx.architecture.md
├── .ctx.progress.md
├── .ctx.tasks.md
├── README.md
└── ...
- Define project architecture in
.ctx.architecture.md - Track progress in
.ctx.progress.md - Break down tasks in
.ctx.tasks.md - Use
erasmus watchto monitor and sync context - Use protocols to drive development, documentation, and releases
.ctx.architecture.md: Project blueprint (high-level design, stack, user stories, criteria).ctx.progress.md: Development tracking (component progress, blockers, dependencies).ctx.tasks.md: Granular task management (detailed breakdown, status, assignment)
curl -sSL https://raw.githubusercontent.com/bakobiibizo/erasmus/refs/heads/main/releases/erasmus/0.4.0/erasmus_v0.4.0.sh -o erasmus.sh && bash erasmus.shErasmus provides a powerful CLI for managing development contexts, protocols, and project setup. Here are a few key examples:
# List all contexts
erasmus context list
# Create a new protocol
erasmus protocol create my-protocol
# Setup a new project interactively
erasmus setup
# Watch for .ctx file changes
erasmus watch
# Show current status
erasmus statusFor a full list of commands and detailed usage, see docs/CLI_COMMANDS.md.
Erasmus sits in the background of your development environment and:
- Tracks Project Context - Maintains a complete view of your codebase structure, decisions, and progress
- Powers IDE Context Injection - Feeds rich context to AI code assistants in compatible IDEs
- Monitors Development Files - Watches for changes in key files like architecture docs and progress tracking
- Creates Essential Documentation - Automatically generates and updates project documentation
- Developer: Implements code, tracks tasks, ensures code quality
- Documentation: Maintains docs, tracks doc tasks
- Dependency: Manages dependencies, tracks updates
- Testing, CI/CD, Security, Style, Product Owner, etc.
- All core components implemented and tested
- Protocols in use for all major workflows
- Documentation and context files up-to-date
- Automated rules file updates working in all supported IDEs
See CONTRIBUTING.md for guidelines.
MIT
Erasmus supports making JSON-RPC calls to MCP servers (such as the GitHub MCP server) via both the CLI and programmatically. Below are the key details and sharp edges to be aware of when constructing these calls:
- Every session must begin with an
initializerequest. - Tool calls use the
tools/callmethod. - The
paramsobject fortools/callmust include:name: The tool's name (e.g.,list_branches,get_user). This is NOT the JSON-RPC method name, but the tool identifier.arguments: A dictionary of arguments required by the tool. All tool-specific parameters must be nested inside thisargumentsobject.
Example JSON-RPC tool call:
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "list_branches",
"arguments": {
"owner": "bakobi",
"repo": "hexamerous"
}
},
"id": 2
}Sharp Edges:
- The
namefield is required and must match the tool's identifier exactly. - All tool arguments must be inside the
argumentsdictionary. Passing them at the top level will result in errors. - The
methodis alwaystools/callfor tool invocations, not the tool name itself. - You must send an
initializerequest first in the same session. - The server will respond with one JSON object per line for each request (e.g., one for
initialize, one for the tool call).
You can invoke MCP tools via the Erasmus CLI:
erasmus mcp servers github list_branches --owner bakobi --repo hexamerous
The CLI handles the JSON-RPC structure for you, but you must provide all required arguments as CLI options. The CLI will pretty-print the server's response, including any nested JSON content.
To make calls programmatically, use the StdioClient class:
from erasmus.mcp.client import StdioClient
client = StdioClient()
stdout, stderr = client.communicate(
server_name="github",
method="tools/call",
params={
"name": "list_branches",
"arguments": {
"owner": "bakobi",
"repo": "hexamerous"
}
}
)
print(stdout)Note:
- Always send both
initializeandtools/callrequests in the same session (the client does this for you). - Parse each line of the response as a separate JSON object.
- The tool response is usually the last JSON object returned.
- Missing
argumentsnesting: All tool parameters must be inside theargumentsdict. - Incorrect
name: Thenamemust match the tool's identifier, not the method. - Forgetting
initialize: The server expects aninitializerequest before any tool calls. - Parsing responses: The server returns one JSON object per line; parse each line separately.
Refer to the CLI help (erasmus mcp servers github --help) for available tools and their required arguments.