@codemieai/code 0.0.1 → 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.
Files changed (244) hide show
  1. package/.codemie/guides/git-workflow.md +493 -0
  2. package/CLAUDE.md +130 -761
  3. package/README.md +283 -695
  4. package/bin/codemie-claude.js +122 -0
  5. package/bin/codemie-code.js +90 -15
  6. package/bin/codemie-codex.js +138 -0
  7. package/bin/codemie.js +1 -1
  8. package/config.example.json +10 -0
  9. package/dist/agents/adapters/claude-code.d.ts +2 -2
  10. package/dist/agents/adapters/claude-code.d.ts.map +1 -1
  11. package/dist/agents/adapters/claude-code.js +20 -42
  12. package/dist/agents/adapters/claude-code.js.map +1 -1
  13. package/dist/agents/adapters/codemie-code.d.ts +11 -2
  14. package/dist/agents/adapters/codemie-code.d.ts.map +1 -1
  15. package/dist/agents/adapters/codemie-code.js +93 -25
  16. package/dist/agents/adapters/codemie-code.js.map +1 -1
  17. package/dist/agents/adapters/codex.d.ts +2 -2
  18. package/dist/agents/adapters/codex.d.ts.map +1 -1
  19. package/dist/agents/adapters/codex.js +31 -24
  20. package/dist/agents/adapters/codex.js.map +1 -1
  21. package/dist/agents/codemie-code/agent.d.ts +89 -0
  22. package/dist/agents/codemie-code/agent.d.ts.map +1 -0
  23. package/dist/agents/codemie-code/agent.js +523 -0
  24. package/dist/agents/codemie-code/agent.js.map +1 -0
  25. package/dist/agents/codemie-code/config.d.ts +40 -0
  26. package/dist/agents/codemie-code/config.d.ts.map +1 -0
  27. package/dist/agents/codemie-code/config.js +276 -0
  28. package/dist/agents/codemie-code/config.js.map +1 -0
  29. package/dist/agents/codemie-code/filters.d.ts +91 -0
  30. package/dist/agents/codemie-code/filters.d.ts.map +1 -0
  31. package/dist/agents/codemie-code/filters.js +328 -0
  32. package/dist/agents/codemie-code/filters.js.map +1 -0
  33. package/dist/agents/codemie-code/index.d.ts +78 -0
  34. package/dist/agents/codemie-code/index.d.ts.map +1 -0
  35. package/dist/agents/codemie-code/index.js +259 -0
  36. package/dist/agents/codemie-code/index.js.map +1 -0
  37. package/dist/agents/codemie-code/prompts.d.ts +11 -0
  38. package/dist/agents/codemie-code/prompts.d.ts.map +1 -0
  39. package/dist/agents/codemie-code/prompts.js +31 -0
  40. package/dist/agents/codemie-code/prompts.js.map +1 -0
  41. package/dist/agents/codemie-code/streaming/events.d.ts +7 -0
  42. package/dist/agents/codemie-code/streaming/events.d.ts.map +1 -0
  43. package/dist/agents/codemie-code/streaming/events.js +7 -0
  44. package/dist/agents/codemie-code/streaming/events.js.map +1 -0
  45. package/dist/agents/codemie-code/streaming/formatter.d.ts +2 -0
  46. package/dist/agents/codemie-code/streaming/formatter.d.ts.map +1 -0
  47. package/dist/agents/codemie-code/streaming/formatter.js +2 -0
  48. package/dist/agents/codemie-code/streaming/formatter.js.map +1 -0
  49. package/dist/agents/codemie-code/streaming/ui.d.ts +2 -0
  50. package/dist/agents/codemie-code/streaming/ui.d.ts.map +1 -0
  51. package/dist/agents/codemie-code/streaming/ui.js +2 -0
  52. package/dist/agents/codemie-code/streaming/ui.js.map +1 -0
  53. package/dist/agents/codemie-code/tokenUtils.d.ts +108 -0
  54. package/dist/agents/codemie-code/tokenUtils.d.ts.map +1 -0
  55. package/dist/agents/codemie-code/tokenUtils.js +220 -0
  56. package/dist/agents/codemie-code/tokenUtils.js.map +1 -0
  57. package/dist/agents/codemie-code/toolMetadata.d.ts +15 -0
  58. package/dist/agents/codemie-code/toolMetadata.d.ts.map +1 -0
  59. package/dist/agents/codemie-code/toolMetadata.js +315 -0
  60. package/dist/agents/codemie-code/toolMetadata.js.map +1 -0
  61. package/dist/agents/codemie-code/tools/command.d.ts +2 -0
  62. package/dist/agents/codemie-code/tools/command.d.ts.map +1 -0
  63. package/dist/agents/codemie-code/tools/command.js +2 -0
  64. package/dist/agents/codemie-code/tools/command.js.map +1 -0
  65. package/dist/agents/codemie-code/tools/filesystem.d.ts +2 -0
  66. package/dist/agents/codemie-code/tools/filesystem.d.ts.map +1 -0
  67. package/dist/agents/codemie-code/tools/filesystem.js +2 -0
  68. package/dist/agents/codemie-code/tools/filesystem.js.map +1 -0
  69. package/dist/agents/codemie-code/tools/git.d.ts +2 -0
  70. package/dist/agents/codemie-code/tools/git.d.ts.map +1 -0
  71. package/dist/agents/codemie-code/tools/git.js +2 -0
  72. package/dist/agents/codemie-code/tools/git.js.map +1 -0
  73. package/dist/agents/codemie-code/tools/index.d.ts +19 -0
  74. package/dist/agents/codemie-code/tools/index.d.ts.map +1 -0
  75. package/dist/agents/codemie-code/tools/index.js +239 -0
  76. package/dist/agents/codemie-code/tools/index.js.map +1 -0
  77. package/dist/agents/codemie-code/tools/security.d.ts +2 -0
  78. package/dist/agents/codemie-code/tools/security.d.ts.map +1 -0
  79. package/dist/agents/codemie-code/tools/security.js +2 -0
  80. package/dist/agents/codemie-code/tools/security.js.map +1 -0
  81. package/dist/agents/codemie-code/types.d.ts +254 -0
  82. package/dist/agents/codemie-code/types.d.ts.map +1 -0
  83. package/dist/agents/codemie-code/types.js +35 -0
  84. package/dist/agents/codemie-code/types.js.map +1 -0
  85. package/dist/agents/codemie-code/ui.d.ts +83 -0
  86. package/dist/agents/codemie-code/ui.d.ts.map +1 -0
  87. package/dist/agents/codemie-code/ui.js +624 -0
  88. package/dist/agents/codemie-code/ui.js.map +1 -0
  89. package/dist/agents/registry.d.ts +1 -1
  90. package/dist/agents/registry.d.ts.map +1 -1
  91. package/dist/agents/registry.js +7 -13
  92. package/dist/agents/registry.js.map +1 -1
  93. package/dist/cli/commands/config.d.ts +3 -0
  94. package/dist/cli/commands/config.d.ts.map +1 -0
  95. package/dist/cli/commands/config.js +323 -0
  96. package/dist/cli/commands/config.js.map +1 -0
  97. package/dist/cli/commands/doctor.d.ts.map +1 -1
  98. package/dist/cli/commands/doctor.js +113 -69
  99. package/dist/cli/commands/doctor.js.map +1 -1
  100. package/dist/cli/commands/env.d.ts +3 -0
  101. package/dist/cli/commands/env.d.ts.map +1 -0
  102. package/dist/cli/commands/env.js +19 -0
  103. package/dist/cli/commands/env.js.map +1 -0
  104. package/dist/cli/commands/install.js +27 -33
  105. package/dist/cli/commands/install.js.map +1 -1
  106. package/dist/cli/commands/list.js +18 -24
  107. package/dist/cli/commands/list.js.map +1 -1
  108. package/dist/cli/commands/run.d.ts.map +1 -1
  109. package/dist/cli/commands/run.js +307 -21
  110. package/dist/cli/commands/run.js.map +1 -1
  111. package/dist/cli/commands/setup.d.ts +3 -0
  112. package/dist/cli/commands/setup.d.ts.map +1 -0
  113. package/dist/cli/commands/setup.js +357 -0
  114. package/dist/cli/commands/setup.js.map +1 -0
  115. package/dist/cli/commands/uninstall.js +24 -30
  116. package/dist/cli/commands/uninstall.js.map +1 -1
  117. package/dist/cli/commands/version.d.ts.map +1 -1
  118. package/dist/cli/commands/version.js +11 -16
  119. package/dist/cli/commands/version.js.map +1 -1
  120. package/dist/cli/index.js +47 -31
  121. package/dist/cli/index.js.map +1 -1
  122. package/dist/env/manager.js +9 -46
  123. package/dist/env/manager.js.map +1 -1
  124. package/dist/index.d.ts +6 -13
  125. package/dist/index.d.ts.map +1 -1
  126. package/dist/index.js +6 -43
  127. package/dist/index.js.map +1 -1
  128. package/dist/utils/async-tips.d.ts.map +1 -1
  129. package/dist/utils/async-tips.js +16 -55
  130. package/dist/utils/async-tips.js.map +1 -1
  131. package/dist/utils/clipboard.d.ts +16 -0
  132. package/dist/utils/clipboard.d.ts.map +1 -0
  133. package/dist/utils/clipboard.js +179 -0
  134. package/dist/utils/clipboard.js.map +1 -0
  135. package/dist/utils/config-loader.d.ts +96 -0
  136. package/dist/utils/config-loader.d.ts.map +1 -0
  137. package/dist/utils/config-loader.js +351 -0
  138. package/dist/utils/config-loader.js.map +1 -0
  139. package/dist/utils/dirname.d.ts +7 -0
  140. package/dist/utils/dirname.d.ts.map +1 -0
  141. package/dist/utils/dirname.js +11 -0
  142. package/dist/utils/dirname.js.map +1 -0
  143. package/dist/utils/errors.js +7 -17
  144. package/dist/utils/errors.js.map +1 -1
  145. package/dist/utils/exec.js +3 -6
  146. package/dist/utils/exec.js.map +1 -1
  147. package/dist/utils/first-time.d.ts +34 -0
  148. package/dist/utils/first-time.d.ts.map +1 -0
  149. package/dist/utils/first-time.js +245 -0
  150. package/dist/utils/first-time.js.map +1 -0
  151. package/dist/utils/health-checker.d.ts +20 -0
  152. package/dist/utils/health-checker.d.ts.map +1 -0
  153. package/dist/utils/health-checker.js +168 -0
  154. package/dist/utils/health-checker.js.map +1 -0
  155. package/dist/utils/logger.js +12 -18
  156. package/dist/utils/logger.js.map +1 -1
  157. package/dist/utils/model-fetcher.d.ts +21 -0
  158. package/dist/utils/model-fetcher.d.ts.map +1 -0
  159. package/dist/utils/model-fetcher.js +137 -0
  160. package/dist/utils/model-fetcher.js.map +1 -0
  161. package/dist/utils/tips.d.ts.map +1 -1
  162. package/dist/utils/tips.js +13 -52
  163. package/dist/utils/tips.js.map +1 -1
  164. package/package.json +17 -23
  165. package/scripts/README.md +80 -0
  166. package/scripts/release.sh +156 -0
  167. package/dist/agents/adapters/aider.d.ts +0 -12
  168. package/dist/agents/adapters/aider.d.ts.map +0 -1
  169. package/dist/agents/adapters/aider.js +0 -80
  170. package/dist/agents/adapters/aider.js.map +0 -1
  171. package/dist/cli/cli.d.ts +0 -4
  172. package/dist/cli/cli.d.ts.map +0 -1
  173. package/dist/cli/cli.js +0 -107
  174. package/dist/cli/cli.js.map +0 -1
  175. package/dist/cli/commands/mcp.d.ts +0 -3
  176. package/dist/cli/commands/mcp.d.ts.map +0 -1
  177. package/dist/cli/commands/mcp.js +0 -459
  178. package/dist/cli/commands/mcp.js.map +0 -1
  179. package/dist/code/agent-events.d.ts +0 -39
  180. package/dist/code/agent-events.d.ts.map +0 -1
  181. package/dist/code/agent-events.js +0 -4
  182. package/dist/code/agent-events.js.map +0 -1
  183. package/dist/code/agent.d.ts +0 -19
  184. package/dist/code/agent.d.ts.map +0 -1
  185. package/dist/code/agent.js +0 -144
  186. package/dist/code/agent.js.map +0 -1
  187. package/dist/code/config.d.ts +0 -13
  188. package/dist/code/config.d.ts.map +0 -1
  189. package/dist/code/config.js +0 -41
  190. package/dist/code/config.js.map +0 -1
  191. package/dist/code/index.d.ts +0 -19
  192. package/dist/code/index.d.ts.map +0 -1
  193. package/dist/code/index.js +0 -400
  194. package/dist/code/index.js.map +0 -1
  195. package/dist/code/prompts.d.ts +0 -2
  196. package/dist/code/prompts.d.ts.map +0 -1
  197. package/dist/code/prompts.js +0 -45
  198. package/dist/code/prompts.js.map +0 -1
  199. package/dist/code/tools/command.d.ts +0 -8
  200. package/dist/code/tools/command.d.ts.map +0 -1
  201. package/dist/code/tools/command.js +0 -83
  202. package/dist/code/tools/command.js.map +0 -1
  203. package/dist/code/tools/diff-utils.d.ts +0 -2
  204. package/dist/code/tools/diff-utils.d.ts.map +0 -1
  205. package/dist/code/tools/diff-utils.js +0 -45
  206. package/dist/code/tools/diff-utils.js.map +0 -1
  207. package/dist/code/tools/filesystem.d.ts +0 -11
  208. package/dist/code/tools/filesystem.d.ts.map +0 -1
  209. package/dist/code/tools/filesystem.js +0 -442
  210. package/dist/code/tools/filesystem.js.map +0 -1
  211. package/dist/code/tools/git.d.ts +0 -7
  212. package/dist/code/tools/git.d.ts.map +0 -1
  213. package/dist/code/tools/git.js +0 -111
  214. package/dist/code/tools/git.js.map +0 -1
  215. package/dist/code/tools/mcp.d.ts +0 -13
  216. package/dist/code/tools/mcp.d.ts.map +0 -1
  217. package/dist/code/tools/mcp.js +0 -230
  218. package/dist/code/tools/mcp.js.map +0 -1
  219. package/dist/data/tips.json +0 -118
  220. package/dist/ui/terminal-ui.d.ts +0 -73
  221. package/dist/ui/terminal-ui.d.ts.map +0 -1
  222. package/dist/ui/terminal-ui.js +0 -900
  223. package/dist/ui/terminal-ui.js.map +0 -1
  224. package/dist/utils/env-mapper.d.ts +0 -40
  225. package/dist/utils/env-mapper.d.ts.map +0 -1
  226. package/dist/utils/env-mapper.js +0 -122
  227. package/dist/utils/env-mapper.js.map +0 -1
  228. package/docs/USER_GUIDE.md +0 -573
  229. package/tests/agent-direct.test.mjs +0 -45
  230. package/tests/agent-output.test.mjs +0 -64
  231. package/tests/codemie-code.test.mjs +0 -42
  232. package/tests/context7-only.test.mjs +0 -42
  233. package/tests/conversation-flow.test.mjs +0 -63
  234. package/tests/interactive-simulation.test.mjs +0 -60
  235. package/tests/live-output.test.mjs +0 -53
  236. package/tests/mcp-context7.test.mjs +0 -105
  237. package/tests/mcp-e2e.test.mjs +0 -109
  238. package/tests/mcp-time-server.test.mjs +0 -58
  239. package/tests/streaming.test.mjs +0 -57
  240. package/tests/test-helpers.mjs +0 -94
  241. package/tests/text-wrapping.test.mjs +0 -33
  242. package/tests/tool-count.test.mjs +0 -81
  243. package/tests/ui-format.test.mjs +0 -39
  244. package/tests/ui-state.test.mjs +0 -72
package/README.md CHANGED
@@ -1,20 +1,19 @@
1
- # CodeMie Code
1
+ # CodeMie
2
2
 
3
- > AI coding assistant and CLI wrapper for managing multiple AI coding agents
3
+ > CLI wrapper for managing multiple AI coding agents
4
4
 
5
- CodeMie Code is a unified npm package that provides both a built-in AI coding assistant and a CLI wrapper for managing multiple AI coding agents (Claude Code, Aider, Codex, etc.).
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
- - 🤖 **Built-in AI Assistant** - Ready-to-use coding assistant powered by any AI provider
10
- - 🔧 **CLI Wrapper** - Manage and run multiple AI coding agents from one interface
11
- - 🛠️ **Complete Toolset** - 15 tools including filesystem operations, git commands, and code execution
12
- - 🔌 **MCP Support** - Model Context Protocol integration for extensible tool support
13
- - 🔒 **Security First** - Path validation, symlink protection, and command sanitization
14
- - 📝 **Diff-based Editing** - Smart file editing with indentation preservation
15
- - 🌐 **Provider Agnostic** - Works with any AI provider (OpenAI, Anthropic, Azure, etc.)
16
- - 🎯 **Project-aware** - Operates within allowed directories with ignore patterns
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 commands are available
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
- ### 1. Set Up Environment Variables
59
+ ### Installation Setup Use
62
60
 
63
- CodeMie Code requires AI provider credentials:
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
- ### 3. Start the Assistant
67
+ ### Step 1: Install
98
68
 
99
69
  ```bash
100
- # In current directory
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
- ### Required Environment Variables
75
+ #### Method A: Interactive Setup Wizard (Recommended)
132
76
 
133
- | Variable | Description | Example |
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
- # Enable debug logging
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
- #### MCP Configuration
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
- Configure MCP (Model Context Protocol) servers in `~/.codemie/config.json`:
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
- ```json
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
- Or use environment variable to specify which servers to load:
100
+ Best for automated setups or when you have credentials ready:
174
101
 
175
102
  ```bash
176
- # Load specific MCP servers
177
- export CODEMIE_MCP_SERVERS="context7,time"
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
- When no `--mcp-servers` flag is provided, all servers configured in `~/.codemie/config.json` are loaded automatically.
107
+ ### Step 3: Use Agents
185
108
 
186
- ### Configuration Methods
109
+ #### Try the Built-in Agent (Recommended for New Users)
187
110
 
188
- #### Method 1: Shell Environment (Recommended)
111
+ **CodeMie Native** is built-in and ready to use immediately:
189
112
 
190
113
  ```bash
191
- # Add to ~/.bashrc or ~/.zshrc
192
- export CODEMIE_BASE_URL="https://your-ai-proxy.com"
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
- ```bash
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
- #### Method 3: Inline
120
+ # Execute single task
121
+ codemie-code --task "Help me debug this error"
216
122
 
217
- ```bash
218
- CODEMIE_BASE_URL="https://your-ai-proxy.com" \
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
- ### Advanced: Provider-Specific Configuration
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
- export ANTHROPIC_BASE_URL="https://api.anthropic.com"
231
- export ANTHROPIC_AUTH_TOKEN="your-anthropic-token"
232
- export ANTHROPIC_MODEL="claude-4-5-sonnet"
233
- ```
130
+ # Install Claude Code
131
+ codemie install claude
234
132
 
235
- **For OpenAI GPT:**
236
- ```bash
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
- **Configuration Priority:**
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
- # Interactive mode (default)
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
- ### MCP Server Management
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
- # Remove server
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
- codemie-code mcp add time uvx -a "mcp-server-time"
326
- codemie-code --mcp-servers time
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
- **Context7** - Access up-to-date library documentation:
332
- ```bash
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
- # Then ask: "Show me LangChain documentation for chains"
154
+ # Run Codex
155
+ codemie run codex
337
156
  ```
338
157
 
339
- ### CLI Wrapper (codemie)
158
+ **Automatic Model Validation:**
340
159
 
341
- Manage multiple AI coding agents from one interface.
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
- #### List Available Agents
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
- ```bash
346
- codemie list # List all agents
347
- codemie list --installed # List only installed agents
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
- #### Install Agents
177
+ ---
351
178
 
352
- ```bash
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
- #### Run Agents
181
+ ### Core Commands
359
182
 
360
183
  ```bash
361
- # Run built-in CodeMie Code
362
- codemie run codemie-code
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
- # With custom model
370
- codemie run codemie-code --model claude-opus
187
+ # Environment configuration guide
188
+ codemie env
371
189
 
372
- # Pass additional arguments
373
- codemie run aider --no-auto-commits
374
- ```
190
+ # List all available agents
191
+ codemie list
375
192
 
376
- #### Uninstall Agents
193
+ # Install an agent
194
+ codemie install <agent>
377
195
 
378
- ```bash
379
- codemie uninstall claude-code
380
- codemie uninstall aider
381
- ```
196
+ # Uninstall an agent
197
+ codemie uninstall <agent>
382
198
 
383
- #### Health Check
199
+ # Run an agent
200
+ codemie run <agent>
384
201
 
385
- ```bash
202
+ # Check installation and configuration
386
203
  codemie doctor
387
- ```
388
204
 
389
- Checks:
390
- - Node.js version (>= 24.0.0)
391
- - ✅ npm installation
392
- - ✅ git availability
393
- - ✅ Environment variables configuration
394
- - ✅ Installed agents
205
+ # Manage configuration
206
+ codemie config [options]
395
207
 
396
- #### Version Information
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
- ### MCP Tools (Extensible)
440
-
441
- MCP (Model Context Protocol) enables dynamic tool loading from external servers:
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 Code implements multiple security layers:
218
+ # CodeMie Native - Single task execution
219
+ codemie-code --task "Your task here"
465
220
 
466
- ### Filesystem Security
221
+ # CodeMie Native - With initial message
222
+ codemie-code "Your initial message"
467
223
 
468
- **Path Validation**
469
- - All paths validated against allowed directories
470
- - No directory traversal attacks (../)
471
- - Absolute path resolution
224
+ # CodeMie Native - Health check
225
+ codemie-code health
472
226
 
473
- **Symlink Protection**
474
- - Symlinks resolved and validated
475
- - Target paths must be within allowed directories
227
+ # CodeMie Native - Debug mode
228
+ codemie-code --debug
229
+ ```
476
230
 
477
- **Ignore Patterns**
478
- - Automatically excludes sensitive directories
479
- - Default: `node_modules`, `.git`, `__pycache__`, `.venv`, `dist`, `build`
231
+ ### Direct Agent Shortcuts
480
232
 
481
- ### Command Security
233
+ Quick access to external agents with configuration overrides:
482
234
 
483
- The `execute_command` tool blocks dangerous patterns:
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
- ```typescript
486
- 🚫 rm -rf / // Recursive delete on root
487
- 🚫 mkfs // Filesystem formatting
488
- 🚫 dd if= // Disk operations
489
- 🚫 wget ... | sh // Download and execute
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
- ### Security Best Practices
499
-
500
- 1. **Set Allowed Directories**: Only the working directory is accessible
501
- 2. **Review Changes**: Always review diffs before applying
502
- 3. **Use Version Control**: Work in git repositories
503
- 4. **Test in Isolation**: Test in separate environments first
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
- ### Example 1: Code Review
256
+ ### Configuration Commands
510
257
 
511
258
  ```bash
512
- codemie-code
259
+ # Set a configuration value
260
+ codemie config set <key> <value>
513
261
 
514
- You: Read src/utils/helper.ts and review the code
515
- Assistant: [Reads file, provides detailed review with suggestions]
262
+ # Get a configuration value
263
+ codemie config get <key>
516
264
 
517
- You: Create a test file for this module
518
- Assistant: [Creates tests/utils/helper.test.ts with test cases]
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
- You: Read Button.tsx and refactor it to use hooks
528
- Assistant: [Shows diff with proposed changes]
268
+ # Reset configuration
269
+ codemie config reset
529
270
 
530
- You: Apply those changes
531
- Assistant: [Applies edits and shows confirmation]
271
+ # Advanced: Change timeout (default: 300 seconds)
272
+ codemie config set timeout 600
532
273
  ```
533
274
 
534
- ### Example 3: Git Workflow
275
+ ---
535
276
 
536
- ```bash
537
- You: Show me the current git status
538
- Assistant: [Shows modified, staged, and untracked files]
277
+ ## ⚙️ Configuration
539
278
 
540
- You: Show diff for src/app.ts
541
- Assistant: [Displays git diff]
279
+ CodeMie stores configuration in `~/.codemie/config.json`:
542
280
 
543
- You: Show the last 5 commits
544
- Assistant: [Shows commit history]
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
- ### Example 4: Project Setup
293
+ ### Supported Providers
548
294
 
549
- ```bash
550
- You: Create a new directory called "api"
551
- Assistant: [Creates directory]
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
- You: Create index.ts in api/ with a basic Express setup
554
- Assistant: [Creates file with boilerplate code]
301
+ ### Environment Variables
555
302
 
556
- You: Create a README.md in api/ documenting the API
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
- You: Search for all files containing "TODO"
564
- Assistant: [Lists files with TODO comments]
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
- You: Read components/Header.tsx
567
- Assistant: [Shows file content]
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
- You: Replace the TODO with an implementation
570
- Assistant: [Shows diff and applies changes]
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
- ## 🐛 Troubleshooting
576
-
577
- ### Common Issues
324
+ ## 🤖 Supported Agents
578
325
 
579
- #### "Base URL not configured"
326
+ ### CodeMie Native (Built-in)
580
327
 
581
- **Solution:**
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
- **Solution:**
330
+ **Usage:**
596
331
  ```bash
597
- # Verify URL is accessible
598
- curl -I $CODEMIE_BASE_URL
332
+ # Interactive mode
333
+ codemie run codemie-code
599
334
 
600
- # Check environment variables
601
- echo $CODEMIE_BASE_URL
602
- echo $CODEMIE_AUTH_TOKEN
603
- echo $CODEMIE_MODEL
335
+ # Direct executable (alternative)
336
+ codemie-code
604
337
 
605
- # Run doctor
606
- codemie doctor
338
+ # Single task execution
339
+ codemie-code --task "Fix the bug in utils.js"
607
340
 
608
- # Try test again
609
- codemie-code test
341
+ # With initial message
342
+ codemie-code "Help me refactor this component"
610
343
  ```
611
344
 
612
- #### "Command not found: codemie"
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
- **Solution:**
355
+ **Direct Commands:**
615
356
  ```bash
616
- # Re-install globally
617
- npm install -g @codemieai/code
357
+ # Health check
358
+ codemie-code health
618
359
 
619
- # Or re-link the package (from source)
620
- cd /path/to/codemie-code
621
- npm link
360
+ # Interactive mode with debug
361
+ codemie-code --debug
622
362
 
623
- # Verify
624
- which codemie
625
- which codemie-code
363
+ # Execute task and exit
364
+ codemie-code --task "Run tests and fix any failures"
626
365
  ```
627
366
 
628
- #### "Path outside allowed directories"
367
+ ### Claude Code
629
368
 
630
- **Solution:**
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
- # Start in the correct directory
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
- #### Environment Variables Not Loaded
376
+ **Features:**
377
+ - Advanced code understanding
378
+ - Multi-file editing
379
+ - Interactive conversations
380
+ - Project-aware context
643
381
 
644
- ```bash
645
- # Verify variables are set
646
- env | grep CODEMIE_
382
+ ### Codex
647
383
 
648
- # If empty, reload shell profile
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
- export CODEMIE_DEBUG="true"
663
- codemie-code
388
+ codemie install codex
664
389
  ```
665
390
 
666
- Debug mode shows:
667
- - Tool initialization details
668
- - AI request/response info
669
- - File operation details
670
- - Error stack traces
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
- ```bash
677
- # Clean build
678
- rm -rf dist/ node_modules/
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
- # Re-link
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
- ## 📊 Architecture
405
+ ## 🛠️ Development
689
406
 
690
- ### Package Structure
407
+ ### Project Structure
691
408
 
692
409
  ```
693
410
  codemie-code/
694
411
  ├── bin/
695
- ├── codemie-code.js # AI assistant entry point
696
- │ └── codemie.js # CLI wrapper entry point
697
-
412
+ └── codemie.js # CLI entry point
698
413
  ├── src/
699
- │ ├── code/ # CodeMie Code Assistant
700
- │ │ ├── index.ts # Main assistant class
701
- │ │ ├── agent.ts # LangChain ReAct agent
702
- ├── agent-events.ts # Event system for streaming
703
- │ │ ├── config.ts # Configuration loader
704
- │ │ ├── prompts.ts # System prompts
705
- │ └── tools/ # Tool implementations
706
- │ ├── filesystem.ts # 10 filesystem tools
707
- │ │ ├── git.ts # 4 git tools
708
- │ │ ├── command.ts # Command execution
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
- ### Technology Stack
426
+ ### Building
756
427
 
757
- - **Language**: TypeScript (ES2022, NodeNext modules)
758
- - **Runtime**: Node.js >= 24.0.0 (LTS Krypton)
759
- - **Package Manager**: npm
760
- - **LLM Framework**: LangChain 1.x (`@langchain/core`, `@langchain/langgraph`, `@langchain/openai`)
761
- - **LLM Provider**: Any OpenAI-compatible API
762
- - **CLI Framework**: Commander.js
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
- ## 🔄 Roadmap
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
- ## 🤝 Contributing
443
+ # Test commands
444
+ codemie --help
445
+ codemie list
446
+ codemie doctor
447
+ ```
801
448
 
802
- Contributions are welcome! Please:
449
+ ---
803
450
 
804
- 1. Fork the repository
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
- ### Development Setup
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 doctor
458
+ which codemie
829
459
  ```
830
460
 
831
- ### Running Tests
461
+ ### Configuration not found
832
462
 
463
+ Run the setup wizard:
833
464
  ```bash
834
- # Run all tests
835
- npm test
465
+ codemie setup
466
+ ```
836
467
 
837
- # Run with coverage
838
- npm run test:coverage
468
+ Or check your configuration:
469
+ ```bash
470
+ codemie config list
471
+ ```
839
472
 
840
- # Run specific test
841
- npm test -- path/to/test
473
+ ### Agent installation fails
842
474
 
843
- # Manual integration tests
844
- node tests/test-streaming.js
845
- node tests/test-agent-direct.js
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
- MIT License - see LICENSE file for details
482
+ Verify your configuration:
483
+ ```bash
484
+ codemie doctor
485
+ ```
853
486
 
854
487
  ---
855
488
 
856
- ## 🙏 Acknowledgments
489
+ ## 📄 License
857
490
 
858
- - Built with [LangChain](https://js.langchain.com/)
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
- ## 📞 Support
495
+ ## 🤝 Contributing
866
496
 
867
- For issues, questions, or contributions:
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
- ## Quick Reference
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
- **Made with ❤️ by the CodeMie Team**
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)