|
1 | | -# code-assistant-manager |
| 1 | +# Code Assistant Manager (CAM) |
2 | 2 |
|
3 | 3 | <div align="center"> |
4 | 4 |
|
5 | 5 | [](https://pypi.org/project/code-assistant-manager/) |
6 | 6 | [](https://opensource.org/licenses/MIT) |
7 | 7 | [](https://pypi.org/project/code-assistant-manager/) |
8 | 8 |
|
9 | | -**Unified Python CLI for AI Coding Assistants** |
| 9 | +**One CLI to Rule Them All.** |
10 | 10 | <br> |
11 | | -Manage Claude, Codex, Gemini, Qwen, and more from a single, polished terminal interface. |
12 | | - |
13 | | -[Quick Start](#quick-start) • [Features](#core-features) • [Interactive Mode](#interactive-mode) • [Commands](#subcommands-reference) • [MCP Support](#model-context-protocol-mcp) • [Contributing](#contributing) |
| 11 | +Tired of juggling multiple AI coding assistants? **CAM** is a unified Python CLI to manage configurations, prompts, skills, and plugins for Claude, Codex, Gemini, Qwen, and more from a single, polished terminal interface. |
14 | 12 |
|
15 | 13 | </div> |
16 | 14 |
|
17 | 15 | --- |
18 | 16 |
|
19 | | -## Core Features |
20 | | - |
21 | | -* **Unified CLI:** One tool (`cam`) to manage multiple AI assistants. |
22 | | -* **Interactive Menus:** Polished TUI for model selection and tool launching. |
23 | | -* **Prompt Management:** Fetch, sync, and manage system prompts across different assistants. |
24 | | -* **Skill Management:** Install and manage "skills" (tool definitions) for your AI agents. |
25 | | -* **MCP Integration:** Full support for the Model Context Protocol (MCP) - manage servers and tools. |
26 | | -* **Diagnostics:** Built-in `doctor` command to check environment health. |
27 | | -* **Extensible:** Easy to add new models and providers via LiteLLM. |
28 | | - |
29 | | -## Quick Start |
30 | | - |
31 | | -### Installation |
32 | | - |
33 | | -```bash |
34 | | -pip install code-assistant-manager |
35 | | -``` |
36 | | - |
37 | | -### Basic Usage |
38 | | - |
39 | | -Launch the interactive menu: |
40 | | - |
41 | | -```bash |
42 | | -cam launch |
43 | | -``` |
44 | | - |
45 | | -## Interactive Mode |
46 | | - |
47 | | -The easiest way to use CAM is through the interactive launcher: |
48 | | - |
49 | | -```bash |
50 | | -cam launch |
51 | | -``` |
52 | | -This opens a centered menu where you can: |
53 | | -* **Select Model:** Choose the active LLM model for your sessions. |
54 | | -* **Launch Assistant:** Start specific assistants (Claude, Codex, etc.) with the selected configuration. |
55 | | -* **Manage Settings:** Configure API keys and other preferences. |
| 17 | +## Why CAM? |
56 | 18 |
|
57 | | -## Subcommands Reference |
| 19 | +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: |
| 20 | +- **Scattered Configurations:** Each tool has its own setup, API keys, and configuration files. |
| 21 | +- **Inconsistent Behavior:** System prompts and custom instructions diverge, leading to different AI behaviors across projects. |
| 22 | +- **Wasted Time:** Constantly switching between different CLIs and UIs is a drain on productivity. |
58 | 23 |
|
59 | | -CAM offers a rich set of subcommands for advanced management. |
| 24 | +CAM solves this by providing a single, consistent interface to manage everything, turning a chaotic toolkit into a cohesive and powerful development partner. |
60 | 25 |
|
61 | | -### Main Commands |
| 26 | +## Key Features |
62 | 27 |
|
63 | | -| Command | Alias | Description | |
64 | | -| :--- | :--- | :--- | |
65 | | -| `cam launch` | `l` | Open the interactive menu or launch specific tools directly (e.g., `cam l claude`). | |
66 | | -| `cam doctor` | `d` | Run diagnostic checks on your environment, API keys, and configuration. | |
67 | | -| `cam version` | `v` | Display the current version of CAM. | |
68 | | -| `cam upgrade` | `u` | Update underlying tools (like `claude-engineer`, `aider`, etc.) to their latest versions. | |
69 | | -| `cam install` | `i` | Alias for `upgrade`. Installs or updates tools. | |
70 | | -| `cam uninstall` | `un` | Uninstall CLI tools and optionally backup/remove their configuration files. | |
71 | | -| `cam config` | `cf` | Manage configuration files. Use `cam config list` to see all config paths. | |
72 | | -| `cam completion` | `c` | Generate shell completion scripts for Bash or Zsh. | |
| 28 | +- **Unified Management:** One tool (`cam`) to install, configure, and run all your AI assistants. |
| 29 | +- **Centralized Configuration:** Manage all API keys and settings from a single `.env` file. |
| 30 | +- **Interactive TUI:** A polished, interactive menu (`cam launch`) for easy navigation and operation. |
| 31 | +- **Extensible Framework:** Standardized architecture for managing: |
| 32 | + - **Agents:** Standalone assistant configurations. |
| 33 | + - **Prompts:** Reusable system prompts synced across assistants. |
| 34 | + - **Skills:** Custom tools and functionalities for your agents. |
| 35 | + - **Plugins:** Marketplace extensions for supported assistants. |
| 36 | +- **MCP Support:** First-class support for the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/), allowing assistants to connect to external data sources and tools. |
| 37 | +- **Diagnostics:** A built-in `doctor` command to validate your environment and connectivity. |
73 | 38 |
|
74 | | -### Shell Completion |
| 39 | +## Feature Support Matrix |
75 | 40 |
|
76 | | -Enable tab completion for `cam` commands in your shell. |
| 41 | +| Feature | Claude | Codex | Gemini | Qwen | LiteLLM | |
| 42 | +| :--- | :---: | :---: | :---: | :---: | :---: | |
| 43 | +| **Agent** Management | ✅ | ✅ | ✅ | ✅ | ✅ | |
| 44 | +| **Prompt** Syncing | ✅ | ✅ | ✅ | ✅ | ✅ | |
| 45 | +| **Skill** Installation | ✅ | ✅ | ✅ | ✅ | ✅ | |
| 46 | +| **Plugin** Support | ✅ | ❌ | ❌ | ❌ | ❌ | |
| 47 | +| **MCP** Integration | ✅ | ✅ | ✅ | ✅ | ✅ | |
77 | 48 |
|
78 | | -**Bash:** |
79 | | -```bash |
80 | | -# Add to ~/.bashrc |
81 | | -source <(cam completion bash) |
82 | | -``` |
83 | | - |
84 | | -**Zsh:** |
85 | | -```zsh |
86 | | -# Add to ~/.zshrc |
87 | | -source <(cam completion zsh) |
88 | | -``` |
89 | | - |
90 | | -### Prompt Management (`cam prompt`) |
91 | | - |
92 | | -Manage and sync system prompts across all your AI assistants. |
| 49 | +## Installation |
93 | 50 |
|
94 | 51 | ```bash |
95 | | -# List all available prompts |
96 | | -cam prompt list |
97 | | - |
98 | | -# Fetch latest prompts from remote repositories |
99 | | -cam prompt fetch |
100 | | - |
101 | | -# View details of a specific prompt |
102 | | -cam prompt view <prompt_id> |
103 | | - |
104 | | -# Set a specific prompt as the default active prompt |
105 | | -cam prompt set-default <prompt_id> |
106 | | - |
107 | | -# Sync the default prompt to all installed assistants |
108 | | -cam prompt sync |
109 | | - |
110 | | -# Sync a specific prompt to a specific assistant |
111 | | -cam prompt sync <prompt_id> --app gemini |
112 | | - |
113 | | -# Create a new prompt from a file |
114 | | -cam prompt create my-new-prompt --file ./my_prompt.md |
115 | | - |
116 | | -# Import the current live prompt from an assistant |
117 | | -cam prompt import-live --app claude --name "My Claude Prompt" |
118 | | -``` |
119 | | - |
120 | | -### Skill Management (`cam skill`) |
121 | | - |
122 | | -Equip your assistants with new capabilities (tools/skills). |
123 | | - |
124 | | -```bash |
125 | | -# Discover available skills from configured repositories |
126 | | -cam skill fetch |
127 | | - |
128 | | -# List all skills and their installation status |
129 | | -cam skill list |
130 | | - |
131 | | -# View details of a skill |
132 | | -cam skill view <skill_id> |
133 | | - |
134 | | -# Install a skill to a specific assistant (or 'all') |
135 | | -cam skill install <skill_id> --app all |
136 | | - |
137 | | -# Uninstall a skill |
138 | | -cam skill uninstall <skill_id> |
139 | | - |
140 | | -# Manage skill repositories |
141 | | -cam skill repos # List repositories |
142 | | -cam skill add-repo ... # Add a new GitHub repo |
| 52 | +pip install code-assistant-manager |
143 | 53 | ``` |
144 | 54 |
|
145 | | -### Model Context Protocol (`cam mcp`) |
146 | | - |
147 | | -Manage MCP servers to connect your AI assistants to external data and tools. |
| 55 | +## Quick Start |
148 | 56 |
|
149 | | -```bash |
150 | | -# List registered and installed MCP servers |
151 | | -cam mcp server list |
| 57 | +1. **Set up API Keys:** |
| 58 | + Create a `.env` file in your home directory (`~`) or your project's root directory. |
152 | 59 |
|
153 | | -# Search for available MCP servers |
154 | | -cam mcp server search "postgres" |
| 60 | + ```env |
| 61 | + # ~/.env or ./.env |
| 62 | + ANTHROPIC_API_KEY="sk-ant-..." |
| 63 | + OPENAI_API_KEY="sk-..." |
| 64 | + GEMINI_API_KEY="..." |
| 65 | + QWEN_API_KEY="..." |
| 66 | + ``` |
155 | 67 |
|
156 | | -# Show details for a server |
157 | | -cam mcp server show "postgres" |
| 68 | +2. **Check Your Setup:** |
| 69 | + Run the `doctor` command to verify that your API keys are correctly configured. |
158 | 70 |
|
159 | | -# Install an MCP server |
160 | | -cam mcp server add "postgres" --client all |
| 71 | + ```bash |
| 72 | + cam doctor |
| 73 | + ``` |
161 | 74 |
|
162 | | -# Remove an MCP server |
163 | | -cam mcp server remove "postgres" |
164 | | -``` |
| 75 | +3. **Launch the Interactive Menu:** |
| 76 | + The easiest way to get started is with the interactive TUI. |
165 | 77 |
|
166 | | -## Supported Assistants |
| 78 | + ```bash |
| 79 | + cam launch |
| 80 | + ``` |
| 81 | + This menu allows you to select models, launch assistants, and manage settings without memorizing commands. |
167 | 82 |
|
168 | | -CAM provides management and wrappers for: |
| 83 | +## Command Reference |
169 | 84 |
|
170 | | -* **Claude** (Anthropic) |
171 | | -* **Codex** (OpenAI / GitHub Copilot CLI) |
172 | | -* **Gemini** (Google) |
173 | | -* **Qwen** (Alibaba Cloud) |
174 | | -* **LiteLLM** (Access to 100+ models via proxy) |
| 85 | +CAM provides a rich set of subcommands for power users. |
175 | 86 |
|
176 | | -## Configuration |
| 87 | +| Command | Alias | Description | |
| 88 | +| :--- | :--- | :--- | |
| 89 | +| `cam launch` | `l` | Launch the interactive TUI or a specific assistant. | |
| 90 | +| `cam doctor` | `d` | Run diagnostic checks on your environment and API keys. | |
| 91 | +| `cam agent` | `a` | Manage and configure AI assistants (Agents). | |
| 92 | +| `cam prompt` | `p` | Manage and sync system prompts across all assistants. | |
| 93 | +| `cam skill` | `s` | Install and manage collections of tools (Skills). | |
| 94 | +| `cam plugin` | - | Manage marketplace extensions (Plugins). | |
| 95 | +| `cam mcp` | - | Manage Model Context Protocol (MCP) servers. | |
| 96 | +| `cam upgrade` | `u` | Upgrade CAM and all underlying assistant tools. | |
| 97 | +| `cam install` | `i` | Alias for `upgrade`. | |
| 98 | +| `cam uninstall` | `un` | Uninstall tools and manage their configuration files. | |
| 99 | +| `cam config` | `cf` | Manage CAM's internal configuration files. | |
| 100 | +| `cam completion`| `c` | Generate shell completion scripts. | |
| 101 | +| `cam version` | `v` | Display the current version of CAM. | |
177 | 102 |
|
178 | | -CAM uses a combination of configuration files and environment variables. |
| 103 | +For detailed usage of each command, run `cam [COMMAND] --help`. |
179 | 104 |
|
180 | | -* **Configuration Directory:** `~/.config/code-assistant-manager/` (Linux/Mac) |
181 | | -* **Environment Variables:** Create a `.env` file in your project root or home directory. |
| 105 | +## How It Works: Architecture Overview |
182 | 106 |
|
183 | | -Example `.env`: |
184 | | -```env |
185 | | -OPENAI_API_KEY=sk-... |
186 | | -ANTHROPIC_API_KEY=sk-ant-... |
187 | | -GEMINI_API_KEY=... |
188 | | -``` |
| 107 | +CAM is built on a modular and extensible architecture. |
| 108 | +- **Entry Point:** The CLI is powered by **Typer**, with the main app defined in `code_assistant_manager/cli/app.py`. |
| 109 | +- **Manager/Handler Pattern:** A key design pattern is the use of a `Manager` class for each core concept (e.g., `AgentManager`, `SkillManager`). These managers handle the generic logic of fetching, caching, and managing extensions. |
| 110 | +- **App-Specific Logic:** For each supported AI assistant (like Claude), there is a corresponding `Handler` class (e.g., `ClaudeAgentHandler`) that contains the specific logic for installing an agent or skill in the correct directory for that application. This decouples the core logic from the specifics of each tool. |
| 111 | +- **Extensible by Design:** This architecture makes it straightforward to add support for new assistants or new types of extensions in the future. |
189 | 112 |
|
190 | 113 | ## Contributing |
191 | 114 |
|
192 | | -### Development Setup |
| 115 | +Contributions are welcome! Please see our [Developer Guide](docs/DEVELOPER_GUIDE.md) and [Contributing Guidelines](docs/CONTRIBUTING.md) to get started. |
193 | 116 |
|
194 | | -1. Clone the repository: |
195 | | - ```bash |
196 | | - git clone https://github.com/Chat2AnyLLM/code-assistant-manager.git |
197 | | - cd code-assistant-manager |
198 | | - ``` |
| 117 | +### Development Setup |
199 | 118 |
|
200 | | -2. Install dependencies: |
| 119 | +1. Clone the repository. |
| 120 | +2. Install in editable mode with development dependencies: |
201 | 121 | ```bash |
202 | 122 | pip install -e ".[dev]" |
203 | 123 | ``` |
204 | | - |
205 | 124 | 3. Run tests: |
206 | 125 | ```bash |
207 | | - pytest tests/ |
| 126 | + pytest |
208 | 127 | ``` |
209 | 128 |
|
210 | | -### Repository Structure |
211 | | - |
212 | | -* `code_assistant_manager/`: Main package source. |
213 | | - * `cli.py`: Entry point. |
214 | | - * `mcp/`: MCP subsystem. |
215 | | - * `prompts.py`: Prompt logic. |
216 | | - * `skills.py`: Skill logic. |
217 | | -* `tests/`: Comprehensive test suite. |
218 | | - |
219 | | -See [docs/](docs/) for more detailed developer guides. |
220 | | - |
221 | 129 | ## License |
222 | 130 |
|
223 | 131 | This project is licensed under the MIT License. |
0 commit comments