kodegen_bundler_autoconfig

Crates.iokodegen_bundler_autoconfig
lib.rskodegen_bundler_autoconfig
version0.10.10
created_at2025-10-29 00:14:13.471012+00
updated_at2026-01-02 15:01:23.981506+00
descriptionKODEGEN.ᴀɪ: Memory-efficient, Blazing-Fast, MCP tools for code generation agents.
homepagehttps://kodegen.ai
repositoryhttps://github.com/cyrup-ai/kodegen-bundler-autoconfig
max_upload_size
id1905807
size107,957
David Maple (kloudsamurai)

documentation

README

Kodegen AI Banner

KODEGEN.ᴀɪ Client Auto-Configuration

Automatic configuration system for MCP clients (Claude Desktop, Windsurf, Cursor, etc.) to seamlessly integrate with KODEGEN.ᴀɪ.

Overview

This service automatically detects when MCP-compatible AI tools are installed on your system and configures them to use KODEGEN.ᴀɪ - no manual setup required.

Supported Clients

  • Claude Desktop - Windows, macOS
  • Windsurf - Windows, macOS, Linux
  • Cursor - Windows, macOS, Linux
  • Zed - macOS, Linux
  • Roo Code (VSCode extension) - Windows, macOS, Linux

How It Works

  1. Continuous Monitoring: Watches for MCP client installation directories
  2. Instant Detection: Detects when a new AI tool is installed
  3. Automatic Configuration: Injects KODEGEN.ᴀɪ server configuration
  4. Zero User Intervention: Everything happens transparently in the background

Configuration Formats

Each client uses a slightly different configuration format, but we handle all the complexity:

Standard Format (Claude, Windsurf, Cursor)

{
  "mcpServers": {
    "kodegen": {
      "command": "kodegen",
      "args": ["--stdio"],
      "env": {}
    }
  }
}

Zed Format

{
  "context_servers": {
    "kodegen": {
      "command": {
        "path": "kodegen",
        "args": ["--stdio"]
      },
      "settings": {}
    }
  }
}

HTTP Transport (Roo Code)

{
  "mcpServers": {
    "kodegen": {
      "type": "streamable-http",
      "url": "https://kodegen.kodegen.dev:8443"
    }
  }
}

Architecture

The auto-configuration system uses:

  • File System Watching: Efficient monitoring with notify and watchexec
  • Debouncing: Prevents duplicate processing of rapid file changes
  • Backup Creation: Always backs up existing configs before modification
  • Idempotency: Won't re-inject if KODEGEN.ᴀɪ is already configured

Development

Adding Support for New Clients

  1. Create a new file in src/clients/your_client.rs
  2. Implement the ClientConfigPlugin trait:
pub struct YourClientPlugin;

impl ClientConfigPlugin for YourClientPlugin {
    fn client_id(&self) -> &str { "your-client" }
    fn client_name(&self) -> &str { "Your Client" }
    fn watch_paths(&self) -> Vec<PathBuf> { /* ... */ }
    fn config_paths(&self) -> Vec<ConfigPath> { /* ... */ }
    fn is_installed(&self, path: &PathBuf) -> bool { /* ... */ }
    fn inject_kodegen(&self, config: &str, format: ConfigFormat) -> Result<String> { /* ... */ }
}
  1. Add to src/clients/mod.rs:
pub mod your_client;

pub fn all_clients() -> Vec<Arc<dyn ClientConfigPlugin>> {
    vec![
        // ... existing clients
        Arc::new(your_client::YourClientPlugin),
    ]
}

Testing

# Run tests
cargo test

# Run with debug logging
RUST_LOG=debug cargo run

# Test specific client
RUST_LOG=kodegen_client_autoconfig=trace cargo run

Security Considerations

  • Only modifies configuration files in user-accessible directories
  • Creates backups before any modifications
  • Never modifies system files or requires elevated privileges
  • All operations are idempotent and reversible

Performance

  • Written in Rust for minimal resource usage
  • Efficient file watching with debouncing
  • Typically uses < 10MB RAM while monitoring
  • Near-zero CPU usage when idle
Commit count: 0

cargo fmt