Skip to content

code-assitant-manager allows you to manage the code assistants like claude code, codex, gemini on a single interface.

Notifications You must be signed in to change notification settings

Chat2AnyLLM/code-assistant-manager

Repository files navigation

Code Assistant Manager (CAM)

License Code Quality

One CLI to Rule Them All.
Tired of juggling multiple AI coding assistants? CAM is a unified Python CLI to manage configurations, prompts, skills, and plugins for 13 AI assistants including Claude, Codex, Gemini, Qwen, Copilot, and more from a single, polished terminal interface.


Why CAM?

In the era of AI-driven development, developers often use multiple powerful assistants like Claude, GitHub Copilot, and Gemini. However, this leads to a fragmented and inefficient workflow:

  • Scattered Configurations: Each tool has its own setup, API keys, and configuration files.
  • Inconsistent Behavior: System prompts and custom instructions diverge, leading to different AI behaviors across projects.
  • Wasted Time: Constantly switching between different CLIs and UIs is a drain on productivity.

CAM solves this by providing a single, consistent interface to manage everything, turning a chaotic toolkit into a cohesive and powerful development partner.

Key Features

  • Unified Management: One tool (cam) to install, configure, and run all your AI assistants.
  • Centralized Configuration: Manage all API keys and endpoint settings from a single providers.json file with environment variables in .env.
  • Interactive TUI: A polished, interactive menu (cam launch) for easy navigation and operation with arrow-key navigation.
  • MCP Registry: Built-in registry with 381 pre-configured MCP servers ready to install across all supported tools.
  • Extensible Framework: Standardized architecture for managing:
    • Agents: Standalone assistant configurations (markdown-based with YAML front matter).
    • Prompts: ✨ Reusable system prompts with fancy name generation synced across assistants at user or project scope.
    • Skills: Custom tools and functionalities for your agents (directory-based with SKILL.md).
    • Plugins: Marketplace extensions for supported assistants (GitHub repos or local paths).
  • MCP Support: First-class support for the Model Context Protocol (MCP), allowing assistants to connect to external data sources and tools.
  • Parallel Upgrades: Concurrent tool upgrades with npm version checking and progress visualization.
  • Diagnostics: A comprehensive doctor command to validate your environment, API keys, tool installations, and cache status.
  • Enterprise Security: Config-first approach eliminates shell injection vulnerabilities with secure MCP client implementations.
  • Automated Quality Assurance: Built-in complexity monitoring, file size limits, and comprehensive CI/CD quality gates.

Supported AI Assistants

CAM supports 13 AI coding assistants:

Assistant Command Description Install Method
Claude claude Anthropic Claude Code CLI Shell script
Codex codex OpenAI Codex CLI npm
Gemini gemini Google Gemini CLI npm
Qwen qwen Alibaba Qwen Code CLI npm
Copilot copilot GitHub Copilot CLI npm
CodeBuddy codebuddy Tencent CodeBuddy CLI npm
Droid droid Factory.ai Droid CLI Shell script
iFlow iflow iFlow AI CLI npm
Crush crush Charmland Crush CLI npm
Cursor cursor-agent Cursor Agent CLI Shell script
Neovate neovate Neovate Code CLI npm
Qoder qodercli Qoder CLI npm
Zed zed Zed Editor Shell script

Feature Support Matrix

Feature Claude Codex Gemini Qwen CodeBuddy Droid Copilot
Agent Management
Prompt Syncing
Skill Installation
Plugin Support
MCP Integration

MCP Integration is supported across all 13 assistants including: Claude, Codex, Gemini, Qwen, Copilot, CodeBuddy, Droid, iFlow, Zed, Qoder, Neovate, Crush, and Cursor.

Note: Some tools (Zed, Qoder, Neovate) are disabled by default in the menu as they are still under development. You can enable them in tools.yaml by setting enabled: true.

Installation

# Install via pip (Python 3.9+)
pip install code-assistant-manager

# Or install using the install script
./install.sh

# Or install directly from the web
curl -fsSL https://raw.githubusercontent.com/Chat2AnyLLM/code-assistant-manager/main/install.sh | bash

Quick Start

1. Set up Configuration

Create a providers.json file in ~/.config/code-assistant-manager/ or your project root:

{
  "common": {
    "http_proxy": "http://proxy.example.com:8080/",
    "https_proxy": "http://proxy.example.com:8080/",
    "cache_ttl_seconds": 86400
  },
  "endpoints": {
    "my-litellm": {
      "endpoint": "https://api.example.com:4142",
      "api_key_env": "API_KEY_LITELLM",
      "list_models_cmd": "python -m code_assistant_manager.litellm_models",
      "supported_client": "claude,codex,qwen,copilot",
      "description": "My LiteLLM Proxy"
    }
  }
}

2. Set up API Keys

Create a .env file in your home directory or project root:

API_KEY_LITELLM="your-api-key-here"
GITHUB_TOKEN="your-github-token"
GEMINI_API_KEY="your-gemini-key"

3. Check Your Setup

cam doctor

This runs comprehensive diagnostics including:

  • Installation verification
  • Configuration file validation
  • Environment variable checks (Gemini/Vertex AI, GitHub Copilot)
  • Tool installation status
  • Endpoint connectivity
  • Cache status and security audit

4. Launch an Assistant

# Interactive menu to select assistant and model
cam launch

# Or launch a specific assistant directly
cam launch claude
cam launch codex
cam launch gemini

Command Reference

Command Alias Description
cam launch [TOOL] l Launch interactive TUI or a specific assistant
cam doctor d Run diagnostic checks on environment and API keys
cam agent ag Manage agent configurations (list, install, fetch from repos)
cam prompt p Manage and sync system prompts across assistants
cam skill s Install and manage skill collections
cam plugin pl Manage marketplace extensions (plugins)
cam mcp m Manage MCP servers (add, remove, list, install)
cam upgrade [TARGET] u Upgrade tools (default: all) with parallel execution
cam install [TARGET] i Alias for upgrade
cam uninstall [TARGET] un Uninstall tools and backup configurations
cam config cf Manage CAM's internal configuration files
cam completion c Generate shell completion scripts (bash, zsh, fish)
cam version v Display current version

MCP Subcommands

cam mcp add <tool> <server>      # Add an MCP server to a tool
cam mcp remove <tool> <server>   # Remove an MCP server
cam mcp list <tool>              # List configured MCP servers
cam mcp install --all            # Install MCP servers for all tools
cam mcp registry search <query>  # Search the MCP server registry

Agent Subcommands

cam agent list                   # List available agents
cam agent install <agent>        # Install an agent
cam agent fetch                  # Fetch agents from configured repos
cam agent repos                  # Manage agent repositories

Prompt Subcommands

cam prompt list                  # List all saved prompts
cam prompt add [NAME] -f FILE    # Add prompt (auto-generates fancy name ✨)
cam prompt update NAME -f FILE   # Update prompt content, name, or settings
cam prompt import --app claude   # Import from live app files (fancy names ✨)
cam prompt install NAME --app claude  # Install prompt to app files
cam prompt remove NAME           # Remove a prompt
cam prompt status                # Show where prompts are installed with file paths

Skill Subcommands

cam skill list                   # List available skills
cam skill install <skill>        # Install a skill
cam skill fetch                  # Fetch skills from configured repos

Plugin Subcommands

CAM supports plugin management for compatible assistants (currently Claude and CodeBuddy). Plugins are organized into marketplaces that can be browsed and installed.

Marketplace Management (Configuration)

cam plugin marketplace add <source>       # Add marketplace to CAM config
cam plugin marketplace list               # List configured marketplaces
cam plugin marketplace remove <name>      # Remove marketplace from CAM config

Marketplace Management (App Installation)

cam plugin marketplace install <name>     # Install marketplace to Claude/CodeBuddy
cam plugin marketplace update [name]      # Update installed marketplaces in apps

Plugin Management

cam plugin list                           # List installed/enabled plugins
cam plugin repos                          # List available plugin repositories
cam plugin add-repo <owner>/<repo>         # Add plugin repository to CAM config
cam plugin remove-repo <name>              # Remove plugin repository from CAM config
cam plugin install <plugin>[@marketplace]  # Install a plugin from marketplace
cam plugin uninstall <plugin>              # Uninstall a plugin
cam plugin enable <plugin>                 # Enable a disabled plugin
cam plugin disable <plugin>                # Disable an enabled plugin
cam plugin browse [marketplace]            # Browse plugins in marketplaces
cam plugin view <plugin>                   # View detailed plugin information
cam plugin status                          # Show plugin system status
cam plugin validate <path>                 # Validate plugin/marketplace manifest

Architecture Overview

CAM implements industry-standard design patterns for maintainability and extensibility:

Core Design Patterns

  • Value Objects: Immutable domain primitives with validation (APIKey, EndpointURL, ModelID)
  • Factory Pattern: Centralized tool creation via ToolFactory with registration decorators
  • Strategy Pattern: Pluggable installers for different package managers (npm, pip, shell)
  • Repository Pattern: Data access abstraction for configuration and caching
  • Service Layer: Business logic separation (ConfigurationService, ModelService)
  • Chain of Responsibility: Validation pipeline for configuration

Module Structure

code_assistant_manager/
├── cli/                    # Modern Typer-based CLI with standardized patterns
│   ├── app.py              # Main app entry point with sub-apps
│   ├── base_commands.py    # Standardized command base classes (NEW)
│   │   ├── BaseCommand     # Common functionality, error handling, logging
│   │   ├── AppAwareCommand # Commands that work with AI apps
│   │   ├── PluginCommand   # Plugin-specific operations
│   │   └── PromptCommand   # Prompt management operations
│   ├── commands.py         # Legacy command definitions
│   ├── option_utils.py     # Shared CLI utilities
│   ├── options.py          # Common CLI option definitions
│   ├── prompts_commands.py # Prompt management (refactored)
│   ├── plugin_commands.py  # Plugin orchestration
│   └── plugins/            # Plugin subcommand modules
│       ├── plugin_discovery_commands.py
│       ├── plugin_install_commands.py
│       └── plugin_marketplace_commands.py
├── mcp/                    # Enhanced Model Context Protocol
│   ├── base.py             # Secure MCP base classes
│   ├── base_client.py      # MCP client base class
│   ├── clients.py          # Tool-specific MCP clients
│   ├── [tool]_client.py    # Individual client implementations
│   └── registry/           # 381 pre-configured MCP servers
├── tools/                  # Tool implementations (13 assistants)
│   ├── base.py             # CLITool base class
│   ├── claude.py, codex.py, gemini.py, ...
│   └── registry.py         # Tool registry from tools.yaml
├── prompts/                # Centralized prompt management
│   ├── manager.py          # PromptManager with sync capabilities
│   └── claude.py, codex.py, copilot.py, ...
├── plugins/                # Marketplace plugin system
│   ├── manager.py          # PluginManager with marketplace support
│   └── claude.py, codebuddy.py
├── menu/                   # Interactive TUI components
│   ├── base.py             # Menu base classes with arrow navigation
│   └── menus.py            # Centered menus, model selectors
├── upgrades/               # Tool installation/upgrade system
│   ├── installer_factory.py # Strategy selection
│   └── npm_upgrade.py, pip_upgrade.py, shell_upgrade.py
├── config.py               # ConfigManager with validation
├── domain_models.py        # Rich domain objects
├── value_objects.py        # Validated primitives
├── factory.py              # ToolFactory and ServiceContainer
├── services.py             # Business logic services
└── tools.yaml              # Tool definitions and install commands

Configuration Files

CAM stores data in ~/.config/code-assistant-manager/:

  • providers.json - Endpoint configurations
  • agents.json - Agent metadata cache
  • skills.json - Skill metadata cache
  • prompts.json - Saved prompts with active mappings
  • plugins.json - Plugin registry
  • agent_repos.json, skill_repos.json, plugin_repos.json - Repository sources

Adding a New Assistant

  1. Create a tool class in code_assistant_manager/tools/ extending CLITool
  2. Define command_name, tool_key, and install_description
  3. Add entry to tools.yaml with install_cmd and environment configuration
  4. Create handlers in agents/, skills/, prompts/, mcp/ as needed
  5. The tool is auto-discovered via CLITool.__subclasses__()

Contributing

Contributions are welcome! Please see our Developer Guide and Contributing Guidelines to get started.

Development Setup

# Clone and install
git clone https://github.com/Chat2AnyLLM/code-assistant-manager.git
cd code-assistant-manager
pip install -e ".[dev]"

# Run tests
pytest

# Run with coverage
pytest --cov=code_assistant_manager

# Code formatting (auto-formatted via pre-commit)
black code_assistant_manager tests
isort code_assistant_manager tests

# Code quality checks
radon cc --min C code_assistant_manager  # Complexity analysis
radon mi --min C code_assistant_manager  # Maintainability index
python scripts/check_file_sizes.py       # File size limits

# Linting
flake8 code_assistant_manager
mypy code_assistant_manager

Code Quality Standards

CAM maintains enterprise-grade code quality through automated monitoring:

  • Complexity Limits: Functions limited to B-C complexity levels (<18 branches)
  • File Size Limits: No file exceeds 500 lines
  • Security: Config-first approach eliminates shell injection vulnerabilities
  • Testing: 95%+ test coverage with comprehensive edge case handling
  • CI/CD: Automated quality gates prevent code quality regression

Running Specific Tests

pytest tests/test_cli.py           # CLI tests
pytest tests/test_config.py        # Configuration tests
pytest tests/unit/                 # Unit tests
pytest tests/integration/          # Integration tests
pytest tests/unit/test_prompts_cli.py::test_show_copilot_live_prompt  # Specific test

License

This project is licensed under the MIT License.


🏆 Recent Improvements

Version 1.x.x introduces significant enhancements to code quality, security, and maintainability:

🔧 Technical Debt Resolution

  • Function Complexity: Reduced from D-level (21-30 branches) to B-C level (<18 branches)
  • Code Architecture: Implemented standardized CLI command base classes
  • File Organization: Broke down monolithic functions into focused, testable units

🔒 Security Enhancements

  • MCP Client Security: Config-first approach eliminates shell injection vulnerabilities
  • Input Validation: Comprehensive validation with consistent error handling
  • Trusted Sources: Commands only executed from verified tool registries

⚡ Quality Assurance

  • Automated Complexity Monitoring: CI/CD checks using radon cc/mi analysis
  • File Size Limits: Enforced 500-line maximum per file
  • Comprehensive Testing: 46 new unit tests covering all refactored functionality
  • Quality Gates: Automated checks prevent code quality regression

📊 Current Health Metrics

  • Code Quality: A+ grade with enterprise-grade standards
  • Security: Zero known vulnerabilities
  • Test Coverage: 95%+ with comprehensive edge case handling
  • Maintainability: Clean, modular architecture with clear separation of concerns

🎯 Development Standards

  • CLI Patterns: Standardized command classes with consistent error handling
  • Documentation: Comprehensive developer guide with usage examples
  • Pre-commit Hooks: Automated formatting, linting, and quality checks
  • CI/CD Pipeline: Automated quality assurance with complexity monitoring

The codebase now provides a solid foundation for sustainable development with significantly enhanced security, maintainability, and developer experience.

About

code-assitant-manager allows you to manage the code assistants like claude code, codex, gemini on a single interface.

Topics

Resources

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •