@codemieai/code 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +130 -760
- package/README.md +283 -695
- package/bin/codemie-claude.js +122 -0
- package/bin/codemie-code.js +90 -15
- package/bin/codemie-codex.js +138 -0
- package/bin/codemie.js +1 -1
- package/config.example.json +10 -0
- package/dist/agents/adapters/claude-code.d.ts +2 -2
- package/dist/agents/adapters/claude-code.d.ts.map +1 -1
- package/dist/agents/adapters/claude-code.js +20 -42
- package/dist/agents/adapters/claude-code.js.map +1 -1
- package/dist/agents/adapters/codemie-code.d.ts +11 -2
- package/dist/agents/adapters/codemie-code.d.ts.map +1 -1
- package/dist/agents/adapters/codemie-code.js +93 -25
- package/dist/agents/adapters/codemie-code.js.map +1 -1
- package/dist/agents/adapters/codex.d.ts +2 -2
- package/dist/agents/adapters/codex.d.ts.map +1 -1
- package/dist/agents/adapters/codex.js +31 -24
- package/dist/agents/adapters/codex.js.map +1 -1
- package/dist/agents/codemie-code/agent.d.ts +89 -0
- package/dist/agents/codemie-code/agent.d.ts.map +1 -0
- package/dist/agents/codemie-code/agent.js +523 -0
- package/dist/agents/codemie-code/agent.js.map +1 -0
- package/dist/agents/codemie-code/config.d.ts +40 -0
- package/dist/agents/codemie-code/config.d.ts.map +1 -0
- package/dist/agents/codemie-code/config.js +276 -0
- package/dist/agents/codemie-code/config.js.map +1 -0
- package/dist/agents/codemie-code/filters.d.ts +91 -0
- package/dist/agents/codemie-code/filters.d.ts.map +1 -0
- package/dist/agents/codemie-code/filters.js +328 -0
- package/dist/agents/codemie-code/filters.js.map +1 -0
- package/dist/agents/codemie-code/index.d.ts +78 -0
- package/dist/agents/codemie-code/index.d.ts.map +1 -0
- package/dist/agents/codemie-code/index.js +259 -0
- package/dist/agents/codemie-code/index.js.map +1 -0
- package/dist/agents/codemie-code/prompts.d.ts +11 -0
- package/dist/agents/codemie-code/prompts.d.ts.map +1 -0
- package/dist/agents/codemie-code/prompts.js +31 -0
- package/dist/agents/codemie-code/prompts.js.map +1 -0
- package/dist/agents/codemie-code/streaming/events.d.ts +7 -0
- package/dist/agents/codemie-code/streaming/events.d.ts.map +1 -0
- package/dist/agents/codemie-code/streaming/events.js +7 -0
- package/dist/agents/codemie-code/streaming/events.js.map +1 -0
- package/dist/agents/codemie-code/streaming/formatter.d.ts +2 -0
- package/dist/agents/codemie-code/streaming/formatter.d.ts.map +1 -0
- package/dist/agents/codemie-code/streaming/formatter.js +2 -0
- package/dist/agents/codemie-code/streaming/formatter.js.map +1 -0
- package/dist/agents/codemie-code/streaming/ui.d.ts +2 -0
- package/dist/agents/codemie-code/streaming/ui.d.ts.map +1 -0
- package/dist/agents/codemie-code/streaming/ui.js +2 -0
- package/dist/agents/codemie-code/streaming/ui.js.map +1 -0
- package/dist/agents/codemie-code/tokenUtils.d.ts +108 -0
- package/dist/agents/codemie-code/tokenUtils.d.ts.map +1 -0
- package/dist/agents/codemie-code/tokenUtils.js +220 -0
- package/dist/agents/codemie-code/tokenUtils.js.map +1 -0
- package/dist/agents/codemie-code/toolMetadata.d.ts +15 -0
- package/dist/agents/codemie-code/toolMetadata.d.ts.map +1 -0
- package/dist/agents/codemie-code/toolMetadata.js +315 -0
- package/dist/agents/codemie-code/toolMetadata.js.map +1 -0
- package/dist/agents/codemie-code/tools/command.d.ts +2 -0
- package/dist/agents/codemie-code/tools/command.d.ts.map +1 -0
- package/dist/agents/codemie-code/tools/command.js +2 -0
- package/dist/agents/codemie-code/tools/command.js.map +1 -0
- package/dist/agents/codemie-code/tools/filesystem.d.ts +2 -0
- package/dist/agents/codemie-code/tools/filesystem.d.ts.map +1 -0
- package/dist/agents/codemie-code/tools/filesystem.js +2 -0
- package/dist/agents/codemie-code/tools/filesystem.js.map +1 -0
- package/dist/agents/codemie-code/tools/git.d.ts +2 -0
- package/dist/agents/codemie-code/tools/git.d.ts.map +1 -0
- package/dist/agents/codemie-code/tools/git.js +2 -0
- package/dist/agents/codemie-code/tools/git.js.map +1 -0
- package/dist/agents/codemie-code/tools/index.d.ts +19 -0
- package/dist/agents/codemie-code/tools/index.d.ts.map +1 -0
- package/dist/agents/codemie-code/tools/index.js +239 -0
- package/dist/agents/codemie-code/tools/index.js.map +1 -0
- package/dist/agents/codemie-code/tools/security.d.ts +2 -0
- package/dist/agents/codemie-code/tools/security.d.ts.map +1 -0
- package/dist/agents/codemie-code/tools/security.js +2 -0
- package/dist/agents/codemie-code/tools/security.js.map +1 -0
- package/dist/agents/codemie-code/types.d.ts +254 -0
- package/dist/agents/codemie-code/types.d.ts.map +1 -0
- package/dist/agents/codemie-code/types.js +35 -0
- package/dist/agents/codemie-code/types.js.map +1 -0
- package/dist/agents/codemie-code/ui.d.ts +83 -0
- package/dist/agents/codemie-code/ui.d.ts.map +1 -0
- package/dist/agents/codemie-code/ui.js +624 -0
- package/dist/agents/codemie-code/ui.js.map +1 -0
- package/dist/agents/registry.d.ts +1 -1
- package/dist/agents/registry.d.ts.map +1 -1
- package/dist/agents/registry.js +7 -13
- package/dist/agents/registry.js.map +1 -1
- package/dist/cli/commands/config.d.ts +3 -0
- package/dist/cli/commands/config.d.ts.map +1 -0
- package/dist/cli/commands/config.js +323 -0
- package/dist/cli/commands/config.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/doctor.js +113 -69
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/env.d.ts +3 -0
- package/dist/cli/commands/env.d.ts.map +1 -0
- package/dist/cli/commands/env.js +19 -0
- package/dist/cli/commands/env.js.map +1 -0
- package/dist/cli/commands/install.js +27 -33
- package/dist/cli/commands/install.js.map +1 -1
- package/dist/cli/commands/list.js +18 -24
- package/dist/cli/commands/list.js.map +1 -1
- package/dist/cli/commands/run.d.ts.map +1 -1
- package/dist/cli/commands/run.js +291 -31
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/commands/setup.d.ts +3 -0
- package/dist/cli/commands/setup.d.ts.map +1 -0
- package/dist/cli/commands/setup.js +357 -0
- package/dist/cli/commands/setup.js.map +1 -0
- package/dist/cli/commands/uninstall.js +24 -30
- package/dist/cli/commands/uninstall.js.map +1 -1
- package/dist/cli/commands/version.d.ts.map +1 -1
- package/dist/cli/commands/version.js +11 -16
- package/dist/cli/commands/version.js.map +1 -1
- package/dist/cli/index.js +47 -31
- package/dist/cli/index.js.map +1 -1
- package/dist/env/manager.js +9 -46
- package/dist/env/manager.js.map +1 -1
- package/dist/index.d.ts +6 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -43
- package/dist/index.js.map +1 -1
- package/dist/utils/async-tips.d.ts.map +1 -1
- package/dist/utils/async-tips.js +16 -55
- package/dist/utils/async-tips.js.map +1 -1
- package/dist/utils/clipboard.d.ts +16 -0
- package/dist/utils/clipboard.d.ts.map +1 -0
- package/dist/utils/clipboard.js +179 -0
- package/dist/utils/clipboard.js.map +1 -0
- package/dist/utils/config-loader.d.ts +96 -0
- package/dist/utils/config-loader.d.ts.map +1 -0
- package/dist/utils/config-loader.js +351 -0
- package/dist/utils/config-loader.js.map +1 -0
- package/dist/utils/dirname.d.ts +7 -0
- package/dist/utils/dirname.d.ts.map +1 -0
- package/dist/utils/dirname.js +11 -0
- package/dist/utils/dirname.js.map +1 -0
- package/dist/utils/errors.js +7 -17
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/exec.js +3 -6
- package/dist/utils/exec.js.map +1 -1
- package/dist/utils/first-time.d.ts +34 -0
- package/dist/utils/first-time.d.ts.map +1 -0
- package/dist/utils/first-time.js +245 -0
- package/dist/utils/first-time.js.map +1 -0
- package/dist/utils/health-checker.d.ts +20 -0
- package/dist/utils/health-checker.d.ts.map +1 -0
- package/dist/utils/health-checker.js +168 -0
- package/dist/utils/health-checker.js.map +1 -0
- package/dist/utils/logger.js +12 -18
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/model-fetcher.d.ts +21 -0
- package/dist/utils/model-fetcher.d.ts.map +1 -0
- package/dist/utils/model-fetcher.js +137 -0
- package/dist/utils/model-fetcher.js.map +1 -0
- package/dist/utils/tips.d.ts.map +1 -1
- package/dist/utils/tips.js +13 -52
- package/dist/utils/tips.js.map +1 -1
- package/package.json +17 -23
- package/scripts/README.md +80 -0
- package/scripts/release.sh +156 -0
- package/dist/agents/adapters/aider.d.ts +0 -12
- package/dist/agents/adapters/aider.d.ts.map +0 -1
- package/dist/agents/adapters/aider.js +0 -80
- package/dist/agents/adapters/aider.js.map +0 -1
- package/dist/cli/cli.d.ts +0 -4
- package/dist/cli/cli.d.ts.map +0 -1
- package/dist/cli/cli.js +0 -107
- package/dist/cli/cli.js.map +0 -1
- package/dist/cli/commands/mcp.d.ts +0 -3
- package/dist/cli/commands/mcp.d.ts.map +0 -1
- package/dist/cli/commands/mcp.js +0 -459
- package/dist/cli/commands/mcp.js.map +0 -1
- package/dist/code/agent-events.d.ts +0 -39
- package/dist/code/agent-events.d.ts.map +0 -1
- package/dist/code/agent-events.js +0 -4
- package/dist/code/agent-events.js.map +0 -1
- package/dist/code/agent.d.ts +0 -19
- package/dist/code/agent.d.ts.map +0 -1
- package/dist/code/agent.js +0 -144
- package/dist/code/agent.js.map +0 -1
- package/dist/code/config.d.ts +0 -13
- package/dist/code/config.d.ts.map +0 -1
- package/dist/code/config.js +0 -41
- package/dist/code/config.js.map +0 -1
- package/dist/code/index.d.ts +0 -19
- package/dist/code/index.d.ts.map +0 -1
- package/dist/code/index.js +0 -400
- package/dist/code/index.js.map +0 -1
- package/dist/code/prompts.d.ts +0 -2
- package/dist/code/prompts.d.ts.map +0 -1
- package/dist/code/prompts.js +0 -45
- package/dist/code/prompts.js.map +0 -1
- package/dist/code/tools/command.d.ts +0 -8
- package/dist/code/tools/command.d.ts.map +0 -1
- package/dist/code/tools/command.js +0 -83
- package/dist/code/tools/command.js.map +0 -1
- package/dist/code/tools/diff-utils.d.ts +0 -2
- package/dist/code/tools/diff-utils.d.ts.map +0 -1
- package/dist/code/tools/diff-utils.js +0 -45
- package/dist/code/tools/diff-utils.js.map +0 -1
- package/dist/code/tools/filesystem.d.ts +0 -11
- package/dist/code/tools/filesystem.d.ts.map +0 -1
- package/dist/code/tools/filesystem.js +0 -442
- package/dist/code/tools/filesystem.js.map +0 -1
- package/dist/code/tools/git.d.ts +0 -7
- package/dist/code/tools/git.d.ts.map +0 -1
- package/dist/code/tools/git.js +0 -111
- package/dist/code/tools/git.js.map +0 -1
- package/dist/code/tools/mcp.d.ts +0 -13
- package/dist/code/tools/mcp.d.ts.map +0 -1
- package/dist/code/tools/mcp.js +0 -230
- package/dist/code/tools/mcp.js.map +0 -1
- package/dist/data/tips.json +0 -118
- package/dist/ui/terminal-ui.d.ts +0 -73
- package/dist/ui/terminal-ui.d.ts.map +0 -1
- package/dist/ui/terminal-ui.js +0 -900
- package/dist/ui/terminal-ui.js.map +0 -1
- package/dist/utils/env-mapper.d.ts +0 -40
- package/dist/utils/env-mapper.d.ts.map +0 -1
- package/dist/utils/env-mapper.js +0 -122
- package/dist/utils/env-mapper.js.map +0 -1
- package/docs/USER_GUIDE.md +0 -573
- package/tests/agent-direct.test.mjs +0 -45
- package/tests/agent-output.test.mjs +0 -64
- package/tests/codemie-code.test.mjs +0 -42
- package/tests/context7-only.test.mjs +0 -42
- package/tests/conversation-flow.test.mjs +0 -63
- package/tests/interactive-simulation.test.mjs +0 -60
- package/tests/live-output.test.mjs +0 -53
- package/tests/mcp-context7.test.mjs +0 -105
- package/tests/mcp-e2e.test.mjs +0 -109
- package/tests/mcp-time-server.test.mjs +0 -58
- package/tests/streaming.test.mjs +0 -57
- package/tests/test-helpers.mjs +0 -94
- package/tests/text-wrapping.test.mjs +0 -33
- package/tests/tool-count.test.mjs +0 -81
- package/tests/ui-format.test.mjs +0 -39
- package/tests/ui-state.test.mjs +0 -72
package/README.md
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
# CodeMie
|
|
1
|
+
# CodeMie
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> CLI wrapper for managing multiple AI coding agents
|
|
4
4
|
|
|
5
|
-
CodeMie
|
|
5
|
+
CodeMie is a unified CLI tool for installing, configuring, and running multiple AI coding agents (Claude Code, Codex, etc.) from a single interface.
|
|
6
6
|
|
|
7
7
|
## ✨ Features
|
|
8
8
|
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
- 🚀 **Zero Configuration** - Works with environment variables only
|
|
9
|
+
- 🔧 **Unified CLI** - Manage multiple AI coding agents from one interface
|
|
10
|
+
- ⭐ **Built-in Agent** - CodeMie Native ready to use immediately (no installation required)
|
|
11
|
+
- 🤖 **Multi-Agent Support** - Claude Code, Codex, and more
|
|
12
|
+
- 🛠️ **Environment Management** - Centralized configuration for all agents
|
|
13
|
+
- 🚀 **Zero Hassle** - Install and run agents with simple commands
|
|
14
|
+
- 📦 **Provider Agnostic** - Works with any AI provider (OpenAI, Anthropic, Azure, etc.)
|
|
15
|
+
- 🎯 **Task Execution** - Single task mode with `--task` flag for automation
|
|
16
|
+
- 🖼️ **Clipboard Integration** - Automatic image detection from system clipboard
|
|
18
17
|
|
|
19
18
|
---
|
|
20
19
|
|
|
@@ -46,9 +45,8 @@ npm link
|
|
|
46
45
|
### Verify Installation
|
|
47
46
|
|
|
48
47
|
```bash
|
|
49
|
-
# Check if
|
|
48
|
+
# Check if command is available
|
|
50
49
|
codemie --help
|
|
51
|
-
codemie-code --help
|
|
52
50
|
|
|
53
51
|
# Run health check
|
|
54
52
|
codemie doctor
|
|
@@ -58,860 +56,450 @@ codemie doctor
|
|
|
58
56
|
|
|
59
57
|
## 🚀 Quick Start
|
|
60
58
|
|
|
61
|
-
###
|
|
59
|
+
### Installation → Setup → Use
|
|
62
60
|
|
|
63
|
-
CodeMie
|
|
61
|
+
CodeMie follows a simple three-step workflow:
|
|
64
62
|
|
|
65
|
-
```bash
|
|
66
|
-
export CODEMIE_BASE_URL="https://your-ai-proxy.com"
|
|
67
|
-
export CODEMIE_AUTH_TOKEN="your-auth-token"
|
|
68
|
-
export CODEMIE_MODEL="claude-4-5-sonnet"
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
**Add to your shell profile** for persistence:
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
# Add to ~/.bashrc or ~/.zshrc
|
|
75
|
-
echo 'export CODEMIE_BASE_URL="https://your-ai-proxy.com"' >> ~/.bashrc
|
|
76
|
-
echo 'export CODEMIE_AUTH_TOKEN="your-auth-token"' >> ~/.bashrc
|
|
77
|
-
echo 'export CODEMIE_MODEL="claude-4-5-sonnet"' >> ~/.bashrc
|
|
78
|
-
|
|
79
|
-
# Reload shell
|
|
80
|
-
source ~/.bashrc
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
### 2. Test Connection
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
codemie-code test
|
|
87
63
|
```
|
|
88
|
-
|
|
89
|
-
**Expected output:**
|
|
90
|
-
```
|
|
91
|
-
✓ Configuration loaded
|
|
92
|
-
✓ Testing connection...
|
|
93
|
-
✓ Connection successful
|
|
94
|
-
✓ Model: claude-4-5-sonnet
|
|
64
|
+
1. Install → 2. Setup (Wizard OR Manual) → 3. Use (Install & Run Agents)
|
|
95
65
|
```
|
|
96
66
|
|
|
97
|
-
###
|
|
67
|
+
### Step 1: Install
|
|
98
68
|
|
|
99
69
|
```bash
|
|
100
|
-
|
|
101
|
-
codemie-code
|
|
102
|
-
|
|
103
|
-
# In specific directory
|
|
104
|
-
codemie-code /path/to/your/project
|
|
105
|
-
|
|
106
|
-
# Execute one-off task
|
|
107
|
-
codemie-code exec "Add error handling to api.ts"
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### 4. Interact with the Assistant
|
|
111
|
-
|
|
112
|
-
```
|
|
113
|
-
╔═══════════════════════════════════════╗
|
|
114
|
-
║ CodeMie Code Assistant ║
|
|
115
|
-
╚═══════════════════════════════════════╝
|
|
116
|
-
|
|
117
|
-
Working directory: /your/project
|
|
118
|
-
Model: claude-4-5-sonnet
|
|
119
|
-
|
|
120
|
-
Type "exit" to quit, "clear" to clear history
|
|
121
|
-
|
|
122
|
-
You: List all TypeScript files in this project
|
|
123
|
-
You: Show git status and recent commits
|
|
124
|
-
You: Create a new file called utils.ts with helper functions
|
|
70
|
+
npm install -g @codemieai/code
|
|
125
71
|
```
|
|
126
72
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
## 📚 Configuration
|
|
73
|
+
### Step 2: Setup (Choose One Method)
|
|
130
74
|
|
|
131
|
-
|
|
75
|
+
#### Method A: Interactive Setup Wizard (Recommended)
|
|
132
76
|
|
|
133
|
-
|
|
134
|
-
|----------|-------------|---------|
|
|
135
|
-
| `CODEMIE_BASE_URL` | AI provider base URL | `https://your-ai-proxy.com` |
|
|
136
|
-
| `CODEMIE_AUTH_TOKEN` | Authentication token | `your-token-here` |
|
|
137
|
-
| `CODEMIE_MODEL` | Model to use | `claude-4-5-sonnet` |
|
|
138
|
-
|
|
139
|
-
### Optional Configuration
|
|
140
|
-
|
|
141
|
-
#### Runtime Configuration
|
|
77
|
+
Best for most users - guided configuration with connection testing:
|
|
142
78
|
|
|
143
79
|
```bash
|
|
144
|
-
|
|
145
|
-
export CODEMIE_DEBUG="true"
|
|
146
|
-
|
|
147
|
-
# Timeout for AI requests (seconds)
|
|
148
|
-
export CODEMIE_TIMEOUT="300"
|
|
149
|
-
|
|
150
|
-
# Load specific MCP servers
|
|
151
|
-
export CODEMIE_MCP_SERVERS="time,context7"
|
|
80
|
+
codemie setup
|
|
152
81
|
```
|
|
153
82
|
|
|
154
|
-
|
|
83
|
+
**What it does:**
|
|
84
|
+
- ✅ Guides you through provider selection
|
|
85
|
+
- ✅ Prompts for credentials
|
|
86
|
+
- ✅ **Validates credentials** via `/health` endpoint
|
|
87
|
+
- ✅ **Fetches available models** via `/v1/models` endpoint
|
|
88
|
+
- ✅ Shows real-time model list (no hardcoded options)
|
|
89
|
+
- ✅ Saves to `~/.codemie/config.json`
|
|
155
90
|
|
|
156
|
-
|
|
91
|
+
**Supported Providers:**
|
|
92
|
+
- AI/Run CodeMie (Unified gateway)
|
|
93
|
+
- AWS Bedrock (Claude via AWS)
|
|
94
|
+
- Anthropic (Direct API)
|
|
95
|
+
- Azure OpenAI (for GPT models and Codex)
|
|
96
|
+
- Custom LiteLLM Proxy
|
|
157
97
|
|
|
158
|
-
|
|
159
|
-
{
|
|
160
|
-
"mcpServers": {
|
|
161
|
-
"context7": {
|
|
162
|
-
"command": "npx",
|
|
163
|
-
"args": ["-y", "@upstash/context7-mcp"]
|
|
164
|
-
},
|
|
165
|
-
"time": {
|
|
166
|
-
"command": "uvx",
|
|
167
|
-
"args": ["mcp-server-time"]
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
```
|
|
98
|
+
#### Method B: Manual Configuration Guide
|
|
172
99
|
|
|
173
|
-
|
|
100
|
+
Best for automated setups or when you have credentials ready:
|
|
174
101
|
|
|
175
102
|
```bash
|
|
176
|
-
#
|
|
177
|
-
|
|
178
|
-
codemie-code
|
|
179
|
-
|
|
180
|
-
# Or with CLI flag
|
|
181
|
-
codemie-code --mcp-servers context7,time
|
|
103
|
+
# View detailed setup guide with examples
|
|
104
|
+
codemie env
|
|
182
105
|
```
|
|
183
106
|
|
|
184
|
-
|
|
107
|
+
### Step 3: Use Agents
|
|
185
108
|
|
|
186
|
-
|
|
109
|
+
#### Try the Built-in Agent (Recommended for New Users)
|
|
187
110
|
|
|
188
|
-
|
|
111
|
+
**CodeMie Native** is built-in and ready to use immediately:
|
|
189
112
|
|
|
190
113
|
```bash
|
|
191
|
-
#
|
|
192
|
-
|
|
193
|
-
export CODEMIE_AUTH_TOKEN="your-token"
|
|
194
|
-
export CODEMIE_MODEL="claude-4-5-sonnet"
|
|
195
|
-
|
|
196
|
-
# Reload shell
|
|
197
|
-
source ~/.bashrc # or ~/.zshrc
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
#### Method 2: Project .env File
|
|
114
|
+
# Start interactive session
|
|
115
|
+
codemie run codemie-code
|
|
201
116
|
|
|
202
|
-
|
|
203
|
-
# Create .env in your project
|
|
204
|
-
cat > .env << EOF
|
|
205
|
-
CODEMIE_BASE_URL=https://your-ai-proxy.com
|
|
206
|
-
CODEMIE_AUTH_TOKEN=your-token
|
|
207
|
-
CODEMIE_MODEL=claude-4-5-sonnet
|
|
208
|
-
EOF
|
|
209
|
-
|
|
210
|
-
# Load and run
|
|
211
|
-
set -a; source .env; set +a
|
|
117
|
+
# OR use direct executable
|
|
212
118
|
codemie-code
|
|
213
|
-
```
|
|
214
119
|
|
|
215
|
-
|
|
120
|
+
# Execute single task
|
|
121
|
+
codemie-code --task "Help me debug this error"
|
|
216
122
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
CODEMIE_AUTH_TOKEN="your-token" \
|
|
220
|
-
CODEMIE_MODEL="claude-4-5-sonnet" \
|
|
221
|
-
codemie-code
|
|
123
|
+
# With initial message
|
|
124
|
+
codemie-code "Review my code for bugs"
|
|
222
125
|
```
|
|
223
126
|
|
|
224
|
-
|
|
127
|
+
#### Install Additional Agents
|
|
225
128
|
|
|
226
|
-
For advanced scenarios, you can use provider-specific environment variables. These act as fallbacks if generic `CODEMIE_*` variables are not set:
|
|
227
|
-
|
|
228
|
-
**For Anthropic Claude:**
|
|
229
129
|
```bash
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
export ANTHROPIC_MODEL="claude-4-5-sonnet"
|
|
233
|
-
```
|
|
130
|
+
# Install Claude Code
|
|
131
|
+
codemie install claude
|
|
234
132
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
export OPENAI_BASE_URL="https://api.openai.com/v1"
|
|
238
|
-
export OPENAI_API_KEY="your-openai-key"
|
|
239
|
-
export OPENAI_MODEL="gpt-4"
|
|
133
|
+
# Install Codex
|
|
134
|
+
codemie install codex
|
|
240
135
|
```
|
|
241
136
|
|
|
242
|
-
|
|
243
|
-
1. `CODEMIE_*` (generic - checked first)
|
|
244
|
-
2. `ANTHROPIC_*` or `OPENAI_*` (provider-specific - fallback)
|
|
245
|
-
|
|
246
|
-
---
|
|
247
|
-
|
|
248
|
-
## 🎯 Usage
|
|
249
|
-
|
|
250
|
-
### CodeMie Code Assistant
|
|
251
|
-
|
|
252
|
-
The built-in AI assistant with filesystem, git, and command execution tools.
|
|
137
|
+
#### List Available Agents
|
|
253
138
|
|
|
254
139
|
```bash
|
|
255
|
-
|
|
256
|
-
codemie-code
|
|
257
|
-
codemie-code /path/to/project
|
|
258
|
-
|
|
259
|
-
# Execute one-off task
|
|
260
|
-
codemie-code exec "Add error handling to api.ts"
|
|
261
|
-
|
|
262
|
-
# Execute with custom directory
|
|
263
|
-
codemie-code exec "Run tests" -d /path/to/project
|
|
264
|
-
|
|
265
|
-
# Test connection
|
|
266
|
-
codemie-code test
|
|
267
|
-
|
|
268
|
-
# With MCP servers
|
|
269
|
-
codemie-code --mcp-servers time,context7
|
|
270
|
-
|
|
271
|
-
# With specific model
|
|
272
|
-
CODEMIE_MODEL="claude-opus" codemie-code
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
#### Interactive Commands
|
|
276
|
-
|
|
277
|
-
Once inside the assistant:
|
|
278
|
-
|
|
279
|
-
- **exit** - Exit the assistant
|
|
280
|
-
- **clear** - Clear conversation history
|
|
281
|
-
- Any coding question or task
|
|
282
|
-
|
|
283
|
-
#### Example Prompts
|
|
284
|
-
|
|
285
|
-
```
|
|
286
|
-
You: Show me the project structure
|
|
287
|
-
You: Read the package.json file
|
|
288
|
-
You: List all TypeScript files
|
|
289
|
-
You: Show git status and recent commits
|
|
290
|
-
You: Create a new file called utils.ts with helper functions
|
|
291
|
-
You: Search for files containing "authentication"
|
|
292
|
-
You: Edit README.md to add a new section
|
|
293
|
-
You: Run npm test and show me the results
|
|
140
|
+
codemie list
|
|
294
141
|
```
|
|
295
142
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
Extend capabilities with Model Context Protocol servers.
|
|
299
|
-
|
|
300
|
-
```bash
|
|
301
|
-
# List available servers
|
|
302
|
-
codemie-code mcp list
|
|
303
|
-
|
|
304
|
-
# List with detailed configuration
|
|
305
|
-
codemie-code mcp list -v
|
|
306
|
-
|
|
307
|
-
# Add new server
|
|
308
|
-
codemie-code mcp add <name> <command-or-url> [options]
|
|
309
|
-
|
|
310
|
-
# Test server configuration
|
|
311
|
-
codemie-code mcp test <server-name>
|
|
143
|
+
#### Run an Agent
|
|
312
144
|
|
|
313
|
-
|
|
314
|
-
codemie-code mcp remove <server-name>
|
|
145
|
+
Agents are run directly after installation. Configuration is automatically passed from `~/.codemie/config.json`.
|
|
315
146
|
|
|
316
|
-
# Preview which servers will load
|
|
317
|
-
codemie-code mcp servers
|
|
318
|
-
codemie-code mcp servers --servers time,context7
|
|
319
|
-
```
|
|
320
|
-
|
|
321
|
-
#### Popular MCP Servers
|
|
322
|
-
|
|
323
|
-
**Time Server** - Query times in any timezone:
|
|
324
147
|
```bash
|
|
325
|
-
|
|
326
|
-
codemie-code
|
|
327
|
-
|
|
328
|
-
# Then ask: "What time is it in Hong Kong?"
|
|
329
|
-
```
|
|
148
|
+
# Run built-in CodeMie Native
|
|
149
|
+
codemie run codemie-code
|
|
330
150
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
codemie-code mcp add context7 npx -a "-y" "@upstash/context7-mcp"
|
|
334
|
-
codemie-code --mcp-servers context7
|
|
151
|
+
# Run Claude
|
|
152
|
+
codemie run claude
|
|
335
153
|
|
|
336
|
-
#
|
|
154
|
+
# Run Codex
|
|
155
|
+
codemie run codex
|
|
337
156
|
```
|
|
338
157
|
|
|
339
|
-
|
|
158
|
+
**Automatic Model Validation:**
|
|
340
159
|
|
|
341
|
-
|
|
160
|
+
CodeMie automatically validates model compatibility:
|
|
161
|
+
- **Codex** only accepts OpenAI models (gpt-5, gpt-4.1, gpt-4o, etc.)
|
|
162
|
+
- **Claude** accepts both Claude and GPT models
|
|
342
163
|
|
|
343
|
-
|
|
164
|
+
If you try to run Codex with a Claude model, CodeMie will:
|
|
165
|
+
1. Detect the incompatibility
|
|
166
|
+
2. **Fetch available models** from your provider's `/v1/models` API endpoint
|
|
167
|
+
3. Filter to show only compatible models
|
|
168
|
+
4. Offer to switch to a compatible GPT model
|
|
169
|
+
5. Optionally save your choice
|
|
344
170
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
171
|
+
**Dynamic Model Discovery:**
|
|
172
|
+
- Models are fetched in real-time from your configured provider
|
|
173
|
+
- No hardcoded lists - always shows what's actually available
|
|
174
|
+
- Results are cached for 5 minutes to improve performance
|
|
175
|
+
- Works with any OpenAI-compatible API (AI/Run, LiteLLM, OpenAI, etc.)
|
|
349
176
|
|
|
350
|
-
|
|
177
|
+
---
|
|
351
178
|
|
|
352
|
-
|
|
353
|
-
codemie install claude-code # Install Anthropic Claude Code
|
|
354
|
-
codemie install aider # Install Aider
|
|
355
|
-
codemie install codex # Install OpenAI Codex
|
|
356
|
-
```
|
|
179
|
+
## 📚 Available Commands
|
|
357
180
|
|
|
358
|
-
|
|
181
|
+
### Core Commands
|
|
359
182
|
|
|
360
183
|
```bash
|
|
361
|
-
#
|
|
362
|
-
codemie
|
|
363
|
-
|
|
364
|
-
# Run other agents
|
|
365
|
-
codemie run claude-code
|
|
366
|
-
codemie run aider
|
|
367
|
-
codemie run codex
|
|
184
|
+
# Setup wizard (interactive configuration)
|
|
185
|
+
codemie setup
|
|
368
186
|
|
|
369
|
-
#
|
|
370
|
-
codemie
|
|
187
|
+
# Environment configuration guide
|
|
188
|
+
codemie env
|
|
371
189
|
|
|
372
|
-
#
|
|
373
|
-
codemie
|
|
374
|
-
```
|
|
190
|
+
# List all available agents
|
|
191
|
+
codemie list
|
|
375
192
|
|
|
376
|
-
|
|
193
|
+
# Install an agent
|
|
194
|
+
codemie install <agent>
|
|
377
195
|
|
|
378
|
-
|
|
379
|
-
codemie uninstall
|
|
380
|
-
codemie uninstall aider
|
|
381
|
-
```
|
|
196
|
+
# Uninstall an agent
|
|
197
|
+
codemie uninstall <agent>
|
|
382
198
|
|
|
383
|
-
|
|
199
|
+
# Run an agent
|
|
200
|
+
codemie run <agent>
|
|
384
201
|
|
|
385
|
-
|
|
202
|
+
# Check installation and configuration
|
|
386
203
|
codemie doctor
|
|
387
|
-
```
|
|
388
204
|
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
- ✅ npm installation
|
|
392
|
-
- ✅ git availability
|
|
393
|
-
- ✅ Environment variables configuration
|
|
394
|
-
- ✅ Installed agents
|
|
205
|
+
# Manage configuration
|
|
206
|
+
codemie config [options]
|
|
395
207
|
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
```bash
|
|
208
|
+
# Show version
|
|
399
209
|
codemie version
|
|
400
|
-
codemie-code --version
|
|
401
210
|
```
|
|
402
211
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
## 🛠️ Available Tools
|
|
406
|
-
|
|
407
|
-
CodeMie Code assistant comes with 15 built-in tools, plus extensible MCP tools:
|
|
408
|
-
|
|
409
|
-
### Filesystem Tools (10 tools)
|
|
410
|
-
|
|
411
|
-
| Tool | Description |
|
|
412
|
-
|------|-------------|
|
|
413
|
-
| `read_file` | Read contents of a file |
|
|
414
|
-
| `read_multiple_files` | Read multiple files at once |
|
|
415
|
-
| `write_file` | Write/create a file with content |
|
|
416
|
-
| `edit_file` | Edit file with diff-based updates |
|
|
417
|
-
| `create_directory` | Create directories recursively |
|
|
418
|
-
| `list_directory` | List files and directories |
|
|
419
|
-
| `project_tree` | Generate visual project structure tree |
|
|
420
|
-
| `move_file` | Move or rename files |
|
|
421
|
-
| `search_files` | Search files by name or content |
|
|
422
|
-
| `list_allowed_directories` | Show accessible directories |
|
|
423
|
-
|
|
424
|
-
### Git Tools (4 tools)
|
|
425
|
-
|
|
426
|
-
| Tool | Description |
|
|
427
|
-
|------|-------------|
|
|
428
|
-
| `git_status` | Get repository status |
|
|
429
|
-
| `git_diff` | Show git diff for changes |
|
|
430
|
-
| `git_log` | Show commit history |
|
|
431
|
-
| `git_command` | Execute any git command |
|
|
432
|
-
|
|
433
|
-
### Command Execution (1 tool)
|
|
434
|
-
|
|
435
|
-
| Tool | Description |
|
|
436
|
-
|------|-------------|
|
|
437
|
-
| `execute_command` | Execute shell commands (with security checks) |
|
|
212
|
+
### Built-in Agent Commands
|
|
438
213
|
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
| Server | Tools | Description |
|
|
444
|
-
|--------|-------|-------------|
|
|
445
|
-
| `context7` | `resolve-library-id`, `get-library-docs` | Access up-to-date library documentation |
|
|
446
|
-
| `time` | `get-current-time` | Query times in any timezone |
|
|
447
|
-
| Custom | Varies | Add your own MCP servers |
|
|
448
|
-
|
|
449
|
-
Configure MCP servers in `~/.codemie/config.json` to extend available tools.
|
|
450
|
-
|
|
451
|
-
### Tool Features
|
|
452
|
-
|
|
453
|
-
- **Path Validation**: All operations restricted to allowed directories
|
|
454
|
-
- **Symlink Protection**: Prevents escaping allowed directories
|
|
455
|
-
- **Ignore Patterns**: Automatically excludes node_modules, .git, etc.
|
|
456
|
-
- **Indentation Preservation**: Smart editing maintains code formatting
|
|
457
|
-
- **Unified Diffs**: Shows clear before/after changes
|
|
458
|
-
- **Command Sanitization**: Blocks dangerous commands (rm -rf /, sudo, etc.)
|
|
459
|
-
|
|
460
|
-
---
|
|
461
|
-
|
|
462
|
-
## 🔒 Security Features
|
|
214
|
+
```bash
|
|
215
|
+
# CodeMie Native - Interactive mode
|
|
216
|
+
codemie-code
|
|
463
217
|
|
|
464
|
-
CodeMie
|
|
218
|
+
# CodeMie Native - Single task execution
|
|
219
|
+
codemie-code --task "Your task here"
|
|
465
220
|
|
|
466
|
-
|
|
221
|
+
# CodeMie Native - With initial message
|
|
222
|
+
codemie-code "Your initial message"
|
|
467
223
|
|
|
468
|
-
|
|
469
|
-
-
|
|
470
|
-
- No directory traversal attacks (../)
|
|
471
|
-
- Absolute path resolution
|
|
224
|
+
# CodeMie Native - Health check
|
|
225
|
+
codemie-code health
|
|
472
226
|
|
|
473
|
-
|
|
474
|
-
-
|
|
475
|
-
|
|
227
|
+
# CodeMie Native - Debug mode
|
|
228
|
+
codemie-code --debug
|
|
229
|
+
```
|
|
476
230
|
|
|
477
|
-
|
|
478
|
-
- Automatically excludes sensitive directories
|
|
479
|
-
- Default: `node_modules`, `.git`, `__pycache__`, `.venv`, `dist`, `build`
|
|
231
|
+
### Direct Agent Shortcuts
|
|
480
232
|
|
|
481
|
-
|
|
233
|
+
Quick access to external agents with configuration overrides:
|
|
482
234
|
|
|
483
|
-
|
|
235
|
+
```bash
|
|
236
|
+
# Claude Code (direct shortcut)
|
|
237
|
+
codemie-claude # Interactive mode
|
|
238
|
+
codemie-claude --model claude-4-5-sonnet # Override model
|
|
239
|
+
codemie-claude --api-key your-key # Override API key
|
|
240
|
+
codemie-claude health # Health check
|
|
484
241
|
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
🚫 curl ... | sh // Download and execute
|
|
491
|
-
🚫 sudo // Privilege escalation
|
|
492
|
-
🚫 chmod 777 // Unsafe permissions
|
|
493
|
-
🚫 > /etc/ // Writing to system config
|
|
494
|
-
🚫 > /dev/ // Writing to devices
|
|
495
|
-
🚫 :(){ :|:& };: // Fork bomb
|
|
242
|
+
# Codex (direct shortcut)
|
|
243
|
+
codemie-codex # Interactive mode
|
|
244
|
+
codemie-codex --model gpt-4o # Override model (OpenAI only)
|
|
245
|
+
codemie-codex --provider openai # Override provider
|
|
246
|
+
codemie-codex health # Health check
|
|
496
247
|
```
|
|
497
248
|
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
---
|
|
506
|
-
|
|
507
|
-
## 🎨 Usage Examples
|
|
249
|
+
**Features of Direct Shortcuts:**
|
|
250
|
+
- Bypass the registry system for faster startup
|
|
251
|
+
- Support all original agent options and arguments
|
|
252
|
+
- Allow configuration overrides via CLI flags
|
|
253
|
+
- Include health check commands
|
|
254
|
+
- Pass through unknown options to the underlying agent
|
|
508
255
|
|
|
509
|
-
###
|
|
256
|
+
### Configuration Commands
|
|
510
257
|
|
|
511
258
|
```bash
|
|
512
|
-
|
|
259
|
+
# Set a configuration value
|
|
260
|
+
codemie config set <key> <value>
|
|
513
261
|
|
|
514
|
-
|
|
515
|
-
|
|
262
|
+
# Get a configuration value
|
|
263
|
+
codemie config get <key>
|
|
516
264
|
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
```
|
|
520
|
-
|
|
521
|
-
### Example 2: Refactoring
|
|
522
|
-
|
|
523
|
-
```bash
|
|
524
|
-
You: Show me all files in src/components
|
|
525
|
-
Assistant: [Lists component files]
|
|
265
|
+
# List all configuration
|
|
266
|
+
codemie config list
|
|
526
267
|
|
|
527
|
-
|
|
528
|
-
|
|
268
|
+
# Reset configuration
|
|
269
|
+
codemie config reset
|
|
529
270
|
|
|
530
|
-
|
|
531
|
-
|
|
271
|
+
# Advanced: Change timeout (default: 300 seconds)
|
|
272
|
+
codemie config set timeout 600
|
|
532
273
|
```
|
|
533
274
|
|
|
534
|
-
|
|
275
|
+
---
|
|
535
276
|
|
|
536
|
-
|
|
537
|
-
You: Show me the current git status
|
|
538
|
-
Assistant: [Shows modified, staged, and untracked files]
|
|
277
|
+
## ⚙️ Configuration
|
|
539
278
|
|
|
540
|
-
|
|
541
|
-
Assistant: [Displays git diff]
|
|
279
|
+
CodeMie stores configuration in `~/.codemie/config.json`:
|
|
542
280
|
|
|
543
|
-
|
|
544
|
-
|
|
281
|
+
```json
|
|
282
|
+
{
|
|
283
|
+
"provider": "anthropic",
|
|
284
|
+
"model": "claude-4-5-sonnet",
|
|
285
|
+
"anthropic": {
|
|
286
|
+
"baseUrl": "https://api.anthropic.com/v1",
|
|
287
|
+
"apiKey": "your-api-key",
|
|
288
|
+
"timeout": 300
|
|
289
|
+
}
|
|
290
|
+
}
|
|
545
291
|
```
|
|
546
292
|
|
|
547
|
-
###
|
|
293
|
+
### Supported Providers
|
|
548
294
|
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
295
|
+
- **anthropic** - Anthropic Claude API
|
|
296
|
+
- **openai** - OpenAI API
|
|
297
|
+
- **azure** - Azure OpenAI
|
|
298
|
+
- **bedrock** - AWS Bedrock
|
|
299
|
+
- **litellm** - LiteLLM Proxy (custom)
|
|
552
300
|
|
|
553
|
-
|
|
554
|
-
Assistant: [Creates file with boilerplate code]
|
|
301
|
+
### Environment Variables
|
|
555
302
|
|
|
556
|
-
You
|
|
557
|
-
Assistant: [Creates documentation]
|
|
558
|
-
```
|
|
559
|
-
|
|
560
|
-
### Example 5: Search and Replace
|
|
303
|
+
You can also configure via environment variables (higher priority than config file):
|
|
561
304
|
|
|
562
305
|
```bash
|
|
563
|
-
|
|
564
|
-
|
|
306
|
+
# Anthropic
|
|
307
|
+
export ANTHROPIC_BASE_URL="https://api.anthropic.com/v1"
|
|
308
|
+
export ANTHROPIC_API_KEY="your-api-key"
|
|
309
|
+
export ANTHROPIC_MODEL="claude-4-5-sonnet"
|
|
565
310
|
|
|
566
|
-
|
|
567
|
-
|
|
311
|
+
# OpenAI
|
|
312
|
+
export OPENAI_BASE_URL="https://api.openai.com/v1"
|
|
313
|
+
export OPENAI_API_KEY="your-api-key"
|
|
314
|
+
export OPENAI_MODEL="gpt-4"
|
|
568
315
|
|
|
569
|
-
|
|
570
|
-
|
|
316
|
+
# Generic (works with any provider)
|
|
317
|
+
export AI_BASE_URL="https://your-proxy.com"
|
|
318
|
+
export AI_API_KEY="your-api-key"
|
|
319
|
+
export AI_MODEL="your-model"
|
|
571
320
|
```
|
|
572
321
|
|
|
573
322
|
---
|
|
574
323
|
|
|
575
|
-
##
|
|
576
|
-
|
|
577
|
-
### Common Issues
|
|
324
|
+
## 🤖 Supported Agents
|
|
578
325
|
|
|
579
|
-
|
|
326
|
+
### CodeMie Native (Built-in) ⭐
|
|
580
327
|
|
|
581
|
-
**
|
|
582
|
-
```bash
|
|
583
|
-
export CODEMIE_BASE_URL="https://your-ai-proxy.com"
|
|
584
|
-
export CODEMIE_AUTH_TOKEN="your-token"
|
|
585
|
-
export CODEMIE_MODEL="claude-4-5-sonnet"
|
|
586
|
-
```
|
|
587
|
-
|
|
588
|
-
#### "Connection test failed"
|
|
589
|
-
|
|
590
|
-
**Possible causes:**
|
|
591
|
-
1. Invalid CODEMIE_AUTH_TOKEN
|
|
592
|
-
2. CODEMIE_BASE_URL not accessible
|
|
593
|
-
3. Network/VPN issues
|
|
328
|
+
**NEW:** CodeMie's built-in LangGraph-based coding assistant. No external installation required!
|
|
594
329
|
|
|
595
|
-
**
|
|
330
|
+
**Usage:**
|
|
596
331
|
```bash
|
|
597
|
-
#
|
|
598
|
-
|
|
332
|
+
# Interactive mode
|
|
333
|
+
codemie run codemie-code
|
|
599
334
|
|
|
600
|
-
#
|
|
601
|
-
|
|
602
|
-
echo $CODEMIE_AUTH_TOKEN
|
|
603
|
-
echo $CODEMIE_MODEL
|
|
335
|
+
# Direct executable (alternative)
|
|
336
|
+
codemie-code
|
|
604
337
|
|
|
605
|
-
#
|
|
606
|
-
codemie
|
|
338
|
+
# Single task execution
|
|
339
|
+
codemie-code --task "Fix the bug in utils.js"
|
|
607
340
|
|
|
608
|
-
#
|
|
609
|
-
codemie-code
|
|
341
|
+
# With initial message
|
|
342
|
+
codemie-code "Help me refactor this component"
|
|
610
343
|
```
|
|
611
344
|
|
|
612
|
-
|
|
345
|
+
**Features:**
|
|
346
|
+
- 🔧 **Built-in**: No installation required - ready to use immediately
|
|
347
|
+
- 🚀 **Modern UI**: Beautiful terminal interface with real-time streaming
|
|
348
|
+
- 🎯 **Task-focused**: Execute single tasks or start interactive sessions
|
|
349
|
+
- 🔍 **Debug Mode**: Comprehensive logging with `--debug` flag
|
|
350
|
+
- 📋 **Clipboard Support**: Automatic image detection from clipboard
|
|
351
|
+
- 🛠️ **System Tools**: File operations, git integration, and command execution
|
|
352
|
+
- 💬 **Interactive Chat**: Continuous conversations with context memory
|
|
353
|
+
- 📊 **Usage Statistics**: Token tracking and cost monitoring
|
|
613
354
|
|
|
614
|
-
**
|
|
355
|
+
**Direct Commands:**
|
|
615
356
|
```bash
|
|
616
|
-
#
|
|
617
|
-
|
|
357
|
+
# Health check
|
|
358
|
+
codemie-code health
|
|
618
359
|
|
|
619
|
-
#
|
|
620
|
-
|
|
621
|
-
npm link
|
|
360
|
+
# Interactive mode with debug
|
|
361
|
+
codemie-code --debug
|
|
622
362
|
|
|
623
|
-
#
|
|
624
|
-
|
|
625
|
-
which codemie-code
|
|
363
|
+
# Execute task and exit
|
|
364
|
+
codemie-code --task "Run tests and fix any failures"
|
|
626
365
|
```
|
|
627
366
|
|
|
628
|
-
|
|
367
|
+
### Claude Code
|
|
629
368
|
|
|
630
|
-
|
|
631
|
-
CodeMie Code only operates within the working directory for security.
|
|
369
|
+
Anthropic's official CLI for Claude AI. Provides advanced code understanding, generation, and refactoring capabilities.
|
|
632
370
|
|
|
371
|
+
**Installation:**
|
|
633
372
|
```bash
|
|
634
|
-
|
|
635
|
-
cd /path/to/your/project
|
|
636
|
-
codemie-code
|
|
637
|
-
|
|
638
|
-
# Or specify the directory
|
|
639
|
-
codemie-code /path/to/your/project
|
|
373
|
+
codemie install claude
|
|
640
374
|
```
|
|
641
375
|
|
|
642
|
-
|
|
376
|
+
**Features:**
|
|
377
|
+
- Advanced code understanding
|
|
378
|
+
- Multi-file editing
|
|
379
|
+
- Interactive conversations
|
|
380
|
+
- Project-aware context
|
|
643
381
|
|
|
644
|
-
|
|
645
|
-
# Verify variables are set
|
|
646
|
-
env | grep CODEMIE_
|
|
382
|
+
### Codex
|
|
647
383
|
|
|
648
|
-
|
|
649
|
-
source ~/.bashrc # or ~/.zshrc
|
|
650
|
-
|
|
651
|
-
# Or export again
|
|
652
|
-
export CODEMIE_BASE_URL="..."
|
|
653
|
-
export CODEMIE_AUTH_TOKEN="..."
|
|
654
|
-
export CODEMIE_MODEL="..."
|
|
655
|
-
```
|
|
656
|
-
|
|
657
|
-
### Debug Mode
|
|
658
|
-
|
|
659
|
-
Enable debug logging to diagnose issues:
|
|
384
|
+
OpenAI's code generation assistant. Optimized for code completion and generation tasks.
|
|
660
385
|
|
|
386
|
+
**Installation:**
|
|
661
387
|
```bash
|
|
662
|
-
|
|
663
|
-
codemie-code
|
|
388
|
+
codemie install codex
|
|
664
389
|
```
|
|
665
390
|
|
|
666
|
-
|
|
667
|
-
-
|
|
668
|
-
-
|
|
669
|
-
-
|
|
670
|
-
-
|
|
671
|
-
|
|
672
|
-
### Clean Installation
|
|
673
|
-
|
|
674
|
-
If you encounter persistent issues:
|
|
391
|
+
**Features:**
|
|
392
|
+
- Code completion
|
|
393
|
+
- Function generation
|
|
394
|
+
- Bug fixing
|
|
395
|
+
- Code explanation
|
|
675
396
|
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
npm install
|
|
680
|
-
npm run build
|
|
397
|
+
**Model Compatibility:**
|
|
398
|
+
- ✅ Supports: GPT models (gpt-5, gpt-5-codex, gpt-4.1, gpt-4o)
|
|
399
|
+
- ❌ Not supported: Claude/Anthropic models (API incompatibility)
|
|
681
400
|
|
|
682
|
-
|
|
683
|
-
npm link
|
|
684
|
-
```
|
|
401
|
+
> **Note:** Codex requires OpenAI-compatible models. If you configure a Claude model, CodeMie will automatically prompt you to switch to a compatible GPT model.
|
|
685
402
|
|
|
686
403
|
---
|
|
687
404
|
|
|
688
|
-
##
|
|
405
|
+
## 🛠️ Development
|
|
689
406
|
|
|
690
|
-
###
|
|
407
|
+
### Project Structure
|
|
691
408
|
|
|
692
409
|
```
|
|
693
410
|
codemie-code/
|
|
694
411
|
├── bin/
|
|
695
|
-
│
|
|
696
|
-
│ └── codemie.js # CLI wrapper entry point
|
|
697
|
-
│
|
|
412
|
+
│ └── codemie.js # CLI entry point
|
|
698
413
|
├── src/
|
|
699
|
-
│ ├──
|
|
700
|
-
│ │ ├──
|
|
701
|
-
│ │
|
|
702
|
-
│
|
|
703
|
-
│ │ ├──
|
|
704
|
-
│ │
|
|
705
|
-
│
|
|
706
|
-
│
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
│ │ ├── mcp.ts # MCP integration
|
|
710
|
-
│ │ └── diff-utils.ts # Diff utilities
|
|
711
|
-
│ │
|
|
712
|
-
│ ├── cli/ # CLI Wrapper
|
|
713
|
-
│ │ └── commands/ # CLI commands
|
|
714
|
-
│ │ ├── list.ts
|
|
715
|
-
│ │ ├── install.ts
|
|
716
|
-
│ │ ├── run.ts
|
|
717
|
-
│ │ ├── doctor.ts
|
|
718
|
-
│ │ ├── uninstall.ts
|
|
719
|
-
│ │ ├── version.ts
|
|
720
|
-
│ │ └── mcp.ts
|
|
721
|
-
│ │
|
|
722
|
-
│ ├── agents/ # Agent System
|
|
723
|
-
│ │ ├── registry.ts # Agent registry
|
|
724
|
-
│ │ └── adapters/ # Agent adapters
|
|
725
|
-
│ │ ├── codemie-code.ts
|
|
726
|
-
│ │ ├── claude-code.ts
|
|
727
|
-
│ │ ├── codex.ts
|
|
728
|
-
│ │ └── aider.ts
|
|
729
|
-
│ │
|
|
730
|
-
│ ├── env/ # Environment Management
|
|
731
|
-
│ │ └── manager.ts
|
|
732
|
-
│ │
|
|
733
|
-
│ ├── ui/ # UI Layer
|
|
734
|
-
│ │ └── terminal-ui.ts # Interactive terminal
|
|
735
|
-
│ │
|
|
736
|
-
│ └── utils/ # Utilities
|
|
737
|
-
│ ├── env-mapper.ts # Environment variable mapping
|
|
738
|
-
│ ├── exec.ts # Process execution
|
|
739
|
-
│ ├── logger.ts # Logging
|
|
740
|
-
│ ├── errors.ts # Error classes
|
|
741
|
-
│ └── tips.ts # Loading tips
|
|
742
|
-
│
|
|
743
|
-
├── tests/ # Test files
|
|
744
|
-
│ └── integration/ # Integration tests
|
|
745
|
-
│
|
|
746
|
-
├── dist/ # Build output (TypeScript compilation)
|
|
747
|
-
├── mcp/ # MCP server configurations
|
|
748
|
-
│ └── servers.json
|
|
749
|
-
├── package.json # Dependencies and scripts
|
|
750
|
-
├── tsconfig.json # TypeScript configuration
|
|
751
|
-
├── eslint.config.mjs # ESLint configuration
|
|
752
|
-
└── README.md # Package documentation
|
|
414
|
+
│ ├── agents/ # Agent adapters
|
|
415
|
+
│ │ ├── registry.ts # Agent registry
|
|
416
|
+
│ │ └── adapters/ # Agent implementations
|
|
417
|
+
│ ├── cli/ # CLI commands
|
|
418
|
+
│ │ ├── index.ts # CLI setup
|
|
419
|
+
│ │ └── commands/ # Command implementations
|
|
420
|
+
│ ├── env/ # Environment management
|
|
421
|
+
│ └── utils/ # Utilities
|
|
422
|
+
├── package.json
|
|
423
|
+
└── README.md
|
|
753
424
|
```
|
|
754
425
|
|
|
755
|
-
###
|
|
426
|
+
### Building
|
|
756
427
|
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
- **Schema Validation**: Zod
|
|
764
|
-
- **Diff Generation**: diff package
|
|
765
|
-
- **UI**: Chalk, Inquirer, Ora
|
|
766
|
-
- **Testing**: Jest with ts-jest
|
|
767
|
-
- **Linting**: ESLint with TypeScript support
|
|
428
|
+
```bash
|
|
429
|
+
npm run build # Compile TypeScript
|
|
430
|
+
npm run dev # Watch mode for development
|
|
431
|
+
npm run lint # Check code style
|
|
432
|
+
npm run lint:fix # Fix linting issues
|
|
433
|
+
```
|
|
768
434
|
|
|
769
|
-
|
|
435
|
+
### Testing
|
|
770
436
|
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
### Current Status (v1.0.0)
|
|
774
|
-
|
|
775
|
-
✅ **Implemented**:
|
|
776
|
-
- Built-in AI coding assistant
|
|
777
|
-
- CLI wrapper for multiple agents
|
|
778
|
-
- 10 filesystem tools with security
|
|
779
|
-
- 4 git operation tools
|
|
780
|
-
- 1 command execution tool
|
|
781
|
-
- MCP (Model Context Protocol) integration
|
|
782
|
-
- Diff-based file editing
|
|
783
|
-
- Agent management (install/uninstall/run)
|
|
784
|
-
- Health check and diagnostics
|
|
785
|
-
- Interactive terminal UI with cancellation support
|
|
786
|
-
- One-off task execution with `exec` command
|
|
787
|
-
|
|
788
|
-
### Planned Features (v1.1.0+)
|
|
789
|
-
|
|
790
|
-
- 🎨 Custom themes and output formats
|
|
791
|
-
- 📦 Enhanced plugin system for custom tools
|
|
792
|
-
- 🌐 Multi-language support
|
|
793
|
-
- 📊 Usage analytics and insights
|
|
794
|
-
- 🔌 VS Code extension integration
|
|
795
|
-
- 🤖 More agent adapters (Cursor, Copilot, etc.)
|
|
796
|
-
- 🔍 Advanced MCP server discovery and management
|
|
437
|
+
After building, test the CLI locally:
|
|
797
438
|
|
|
798
|
-
|
|
439
|
+
```bash
|
|
440
|
+
# Build and link
|
|
441
|
+
npm run build && npm link
|
|
799
442
|
|
|
800
|
-
|
|
443
|
+
# Test commands
|
|
444
|
+
codemie --help
|
|
445
|
+
codemie list
|
|
446
|
+
codemie doctor
|
|
447
|
+
```
|
|
801
448
|
|
|
802
|
-
|
|
449
|
+
---
|
|
803
450
|
|
|
804
|
-
|
|
805
|
-
2. Create a feature branch
|
|
806
|
-
3. Make your changes
|
|
807
|
-
4. Add tests if applicable
|
|
808
|
-
5. Submit a pull request
|
|
451
|
+
## 🐛 Troubleshooting
|
|
809
452
|
|
|
810
|
-
###
|
|
453
|
+
### Command not found after installation
|
|
811
454
|
|
|
455
|
+
Re-link the package:
|
|
812
456
|
```bash
|
|
813
|
-
# Clone repository
|
|
814
|
-
git clone https://github.com/codemie-ai/codemie-code.git
|
|
815
|
-
cd codemie-code
|
|
816
|
-
|
|
817
|
-
# Install dependencies
|
|
818
|
-
npm install
|
|
819
|
-
|
|
820
|
-
# Build
|
|
821
|
-
npm run build
|
|
822
|
-
|
|
823
|
-
# Watch mode (for development)
|
|
824
|
-
npm run dev
|
|
825
|
-
|
|
826
|
-
# Test locally
|
|
827
457
|
npm link
|
|
828
|
-
codemie
|
|
458
|
+
which codemie
|
|
829
459
|
```
|
|
830
460
|
|
|
831
|
-
###
|
|
461
|
+
### Configuration not found
|
|
832
462
|
|
|
463
|
+
Run the setup wizard:
|
|
833
464
|
```bash
|
|
834
|
-
|
|
835
|
-
|
|
465
|
+
codemie setup
|
|
466
|
+
```
|
|
836
467
|
|
|
837
|
-
|
|
838
|
-
|
|
468
|
+
Or check your configuration:
|
|
469
|
+
```bash
|
|
470
|
+
codemie config list
|
|
471
|
+
```
|
|
839
472
|
|
|
840
|
-
|
|
841
|
-
npm test -- path/to/test
|
|
473
|
+
### Agent installation fails
|
|
842
474
|
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
475
|
+
Check your internet connection and try again:
|
|
476
|
+
```bash
|
|
477
|
+
codemie install <agent>
|
|
846
478
|
```
|
|
847
479
|
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
## 📄 License
|
|
480
|
+
### Connection issues
|
|
851
481
|
|
|
852
|
-
|
|
482
|
+
Verify your configuration:
|
|
483
|
+
```bash
|
|
484
|
+
codemie doctor
|
|
485
|
+
```
|
|
853
486
|
|
|
854
487
|
---
|
|
855
488
|
|
|
856
|
-
##
|
|
489
|
+
## 📄 License
|
|
857
490
|
|
|
858
|
-
-
|
|
859
|
-
- Inspired by [Aider](https://github.com/paul-gauthier/aider) and [Claude Code](https://claude.com/code)
|
|
860
|
-
- CLI framework by [Commander.js](https://github.com/tj/commander.js)
|
|
861
|
-
- MCP specification by [Anthropic](https://github.com/modelcontextprotocol/specification)
|
|
491
|
+
Apache-2.0
|
|
862
492
|
|
|
863
493
|
---
|
|
864
494
|
|
|
865
|
-
##
|
|
495
|
+
## 🤝 Contributing
|
|
866
496
|
|
|
867
|
-
|
|
868
|
-
- 🐛 Report bugs via [GitHub Issues](https://github.com/codemie-ai/codemie-code/issues)
|
|
869
|
-
- 💬 Ask questions in [Discussions](https://github.com/codemie-ai/codemie-code/discussions)
|
|
870
|
-
- 📖 Read the full [User Guide](docs/USER_GUIDE.md)
|
|
497
|
+
Contributions are welcome! Please read our contributing guidelines before submitting PRs.
|
|
871
498
|
|
|
872
499
|
---
|
|
873
500
|
|
|
874
|
-
##
|
|
875
|
-
|
|
876
|
-
### Essential Commands
|
|
877
|
-
|
|
878
|
-
```bash
|
|
879
|
-
# Setup
|
|
880
|
-
export CODEMIE_BASE_URL="https://your-ai-proxy.com"
|
|
881
|
-
export CODEMIE_AUTH_TOKEN="your-token"
|
|
882
|
-
export CODEMIE_MODEL="claude-4-5-sonnet"
|
|
883
|
-
|
|
884
|
-
# Verify
|
|
885
|
-
codemie doctor
|
|
886
|
-
codemie-code test
|
|
887
|
-
|
|
888
|
-
# Start coding
|
|
889
|
-
codemie-code
|
|
890
|
-
codemie-code /path/to/project
|
|
891
|
-
codemie-code exec "task description"
|
|
892
|
-
|
|
893
|
-
# MCP
|
|
894
|
-
codemie-code mcp list
|
|
895
|
-
codemie-code --mcp-servers time,context7
|
|
896
|
-
|
|
897
|
-
# CLI Wrapper
|
|
898
|
-
codemie list
|
|
899
|
-
codemie install claude-code
|
|
900
|
-
codemie run claude-code
|
|
901
|
-
```
|
|
902
|
-
|
|
903
|
-
### Common Tasks
|
|
904
|
-
|
|
905
|
-
| What you want | Command |
|
|
906
|
-
|---------------|---------|
|
|
907
|
-
| Start interactive coding | `codemie-code` |
|
|
908
|
-
| Execute single task | `codemie-code exec "task"` |
|
|
909
|
-
| Test connection | `codemie-code test` |
|
|
910
|
-
| Check system health | `codemie doctor` |
|
|
911
|
-
| List MCP servers | `codemie-code mcp list` |
|
|
912
|
-
| Install agent | `codemie install <agent>` |
|
|
913
|
-
| Show versions | `codemie version` |
|
|
914
|
-
|
|
915
|
-
---
|
|
501
|
+
## 🔗 Links
|
|
916
502
|
|
|
917
|
-
|
|
503
|
+
- [GitHub Repository](https://github.com/codemie-ai/codemie-code)
|
|
504
|
+
- [Issue Tracker](https://github.com/codemie-ai/codemie-code/issues)
|
|
505
|
+
- [NPM Package](https://www.npmjs.com/package/@codemieai/code)
|