AI-powered state machine for Zed Editor with native Claude 3.5 Sonnet support, autonomous agent coordination, and MCP integration.
- Rust 1.70+ (install from https://rustup.rs/)
- Cargo (included with Rust)
- Zed development environment
cargo build --releaseThe compiled extension will be in target/release/gm.so (Linux/Mac) or gm.dll (Windows).
- Compile with
cargo build --release - Copy compiled library to Zed extensions directory:
- macOS/Linux:
~/.config/zed/extensions/gm - Windows:
%APPDATA%\\Zed\\extensions\\gm
- macOS/Linux:
- Restart Zed
Once published to Zed registry, install directly from Zed settings.
- Native Claude 3.5 Sonnet integration
- Async state machine with checkpointing
- Autonomous agent coordination
- MCP server support
- Real-time state inspection
- Multi-language support: Rust, JavaScript, TypeScript, Python, Go, Java, Kotlin, Swift, C#
- Hot reload support (with care)
After installation:
- Open Zed
- Press
Cmd+Shift+P(macOS) orCtrl+Shift+P(Linux/Windows) - Type "Activate State Machine" to enable GM
- Use "Toggle AI Assistant" to enable/disable AI features
- Type "Show State" to view current machine status
Edit ~/.config/zed/settings.json:
{
"gm": {
"enabled": true,
"autoActivate": true,
"logLevel": "info",
"llm": "claude-3-5-sonnet",
"temperature": 0.7,
"contextWindow": 200000
}
}- Activation: Zed loads WASM module via FFI
- Initialization: Register commands and language support
- Runtime: Process commands, maintain state, coordinate agents
- Deactivation: Clean up resources and state
GM integrates with Zed's language server protocol for:
- Code completion
- Diagnostics
- Code formatting
- Hover information
- Navigation
Model Context Protocol servers can be registered in extension.toml for:
- Tool execution
- Resource access
- Prompts and context
gm-zed/
├── Cargo.toml # Rust dependencies and metadata
├── extension.toml # Zed extension manifest
├── src/
│ └── lib.rs # Main extension code
├── agents/ # AI agent definitions
│ ├── gm.md
│ ├── codesearch.md
│ └── websearch.md
└── skills/ # Specialized skills
├── code-search/
├── web-search/
└── ...
Generate docs with:
cargo doc --opencargo testCheck ~/.config/zed/extensions/gm exists with compiled binary.
Restart Zed after installation. Run cargo build --release if binary is missing.
Disable gm.autoActivate in settings and manually activate when needed.
- Compiled WASM module is optimized with LTO and minimal size
- Async runtime via Tokio for non-blocking operations
- State machine uses minimal memory footprint
MIT
Report issues: https://github.com/AnEntrypoint/gm-zed/issues