@codemieai/code 0.0.2 → 0.0.4

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 (360) hide show
  1. package/README.md +357 -719
  2. package/bin/codemie-claude.js +145 -0
  3. package/bin/codemie-code.js +128 -15
  4. package/bin/codemie-codex.js +137 -0
  5. package/bin/codemie.js +1 -1
  6. package/dist/agents/adapters/claude-code.d.ts +7 -2
  7. package/dist/agents/adapters/claude-code.d.ts.map +1 -1
  8. package/dist/agents/adapters/claude-code.js +94 -58
  9. package/dist/agents/adapters/claude-code.js.map +1 -1
  10. package/dist/agents/adapters/codemie-code.d.ts +11 -2
  11. package/dist/agents/adapters/codemie-code.d.ts.map +1 -1
  12. package/dist/agents/adapters/codemie-code.js +93 -25
  13. package/dist/agents/adapters/codemie-code.js.map +1 -1
  14. package/dist/agents/adapters/codex.d.ts +7 -2
  15. package/dist/agents/adapters/codex.d.ts.map +1 -1
  16. package/dist/agents/adapters/codex.js +104 -39
  17. package/dist/agents/adapters/codex.js.map +1 -1
  18. package/dist/agents/codemie-code/agent.d.ts +89 -0
  19. package/dist/agents/codemie-code/agent.d.ts.map +1 -0
  20. package/dist/agents/codemie-code/agent.js +689 -0
  21. package/dist/agents/codemie-code/agent.js.map +1 -0
  22. package/dist/agents/codemie-code/config.d.ts +40 -0
  23. package/dist/agents/codemie-code/config.d.ts.map +1 -0
  24. package/dist/agents/codemie-code/config.js +278 -0
  25. package/dist/agents/codemie-code/config.js.map +1 -0
  26. package/dist/agents/codemie-code/filters.d.ts +91 -0
  27. package/dist/agents/codemie-code/filters.d.ts.map +1 -0
  28. package/dist/agents/codemie-code/filters.js +328 -0
  29. package/dist/agents/codemie-code/filters.js.map +1 -0
  30. package/dist/agents/codemie-code/index.d.ts +92 -0
  31. package/dist/agents/codemie-code/index.d.ts.map +1 -0
  32. package/dist/agents/codemie-code/index.js +327 -0
  33. package/dist/agents/codemie-code/index.js.map +1 -0
  34. package/dist/agents/codemie-code/modes/contextAwarePlanning.d.ts +87 -0
  35. package/dist/agents/codemie-code/modes/contextAwarePlanning.d.ts.map +1 -0
  36. package/dist/agents/codemie-code/modes/contextAwarePlanning.js +957 -0
  37. package/dist/agents/codemie-code/modes/contextAwarePlanning.js.map +1 -0
  38. package/dist/agents/codemie-code/modes/planMode.d.ts +116 -0
  39. package/dist/agents/codemie-code/modes/planMode.d.ts.map +1 -0
  40. package/dist/agents/codemie-code/modes/planMode.js +537 -0
  41. package/dist/agents/codemie-code/modes/planMode.js.map +1 -0
  42. package/dist/agents/codemie-code/prompts.d.ts +40 -0
  43. package/dist/agents/codemie-code/prompts.d.ts.map +1 -0
  44. package/dist/agents/codemie-code/prompts.js +160 -0
  45. package/dist/agents/codemie-code/prompts.js.map +1 -0
  46. package/dist/agents/codemie-code/storage/todoStorage.d.ts +78 -0
  47. package/dist/agents/codemie-code/storage/todoStorage.d.ts.map +1 -0
  48. package/dist/agents/codemie-code/storage/todoStorage.js +225 -0
  49. package/dist/agents/codemie-code/storage/todoStorage.js.map +1 -0
  50. package/dist/agents/codemie-code/tokenUtils.d.ts +108 -0
  51. package/dist/agents/codemie-code/tokenUtils.d.ts.map +1 -0
  52. package/dist/agents/codemie-code/tokenUtils.js +220 -0
  53. package/dist/agents/codemie-code/tokenUtils.js.map +1 -0
  54. package/dist/agents/codemie-code/toolMetadata.d.ts +15 -0
  55. package/dist/agents/codemie-code/toolMetadata.d.ts.map +1 -0
  56. package/dist/agents/codemie-code/toolMetadata.js +315 -0
  57. package/dist/agents/codemie-code/toolMetadata.js.map +1 -0
  58. package/dist/agents/codemie-code/tools/index.d.ts +45 -0
  59. package/dist/agents/codemie-code/tools/index.d.ts.map +1 -0
  60. package/dist/agents/codemie-code/tools/index.js +407 -0
  61. package/dist/agents/codemie-code/tools/index.js.map +1 -0
  62. package/dist/agents/codemie-code/tools/planning.d.ts +53 -0
  63. package/dist/agents/codemie-code/tools/planning.d.ts.map +1 -0
  64. package/dist/agents/codemie-code/tools/planning.js +224 -0
  65. package/dist/agents/codemie-code/tools/planning.js.map +1 -0
  66. package/dist/agents/codemie-code/types.d.ts +418 -0
  67. package/dist/agents/codemie-code/types.d.ts.map +1 -0
  68. package/dist/agents/codemie-code/types.js +35 -0
  69. package/dist/agents/codemie-code/types.js.map +1 -0
  70. package/dist/agents/codemie-code/ui/progressTracker.d.ts +125 -0
  71. package/dist/agents/codemie-code/ui/progressTracker.d.ts.map +1 -0
  72. package/dist/agents/codemie-code/ui/progressTracker.js +343 -0
  73. package/dist/agents/codemie-code/ui/progressTracker.js.map +1 -0
  74. package/dist/agents/codemie-code/ui/todoPanel.d.ts +112 -0
  75. package/dist/agents/codemie-code/ui/todoPanel.d.ts.map +1 -0
  76. package/dist/agents/codemie-code/ui/todoPanel.js +318 -0
  77. package/dist/agents/codemie-code/ui/todoPanel.js.map +1 -0
  78. package/dist/agents/codemie-code/ui.d.ts +179 -0
  79. package/dist/agents/codemie-code/ui.d.ts.map +1 -0
  80. package/dist/agents/codemie-code/ui.js +1408 -0
  81. package/dist/agents/codemie-code/ui.js.map +1 -0
  82. package/dist/agents/codemie-code/utils/progressionEnforcer.d.ts +87 -0
  83. package/dist/agents/codemie-code/utils/progressionEnforcer.d.ts.map +1 -0
  84. package/dist/agents/codemie-code/utils/progressionEnforcer.js +293 -0
  85. package/dist/agents/codemie-code/utils/progressionEnforcer.js.map +1 -0
  86. package/dist/agents/codemie-code/utils/todoParser.d.ts +41 -0
  87. package/dist/agents/codemie-code/utils/todoParser.d.ts.map +1 -0
  88. package/dist/agents/codemie-code/utils/todoParser.js +305 -0
  89. package/dist/agents/codemie-code/utils/todoParser.js.map +1 -0
  90. package/dist/agents/codemie-code/utils/todoValidator.d.ts +65 -0
  91. package/dist/agents/codemie-code/utils/todoValidator.d.ts.map +1 -0
  92. package/dist/agents/codemie-code/utils/todoValidator.js +249 -0
  93. package/dist/agents/codemie-code/utils/todoValidator.js.map +1 -0
  94. package/dist/agents/codemie-code/validators/planValidator.d.ts +94 -0
  95. package/dist/agents/codemie-code/validators/planValidator.d.ts.map +1 -0
  96. package/dist/agents/codemie-code/validators/planValidator.js +281 -0
  97. package/dist/agents/codemie-code/validators/planValidator.js.map +1 -0
  98. package/dist/agents/registry.d.ts +1 -1
  99. package/dist/agents/registry.d.ts.map +1 -1
  100. package/dist/agents/registry.js +11 -15
  101. package/dist/agents/registry.js.map +1 -1
  102. package/dist/cli/commands/auth.d.ts +3 -0
  103. package/dist/cli/commands/auth.d.ts.map +1 -0
  104. package/dist/cli/commands/auth.js +170 -0
  105. package/dist/cli/commands/auth.js.map +1 -0
  106. package/dist/cli/commands/config.d.ts +3 -0
  107. package/dist/cli/commands/config.d.ts.map +1 -0
  108. package/dist/cli/commands/config.js +350 -0
  109. package/dist/cli/commands/config.js.map +1 -0
  110. package/dist/cli/commands/doctor.d.ts.map +1 -1
  111. package/dist/cli/commands/doctor.js +308 -71
  112. package/dist/cli/commands/doctor.js.map +1 -1
  113. package/dist/cli/commands/env.d.ts +3 -0
  114. package/dist/cli/commands/env.d.ts.map +1 -0
  115. package/dist/cli/commands/env.js +19 -0
  116. package/dist/cli/commands/env.js.map +1 -0
  117. package/dist/cli/commands/install.d.ts.map +1 -1
  118. package/dist/cli/commands/install.js +28 -33
  119. package/dist/cli/commands/install.js.map +1 -1
  120. package/dist/cli/commands/list.js +18 -24
  121. package/dist/cli/commands/list.js.map +1 -1
  122. package/dist/cli/commands/run.d.ts.map +1 -1
  123. package/dist/cli/commands/run.js +297 -31
  124. package/dist/cli/commands/run.js.map +1 -1
  125. package/dist/cli/commands/setup.d.ts +3 -0
  126. package/dist/cli/commands/setup.d.ts.map +1 -0
  127. package/dist/cli/commands/setup.js +523 -0
  128. package/dist/cli/commands/setup.js.map +1 -0
  129. package/dist/cli/commands/tools.d.ts +6 -0
  130. package/dist/cli/commands/tools.d.ts.map +1 -0
  131. package/dist/cli/commands/tools.js +244 -0
  132. package/dist/cli/commands/tools.js.map +1 -0
  133. package/dist/cli/commands/uninstall.js +24 -30
  134. package/dist/cli/commands/uninstall.js.map +1 -1
  135. package/dist/cli/commands/version.d.ts.map +1 -1
  136. package/dist/cli/commands/version.js +11 -16
  137. package/dist/cli/commands/version.js.map +1 -1
  138. package/dist/cli/commands/workflow.d.ts +6 -0
  139. package/dist/cli/commands/workflow.d.ts.map +1 -0
  140. package/dist/cli/commands/workflow.js +424 -0
  141. package/dist/cli/commands/workflow.js.map +1 -0
  142. package/dist/cli/index.js +85 -35
  143. package/dist/cli/index.js.map +1 -1
  144. package/dist/clients/adapters/github.d.ts +17 -0
  145. package/dist/clients/adapters/github.d.ts.map +1 -0
  146. package/dist/clients/adapters/github.js +150 -0
  147. package/dist/clients/adapters/github.js.map +1 -0
  148. package/dist/clients/adapters/gitlab.d.ts +17 -0
  149. package/dist/clients/adapters/gitlab.d.ts.map +1 -0
  150. package/dist/clients/adapters/gitlab.js +147 -0
  151. package/dist/clients/adapters/gitlab.js.map +1 -0
  152. package/dist/clients/registry.d.ts +20 -0
  153. package/dist/clients/registry.d.ts.map +1 -0
  154. package/dist/clients/registry.js +27 -0
  155. package/dist/clients/registry.js.map +1 -0
  156. package/dist/env/manager.js +9 -46
  157. package/dist/env/manager.js.map +1 -1
  158. package/dist/index.d.ts +6 -13
  159. package/dist/index.d.ts.map +1 -1
  160. package/dist/index.js +6 -43
  161. package/dist/index.js.map +1 -1
  162. package/dist/tools/detector.d.ts +33 -0
  163. package/dist/tools/detector.d.ts.map +1 -0
  164. package/dist/tools/detector.js +145 -0
  165. package/dist/tools/detector.js.map +1 -0
  166. package/dist/tools/index.d.ts +8 -0
  167. package/dist/tools/index.d.ts.map +1 -0
  168. package/dist/tools/index.js +8 -0
  169. package/dist/tools/index.js.map +1 -0
  170. package/dist/tools/manager.d.ts +21 -0
  171. package/dist/tools/manager.d.ts.map +1 -0
  172. package/dist/tools/manager.js +104 -0
  173. package/dist/tools/manager.js.map +1 -0
  174. package/dist/tools/registry.d.ts +8 -0
  175. package/dist/tools/registry.d.ts.map +1 -0
  176. package/dist/tools/registry.js +36 -0
  177. package/dist/tools/registry.js.map +1 -0
  178. package/dist/tools/types.d.ts +41 -0
  179. package/dist/tools/types.d.ts.map +1 -0
  180. package/dist/tools/types.js +5 -0
  181. package/dist/tools/types.js.map +1 -0
  182. package/dist/types/sso.d.ts +42 -0
  183. package/dist/types/sso.d.ts.map +1 -0
  184. package/dist/types/sso.js +2 -0
  185. package/dist/types/sso.js.map +1 -0
  186. package/dist/utils/agent-compatibility.d.ts +32 -0
  187. package/dist/utils/agent-compatibility.d.ts.map +1 -0
  188. package/dist/utils/agent-compatibility.js +140 -0
  189. package/dist/utils/agent-compatibility.js.map +1 -0
  190. package/dist/utils/async-tips.d.ts.map +1 -1
  191. package/dist/utils/async-tips.js +16 -55
  192. package/dist/utils/async-tips.js.map +1 -1
  193. package/dist/utils/clipboard.d.ts +16 -0
  194. package/dist/utils/clipboard.d.ts.map +1 -0
  195. package/dist/utils/clipboard.js +179 -0
  196. package/dist/utils/clipboard.js.map +1 -0
  197. package/dist/utils/codemie-integration-validator.d.ts +17 -0
  198. package/dist/utils/codemie-integration-validator.d.ts.map +1 -0
  199. package/dist/utils/codemie-integration-validator.js +105 -0
  200. package/dist/utils/codemie-integration-validator.js.map +1 -0
  201. package/dist/utils/codemie-model-fetcher.d.ts +11 -0
  202. package/dist/utils/codemie-model-fetcher.d.ts.map +1 -0
  203. package/dist/utils/codemie-model-fetcher.js +242 -0
  204. package/dist/utils/codemie-model-fetcher.js.map +1 -0
  205. package/dist/utils/config-loader.d.ts +118 -0
  206. package/dist/utils/config-loader.d.ts.map +1 -0
  207. package/dist/utils/config-loader.js +397 -0
  208. package/dist/utils/config-loader.js.map +1 -0
  209. package/dist/utils/credential-store.d.ts +16 -0
  210. package/dist/utils/credential-store.d.ts.map +1 -0
  211. package/dist/utils/credential-store.js +109 -0
  212. package/dist/utils/credential-store.js.map +1 -0
  213. package/dist/utils/dirname.d.ts +7 -0
  214. package/dist/utils/dirname.d.ts.map +1 -0
  215. package/dist/utils/dirname.js +11 -0
  216. package/dist/utils/dirname.js.map +1 -0
  217. package/dist/utils/errors.js +7 -17
  218. package/dist/utils/errors.js.map +1 -1
  219. package/dist/utils/exec.js +3 -6
  220. package/dist/utils/exec.js.map +1 -1
  221. package/dist/utils/first-time.d.ts +34 -0
  222. package/dist/utils/first-time.d.ts.map +1 -0
  223. package/dist/utils/first-time.js +226 -0
  224. package/dist/utils/first-time.js.map +1 -0
  225. package/dist/utils/health-checker.d.ts +20 -0
  226. package/dist/utils/health-checker.d.ts.map +1 -0
  227. package/dist/utils/health-checker.js +172 -0
  228. package/dist/utils/health-checker.js.map +1 -0
  229. package/dist/utils/logger.js +12 -18
  230. package/dist/utils/logger.js.map +1 -1
  231. package/dist/utils/model-fetcher.d.ts +21 -0
  232. package/dist/utils/model-fetcher.d.ts.map +1 -0
  233. package/dist/utils/model-fetcher.js +150 -0
  234. package/dist/utils/model-fetcher.js.map +1 -0
  235. package/dist/utils/sso-auth.d.ts +15 -0
  236. package/dist/utils/sso-auth.d.ts.map +1 -0
  237. package/dist/utils/sso-auth.js +207 -0
  238. package/dist/utils/sso-auth.js.map +1 -0
  239. package/dist/utils/sso-gateway.d.ts +47 -0
  240. package/dist/utils/sso-gateway.d.ts.map +1 -0
  241. package/dist/utils/sso-gateway.js +298 -0
  242. package/dist/utils/sso-gateway.js.map +1 -0
  243. package/dist/utils/tips.d.ts.map +1 -1
  244. package/dist/utils/tips.js +13 -52
  245. package/dist/utils/tips.js.map +1 -1
  246. package/dist/workflows/detector.d.ts +37 -0
  247. package/dist/workflows/detector.d.ts.map +1 -0
  248. package/dist/workflows/detector.js +160 -0
  249. package/dist/workflows/detector.js.map +1 -0
  250. package/dist/workflows/index.d.ts +8 -0
  251. package/dist/workflows/index.d.ts.map +1 -0
  252. package/dist/workflows/index.js +8 -0
  253. package/dist/workflows/index.js.map +1 -0
  254. package/dist/workflows/installer.d.ts +24 -0
  255. package/dist/workflows/installer.d.ts.map +1 -0
  256. package/dist/workflows/installer.js +105 -0
  257. package/dist/workflows/installer.js.map +1 -0
  258. package/dist/workflows/registry.d.ts +29 -0
  259. package/dist/workflows/registry.d.ts.map +1 -0
  260. package/dist/workflows/registry.js +54 -0
  261. package/dist/workflows/registry.js.map +1 -0
  262. package/dist/workflows/templates/github/metadata.d.ts +6 -0
  263. package/dist/workflows/templates/github/metadata.d.ts.map +1 -0
  264. package/dist/workflows/templates/github/metadata.js +111 -0
  265. package/dist/workflows/templates/github/metadata.js.map +1 -0
  266. package/dist/workflows/templates/gitlab/metadata.d.ts +6 -0
  267. package/dist/workflows/templates/gitlab/metadata.d.ts.map +1 -0
  268. package/dist/workflows/templates/gitlab/metadata.js +14 -0
  269. package/dist/workflows/templates/gitlab/metadata.js.map +1 -0
  270. package/dist/workflows/types.d.ts +71 -0
  271. package/dist/workflows/types.d.ts.map +1 -0
  272. package/dist/workflows/types.js +5 -0
  273. package/dist/workflows/types.js.map +1 -0
  274. package/package.json +32 -25
  275. package/src/workflows/templates/github/code-ci.yml +529 -0
  276. package/src/workflows/templates/github/inline-fix.yml +665 -0
  277. package/src/workflows/templates/github/pr-review.yml +677 -0
  278. package/.claude/agents/README.md +0 -298
  279. package/.claude/agents/release-manager.md +0 -857
  280. package/.codemie/guides/git-workflow.md +0 -493
  281. package/CLAUDE.md +0 -855
  282. package/dist/agents/adapters/aider.d.ts +0 -12
  283. package/dist/agents/adapters/aider.d.ts.map +0 -1
  284. package/dist/agents/adapters/aider.js +0 -80
  285. package/dist/agents/adapters/aider.js.map +0 -1
  286. package/dist/cli/cli.d.ts +0 -4
  287. package/dist/cli/cli.d.ts.map +0 -1
  288. package/dist/cli/cli.js +0 -107
  289. package/dist/cli/cli.js.map +0 -1
  290. package/dist/cli/commands/mcp.d.ts +0 -3
  291. package/dist/cli/commands/mcp.d.ts.map +0 -1
  292. package/dist/cli/commands/mcp.js +0 -459
  293. package/dist/cli/commands/mcp.js.map +0 -1
  294. package/dist/code/agent-events.d.ts +0 -39
  295. package/dist/code/agent-events.d.ts.map +0 -1
  296. package/dist/code/agent-events.js +0 -4
  297. package/dist/code/agent-events.js.map +0 -1
  298. package/dist/code/agent.d.ts +0 -19
  299. package/dist/code/agent.d.ts.map +0 -1
  300. package/dist/code/agent.js +0 -144
  301. package/dist/code/agent.js.map +0 -1
  302. package/dist/code/config.d.ts +0 -13
  303. package/dist/code/config.d.ts.map +0 -1
  304. package/dist/code/config.js +0 -41
  305. package/dist/code/config.js.map +0 -1
  306. package/dist/code/index.d.ts +0 -19
  307. package/dist/code/index.d.ts.map +0 -1
  308. package/dist/code/index.js +0 -400
  309. package/dist/code/index.js.map +0 -1
  310. package/dist/code/prompts.d.ts +0 -2
  311. package/dist/code/prompts.d.ts.map +0 -1
  312. package/dist/code/prompts.js +0 -45
  313. package/dist/code/prompts.js.map +0 -1
  314. package/dist/code/tools/command.d.ts +0 -8
  315. package/dist/code/tools/command.d.ts.map +0 -1
  316. package/dist/code/tools/command.js +0 -83
  317. package/dist/code/tools/command.js.map +0 -1
  318. package/dist/code/tools/diff-utils.d.ts +0 -2
  319. package/dist/code/tools/diff-utils.d.ts.map +0 -1
  320. package/dist/code/tools/diff-utils.js +0 -45
  321. package/dist/code/tools/diff-utils.js.map +0 -1
  322. package/dist/code/tools/filesystem.d.ts +0 -11
  323. package/dist/code/tools/filesystem.d.ts.map +0 -1
  324. package/dist/code/tools/filesystem.js +0 -442
  325. package/dist/code/tools/filesystem.js.map +0 -1
  326. package/dist/code/tools/git.d.ts +0 -7
  327. package/dist/code/tools/git.d.ts.map +0 -1
  328. package/dist/code/tools/git.js +0 -111
  329. package/dist/code/tools/git.js.map +0 -1
  330. package/dist/code/tools/mcp.d.ts +0 -13
  331. package/dist/code/tools/mcp.d.ts.map +0 -1
  332. package/dist/code/tools/mcp.js +0 -230
  333. package/dist/code/tools/mcp.js.map +0 -1
  334. package/dist/data/tips.json +0 -118
  335. package/dist/ui/terminal-ui.d.ts +0 -73
  336. package/dist/ui/terminal-ui.d.ts.map +0 -1
  337. package/dist/ui/terminal-ui.js +0 -900
  338. package/dist/ui/terminal-ui.js.map +0 -1
  339. package/dist/utils/env-mapper.d.ts +0 -40
  340. package/dist/utils/env-mapper.d.ts.map +0 -1
  341. package/dist/utils/env-mapper.js +0 -122
  342. package/dist/utils/env-mapper.js.map +0 -1
  343. package/docs/USER_GUIDE.md +0 -573
  344. package/eslint.config.mjs +0 -43
  345. package/tests/agent-direct.test.mjs +0 -45
  346. package/tests/agent-output.test.mjs +0 -64
  347. package/tests/codemie-code.test.mjs +0 -42
  348. package/tests/context7-only.test.mjs +0 -42
  349. package/tests/conversation-flow.test.mjs +0 -63
  350. package/tests/interactive-simulation.test.mjs +0 -60
  351. package/tests/live-output.test.mjs +0 -53
  352. package/tests/mcp-context7.test.mjs +0 -105
  353. package/tests/mcp-e2e.test.mjs +0 -109
  354. package/tests/mcp-time-server.test.mjs +0 -58
  355. package/tests/streaming.test.mjs +0 -57
  356. package/tests/test-helpers.mjs +0 -94
  357. package/tests/text-wrapping.test.mjs +0 -33
  358. package/tests/tool-count.test.mjs +0 -81
  359. package/tests/ui-format.test.mjs +0 -39
  360. package/tests/ui-state.test.mjs +0 -72
package/README.md CHANGED
@@ -1,26 +1,79 @@
1
- # CodeMie Code
2
-
3
- > AI coding assistant and CLI wrapper for managing multiple AI coding agents
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.).
6
-
7
- ## ✨ Features
1
+ # AI/Run CodeMie CLI
2
+
3
+ > Professional CLI wrapper for managing multiple AI coding agents
4
+
5
+ ## Table of Contents
6
+
7
+ - [Synopsis](#synopsis)
8
+ - [Quick Start](#quick-start)
9
+ - [Installation](#installation)
10
+ - [From npm (Recommended)](#from-npm-recommended)
11
+ - [From Source (Development)](#from-source-development)
12
+ - [Verify Installation](#verify-installation)
13
+ - [Usage](#usage)
14
+ - [Built-in Agent (CodeMie Native)](#built-in-agent-codemie-native)
15
+ - [External Agents](#external-agents)
16
+ - [Commands](#commands)
17
+ - [Core Commands](#core-commands)
18
+ - [Agent Shortcuts](#agent-shortcuts)
19
+ - [Configuration Commands](#configuration-commands)
20
+ - [Configuration](#configuration)
21
+ - [Setup Wizard (Recommended)](#setup-wizard-recommended)
22
+ - [Supported Providers](#supported-providers)
23
+ - [Manual Configuration](#manual-configuration)
24
+ - [Model Compatibility](#model-compatibility)
25
+ - [Authentication & SSO Management](#authentication--sso-management)
26
+ - [AI/Run CodeMie SSO Setup](#airun-codemie-sso-setup)
27
+ - [Token Management](#token-management)
28
+ - [Enterprise SSO Features](#enterprise-sso-features)
29
+ - [Examples](#examples)
30
+ - [Common Workflows](#common-workflows)
31
+ - [Configuration Examples](#configuration-examples)
32
+ - [Advanced Usage](#advanced-usage)
33
+ - [Agents](#agents)
34
+ - [CodeMie Native (Built-in)](#codemie-native-built-in)
35
+ - [Claude Code](#claude-code)
36
+ - [Codex](#codex)
37
+ - [Troubleshooting](#troubleshooting)
38
+ - [Command Not Found](#command-not-found)
39
+ - [Configuration Issues](#configuration-issues)
40
+ - [Connection Problems](#connection-problems)
41
+ - [Agent Installation Failures](#agent-installation-failures)
42
+ - [Model Compatibility Errors](#model-compatibility-errors)
43
+ - [Development](#development)
44
+ - [Project Structure](#project-structure)
45
+ - [Building](#building)
46
+ - [Testing](#testing)
47
+ - [License](#license)
48
+ - [Links](#links)
49
+
50
+ ## Synopsis
51
+
52
+ ```bash
53
+ codemie [COMMAND] [OPTIONS]
54
+ codemie-code [MESSAGE|--task TASK] [OPTIONS]
55
+ codemie-claude [-p MESSAGE] [OPTIONS]
56
+ codemie-codex [MESSAGE|--task TASK] [OPTIONS]
57
+ ```
58
+
59
+ AI/Run CodeMie CLI is a professional, unified CLI tool for installing, configuring, and running multiple AI coding agents from a single interface. It includes a built-in LangGraph-based agent (CodeMie Native) and supports external agents like Claude Code and Codex.
60
+
61
+ ## Quick Start
62
+
63
+ ```bash
64
+ # 1. Install
65
+ npm install -g @codemieai/code
8
66
 
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
67
+ # 2. Setup (interactive wizard)
68
+ codemie setup
18
69
 
19
- ---
70
+ # 3. Start coding with built-in agent
71
+ codemie-code "Review my code for bugs"
72
+ ```
20
73
 
21
- ## 📦 Installation
74
+ ## Installation
22
75
 
23
- ### From npm (when published)
76
+ ### From npm (Recommended)
24
77
 
25
78
  ```bash
26
79
  npm install -g @codemieai/code
@@ -29,889 +82,474 @@ npm install -g @codemieai/code
29
82
  ### From Source (Development)
30
83
 
31
84
  ```bash
32
- # Clone the repository
33
85
  git clone https://github.com/codemie-ai/codemie-code.git
34
86
  cd codemie-code
35
-
36
- # Install dependencies
37
- npm install
38
-
39
- # Build the project
40
- npm run build
41
-
42
- # Link globally for testing
43
- npm link
87
+ npm install && npm run build && npm link
44
88
  ```
45
89
 
46
90
  ### Verify Installation
47
91
 
48
92
  ```bash
49
- # Check if commands are available
50
93
  codemie --help
51
- codemie-code --help
52
-
53
- # Run health check
54
94
  codemie doctor
55
95
  ```
56
96
 
57
- ---
58
-
59
- ## 🚀 Quick Start
97
+ ## Usage
60
98
 
61
- ### 1. Set Up Environment Variables
99
+ ### Built-in Agent (CodeMie Native)
62
100
 
63
- CodeMie Code requires AI provider credentials:
101
+ Ready to use immediately - no installation required:
64
102
 
65
103
  ```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
- ```
88
-
89
- **Expected output:**
90
- ```
91
- ✓ Configuration loaded
92
- ✓ Testing connection...
93
- ✓ Connection successful
94
- ✓ Model: claude-4-5-sonnet
95
- ```
96
-
97
- ### 3. Start the Assistant
98
-
99
- ```bash
100
- # In current directory
104
+ # Interactive conversation
101
105
  codemie-code
102
106
 
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
- ```
107
+ # Execute single task
108
+ codemie-code --task "fix bugs in src/utils"
109
109
 
110
- ### 4. Interact with the Assistant
110
+ # Start with initial message
111
+ codemie-code "Help me refactor this component"
111
112
 
113
+ # Debug mode
114
+ codemie-code --debug
112
115
  ```
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
125
- ```
126
-
127
- ---
128
116
 
129
- ## 📚 Configuration
117
+ ### External Agents
130
118
 
131
- ### Required Environment Variables
132
-
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
119
+ Install and run external agents:
142
120
 
143
121
  ```bash
144
- # Enable debug logging
145
- export CODEMIE_DEBUG="true"
122
+ # Install agents
123
+ codemie install claude
124
+ codemie install codex
146
125
 
147
- # Timeout for AI requests (seconds)
148
- export CODEMIE_TIMEOUT="300"
126
+ # Run via shortcuts (recommended)
127
+ codemie-claude -p "Review my API code"
128
+ codemie-codex --task "Generate unit tests"
149
129
 
150
- # Load specific MCP servers
151
- export CODEMIE_MCP_SERVERS="time,context7"
130
+ # Or run through main CLI
131
+ codemie run claude --task "Fix security issues"
152
132
  ```
153
133
 
154
- #### MCP Configuration
134
+ ## Commands
155
135
 
156
- Configure MCP (Model Context Protocol) servers in `~/.codemie/config.json`:
157
-
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
- ```
172
-
173
- Or use environment variable to specify which servers to load:
136
+ ### Core Commands
174
137
 
175
138
  ```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
139
+ codemie setup # Interactive configuration wizard
140
+ codemie auth <command> # Manage SSO authentication
141
+ codemie list # List all available agents
142
+ codemie install <agent> # Install an agent
143
+ codemie uninstall <agent> # Uninstall an agent
144
+ codemie run <agent> [args...] # Run an agent
145
+ codemie doctor # Health check and diagnostics
146
+ codemie config <action> # Manage configuration
147
+ codemie version # Show version information
182
148
  ```
183
149
 
184
- When no `--mcp-servers` flag is provided, all servers configured in `~/.codemie/config.json` are loaded automatically.
150
+ ### Agent Shortcuts
185
151
 
186
- ### Configuration Methods
187
-
188
- #### Method 1: Shell Environment (Recommended)
152
+ Direct access to agents with automatic configuration:
189
153
 
190
154
  ```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
- ```
155
+ # Built-in agent
156
+ codemie-code [message] # Interactive or with initial message
157
+ codemie-code --task "task" # Single task execution
158
+ codemie-code health # Health check
199
159
 
200
- #### Method 2: Project .env File
160
+ # External agents
161
+ codemie-claude # Claude Code agent (interactive)
162
+ codemie-claude -p "message" # Claude Code agent (print mode)
163
+ codemie-codex [message] # Codex agent
201
164
 
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
212
- codemie-code
165
+ # Configuration overrides
166
+ codemie-claude --model claude-4-5-sonnet --api-key your-key
167
+ codemie-codex --model gpt-4o --provider openai
213
168
  ```
214
169
 
215
- #### Method 3: Inline
170
+ ### Configuration Commands
216
171
 
217
172
  ```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
173
+ codemie config list # Show all configuration
174
+ codemie config get <key> # Get specific value
175
+ codemie config set <key> <value> # Set configuration value
176
+ codemie config reset # Reset to defaults
222
177
  ```
223
178
 
224
- ### Advanced: Provider-Specific Configuration
179
+ ## Configuration
225
180
 
226
- For advanced scenarios, you can use provider-specific environment variables. These act as fallbacks if generic `CODEMIE_*` variables are not set:
181
+ ### Setup Wizard (Recommended)
227
182
 
228
- **For Anthropic Claude:**
229
- ```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
- ```
183
+ Run the interactive setup wizard:
234
184
 
235
- **For OpenAI GPT:**
236
185
  ```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"
186
+ codemie setup
240
187
  ```
241
188
 
242
- **Configuration Priority:**
243
- 1. `CODEMIE_*` (generic - checked first)
244
- 2. `ANTHROPIC_*` or `OPENAI_*` (provider-specific - fallback)
189
+ The wizard will:
190
+ - Guide you through provider selection
191
+ - Test your credentials via health endpoints
192
+ - Fetch available models in real-time
193
+ - Save configuration to `~/.codemie/config.json`
245
194
 
246
- ---
195
+ ### Supported Providers
247
196
 
248
- ## 🎯 Usage
197
+ - **ai-run-sso** - AI/Run CodeMie SSO (unified enterprise gateway)
198
+ - **openai** - OpenAI API
199
+ - **azure** - Azure OpenAI
200
+ - **bedrock** - AWS Bedrock
201
+ - **litellm** - LiteLLM Proxy
249
202
 
250
- ### CodeMie Code Assistant
203
+ ### Manual Configuration
251
204
 
252
- The built-in AI assistant with filesystem, git, and command execution tools.
205
+ #### Environment Variables (Highest Priority)
253
206
 
254
207
  ```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"
208
+ # Generic (works with any provider)
209
+ export CODEMIE_BASE_URL="https://your-proxy.com"
210
+ export CODEMIE_API_KEY="your-api-key"
211
+ export CODEMIE_MODEL="your-model"
212
+ export CODEMIE_PROVIDER="litellm"
261
213
 
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
214
+ # Provider-specific
215
+ export OPENAI_API_KEY="your-openai-key"
216
+ export OPENAI_BASE_URL="https://api.openai.com/v1"
273
217
  ```
274
218
 
275
- #### Interactive Commands
276
-
277
- Once inside the assistant:
219
+ #### Configuration File
278
220
 
279
- - **exit** - Exit the assistant
280
- - **clear** - Clear conversation history
281
- - Any coding question or task
221
+ Location: `~/.codemie/config.json`
282
222
 
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
223
+ ```json
224
+ {
225
+ "provider": "litellm",
226
+ "model": "claude-4-5-sonnet",
227
+ "baseUrl": "https://litellm.codemie.example.com",
228
+ "apiKey": "your-api-key",
229
+ "timeout": 300
230
+ }
294
231
  ```
295
232
 
296
- ### MCP Server Management
233
+ ### Model Compatibility
297
234
 
298
- Extend capabilities with Model Context Protocol servers.
235
+ AI/Run CodeMie CLI automatically validates model compatibility:
299
236
 
300
- ```bash
301
- # List available servers
302
- codemie-code mcp list
237
+ - **Codex**: OpenAI models only (gpt-4, gpt-4o, gpt-5, etc.)
238
+ - **Claude**: Both Claude and GPT models
239
+ - **CodeMie Native**: All supported models
303
240
 
304
- # List with detailed configuration
305
- codemie-code mcp list -v
241
+ When incompatible models are detected, AI/Run CodeMie CLI will:
242
+ 1. Fetch available models from your provider's API
243
+ 2. Filter to compatible models
244
+ 3. Offer to switch automatically
306
245
 
307
- # Add new server
308
- codemie-code mcp add <name> <command-or-url> [options]
246
+ ## Authentication & SSO Management
309
247
 
310
- # Test server configuration
311
- codemie-code mcp test <server-name>
248
+ ### AI/Run CodeMie SSO Setup
312
249
 
313
- # Remove server
314
- codemie-code mcp remove <server-name>
250
+ For enterprise environments with AI/Run CodeMie SSO (Single Sign-On):
315
251
 
316
- # Preview which servers will load
317
- codemie-code mcp servers
318
- codemie-code mcp servers --servers time,context7
319
- ```
252
+ #### Initial Setup via Wizard
320
253
 
321
- #### Popular MCP Servers
254
+ The setup wizard automatically detects and configures AI/Run CodeMie SSO:
322
255
 
323
- **Time Server** - Query times in any timezone:
324
256
  ```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?"
257
+ codemie setup
329
258
  ```
330
259
 
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
335
-
336
- # Then ask: "Show me LangChain documentation for chains"
337
- ```
260
+ **The wizard will:**
261
+ 1. Detect if you have access to AI/Run CodeMie SSO
262
+ 2. Guide you through the authentication flow
263
+ 3. Test the connection with health checks
264
+ 4. Fetch and display available models
265
+ 5. Save secure credentials to `~/.codemie/config.json`
338
266
 
339
- ### CLI Wrapper (codemie)
267
+ #### Manual SSO Authentication
340
268
 
341
- Manage multiple AI coding agents from one interface.
342
-
343
- #### List Available Agents
269
+ If you need to authenticate separately or refresh your credentials:
344
270
 
345
271
  ```bash
346
- codemie list # List all agents
347
- codemie list --installed # List only installed agents
348
- ```
349
-
350
- #### Install Agents
272
+ # Authenticate with AI/Run CodeMie SSO
273
+ codemie auth login --url https://your-airun-codemie-instance.com
351
274
 
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
- ```
275
+ # Check authentication status
276
+ codemie auth status
357
277
 
358
- #### Run Agents
278
+ # Refresh expired tokens
279
+ codemie auth refresh
359
280
 
360
- ```bash
361
- # Run built-in CodeMie Code
362
- codemie run codemie-code
281
+ # Logout and clear credentials
282
+ codemie auth logout
283
+ ```
363
284
 
364
- # Run other agents
365
- codemie run claude-code
366
- codemie run aider
367
- codemie run codex
285
+ ### Token Management
368
286
 
369
- # With custom model
370
- codemie run codemie-code --model claude-opus
287
+ SSO tokens are automatically managed but you can control them manually:
371
288
 
372
- # Pass additional arguments
373
- codemie run aider --no-auto-commits
374
- ```
289
+ #### Token Refresh
375
290
 
376
- #### Uninstall Agents
291
+ AI/Run CodeMie CLI automatically refreshes tokens when they expire. For manual refresh:
377
292
 
378
293
  ```bash
379
- codemie uninstall claude-code
380
- codemie uninstall aider
294
+ # Refresh SSO credentials (extends session)
295
+ codemie auth refresh
381
296
  ```
382
297
 
383
- #### Health Check
298
+ **When to refresh manually:**
299
+ - Before long-running tasks
300
+ - After extended periods of inactivity
301
+ - When you receive authentication errors
302
+ - Before important demonstrations
384
303
 
385
- ```bash
386
- codemie doctor
387
- ```
304
+ #### Authentication Status
388
305
 
389
- Checks:
390
- - ✅ Node.js version (>= 24.0.0)
391
- - ✅ npm installation
392
- - ✅ git availability
393
- - ✅ Environment variables configuration
394
- - ✅ Installed agents
395
-
396
- #### Version Information
306
+ Check your current authentication state:
397
307
 
398
308
  ```bash
399
- codemie version
400
- codemie-code --version
309
+ codemie auth status
401
310
  ```
402
311
 
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 |
312
+ **Status information includes:**
313
+ - Connection status to AI/Run CodeMie SSO
314
+ - Token validity and expiration
315
+ - Available models for your account
316
+ - Provider configuration details
423
317
 
424
- ### Git Tools (4 tools)
318
+ #### Token Troubleshooting
425
319
 
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 |
320
+ Common authentication issues and solutions:
432
321
 
433
- ### Command Execution (1 tool)
434
-
435
- | Tool | Description |
436
- |------|-------------|
437
- | `execute_command` | Execute shell commands (with security checks) |
438
-
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
463
-
464
- CodeMie Code implements multiple security layers:
465
-
466
- ### Filesystem Security
467
-
468
- ✅ **Path Validation**
469
- - All paths validated against allowed directories
470
- - No directory traversal attacks (../)
471
- - Absolute path resolution
472
-
473
- ✅ **Symlink Protection**
474
- - Symlinks resolved and validated
475
- - Target paths must be within allowed directories
476
-
477
- ✅ **Ignore Patterns**
478
- - Automatically excludes sensitive directories
479
- - Default: `node_modules`, `.git`, `__pycache__`, `.venv`, `dist`, `build`
322
+ ```bash
323
+ # Token expired
324
+ codemie auth refresh
480
325
 
481
- ### Command Security
326
+ # Connection issues
327
+ codemie doctor # Full system diagnostics
328
+ codemie auth status # Check auth-specific issues
482
329
 
483
- The `execute_command` tool blocks dangerous patterns:
330
+ # Complete re-authentication
331
+ codemie auth logout
332
+ codemie auth login --url https://your-airun-codemie-instance.com
484
333
 
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
334
+ # Reset all configuration
335
+ codemie config reset
336
+ codemie setup # Run wizard again
496
337
  ```
497
338
 
498
- ### Security Best Practices
339
+ ### Enterprise SSO Features
499
340
 
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
341
+ AI/Run CodeMie SSO provides enterprise-grade features:
504
342
 
505
- ---
343
+ - **Secure Token Storage**: Credentials stored in system keychain
344
+ - **Automatic Refresh**: Seamless token renewal without interruption
345
+ - **Multi-Model Access**: Access to Claude, GPT, and other models through unified gateway
346
+ - **Audit Logging**: Enterprise audit trails for security compliance
347
+ - **Role-Based Access**: Model access based on organizational permissions
506
348
 
507
- ## 🎨 Usage Examples
349
+ ## Examples
508
350
 
509
- ### Example 1: Code Review
351
+ ### Common Workflows
510
352
 
511
353
  ```bash
512
- codemie-code
354
+ # Code review workflow
355
+ codemie-code "Review this PR for security issues and performance"
513
356
 
514
- You: Read src/utils/helper.ts and review the code
515
- Assistant: [Reads file, provides detailed review with suggestions]
357
+ # Bug fixing
358
+ codemie-claude -p "Fix the authentication bug in src/auth.ts"
516
359
 
517
- You: Create a test file for this module
518
- Assistant: [Creates tests/utils/helper.test.ts with test cases]
519
- ```
360
+ # Test generation
361
+ codemie-codex --task "Generate comprehensive tests for the API endpoints"
520
362
 
521
- ### Example 2: Refactoring
363
+ # Documentation
364
+ codemie-code "Document the functions in utils/helpers.js"
522
365
 
523
- ```bash
524
- You: Show me all files in src/components
525
- Assistant: [Lists component files]
526
-
527
- You: Read Button.tsx and refactor it to use hooks
528
- Assistant: [Shows diff with proposed changes]
529
-
530
- You: Apply those changes
531
- Assistant: [Applies edits and shows confirmation]
366
+ # Refactoring
367
+ codemie-claude -p "Refactor this component to use React hooks"
532
368
  ```
533
369
 
534
- ### Example 3: Git Workflow
370
+ ### Configuration Examples
535
371
 
536
372
  ```bash
537
- You: Show me the current git status
538
- Assistant: [Shows modified, staged, and untracked files]
373
+ # Setup with different providers
374
+ codemie config set provider openai
375
+ codemie config set model gpt-4o
376
+ codemie config set apiKey sk-your-key
539
377
 
540
- You: Show diff for src/app.ts
541
- Assistant: [Displays git diff]
378
+ # Temporary model override
379
+ codemie-claude --model claude-4-5-sonnet -p "Explain this algorithm"
542
380
 
543
- You: Show the last 5 commits
544
- Assistant: [Shows commit history]
381
+ # Debug mode for troubleshooting
382
+ codemie-code --debug --task "analyze performance issues"
545
383
  ```
546
384
 
547
- ### Example 4: Project Setup
385
+ ### Advanced Usage
548
386
 
549
387
  ```bash
550
- You: Create a new directory called "api"
551
- Assistant: [Creates directory]
388
+ # Run specific agent versions
389
+ codemie run claude --version latest
552
390
 
553
- You: Create index.ts in api/ with a basic Express setup
554
- Assistant: [Creates file with boilerplate code]
391
+ # Pass custom arguments
392
+ codemie-codex --temperature 0.1 --max-tokens 2000 "Generate clean code"
555
393
 
556
- You: Create a README.md in api/ documenting the API
557
- Assistant: [Creates documentation]
394
+ # Health checks
395
+ codemie doctor # Full system check
396
+ codemie-code health # Built-in agent check
397
+ codemie-claude health # Claude agent check
558
398
  ```
559
399
 
560
- ### Example 5: Search and Replace
400
+ ## Agents
561
401
 
562
- ```bash
563
- You: Search for all files containing "TODO"
564
- Assistant: [Lists files with TODO comments]
402
+ ### CodeMie Native (Built-in)
565
403
 
566
- You: Read components/Header.tsx
567
- Assistant: [Shows file content]
568
-
569
- You: Replace the TODO with an implementation
570
- Assistant: [Shows diff and applies changes]
571
- ```
404
+ LangGraph-based coding assistant with no installation required.
572
405
 
573
- ---
406
+ **Features:**
407
+ - Modern terminal UI with streaming responses
408
+ - File operations, git integration, command execution
409
+ - Clipboard support with automatic image detection
410
+ - Interactive conversations with context memory
411
+ - Task-focused execution mode
412
+ - Debug mode with comprehensive logging
574
413
 
575
- ## 🐛 Troubleshooting
414
+ **Usage:**
415
+ ```bash
416
+ codemie-code # Interactive mode
417
+ codemie-code --task "task" # Single task
418
+ codemie-code --debug # Debug mode
419
+ ```
576
420
 
577
- ### Common Issues
421
+ ### Claude Code
578
422
 
579
- #### "Base URL not configured"
423
+ Anthropic's official CLI with advanced code understanding.
580
424
 
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
- ```
425
+ **Installation:** `codemie install claude`
587
426
 
588
- #### "Connection test failed"
427
+ **Features:**
428
+ - Advanced code understanding and generation
429
+ - Multi-file editing capabilities
430
+ - Project-aware context
431
+ - Interactive conversations
589
432
 
590
- **Possible causes:**
591
- 1. Invalid CODEMIE_AUTH_TOKEN
592
- 2. CODEMIE_BASE_URL not accessible
593
- 3. Network/VPN issues
433
+ ### Codex
594
434
 
595
- **Solution:**
596
- ```bash
597
- # Verify URL is accessible
598
- curl -I $CODEMIE_BASE_URL
435
+ OpenAI's code generation assistant optimized for completion tasks.
599
436
 
600
- # Check environment variables
601
- echo $CODEMIE_BASE_URL
602
- echo $CODEMIE_AUTH_TOKEN
603
- echo $CODEMIE_MODEL
437
+ **Installation:** `codemie install codex`
604
438
 
605
- # Run doctor
606
- codemie doctor
439
+ **Features:**
440
+ - Code completion and generation
441
+ - Function generation and bug fixing
442
+ - Code explanation and documentation
443
+ - **Requires OpenAI-compatible models only**
607
444
 
608
- # Try test again
609
- codemie-code test
610
- ```
445
+ ## Troubleshooting
611
446
 
612
- #### "Command not found: codemie"
447
+ ### Command Not Found
613
448
 
614
- **Solution:**
615
449
  ```bash
616
- # Re-install globally
617
- npm install -g @codemieai/code
618
-
619
- # Or re-link the package (from source)
620
- cd /path/to/codemie-code
450
+ # Re-link the package
621
451
  npm link
622
-
623
- # Verify
624
452
  which codemie
625
- which codemie-code
626
- ```
627
453
 
628
- #### "Path outside allowed directories"
454
+ # Check installation
455
+ npm list -g @codemieai/code
456
+ ```
629
457
 
630
- **Solution:**
631
- CodeMie Code only operates within the working directory for security.
458
+ ### Configuration Issues
632
459
 
633
460
  ```bash
634
- # Start in the correct directory
635
- cd /path/to/your/project
636
- codemie-code
461
+ # Run setup wizard
462
+ codemie setup
463
+
464
+ # Check current config
465
+ codemie config list
637
466
 
638
- # Or specify the directory
639
- codemie-code /path/to/your/project
467
+ # Reset if needed
468
+ codemie config reset
640
469
  ```
641
470
 
642
- #### Environment Variables Not Loaded
471
+ ### Connection Problems
643
472
 
644
473
  ```bash
645
- # Verify variables are set
646
- env | grep CODEMIE_
474
+ # Run diagnostics
475
+ codemie doctor
647
476
 
648
- # If empty, reload shell profile
649
- source ~/.bashrc # or ~/.zshrc
477
+ # Test specific agent
478
+ codemie-code health
479
+ codemie-claude health
650
480
 
651
- # Or export again
652
- export CODEMIE_BASE_URL="..."
653
- export CODEMIE_AUTH_TOKEN="..."
654
- export CODEMIE_MODEL="..."
481
+ # Debug mode for detailed logs
482
+ codemie-code --debug
655
483
  ```
656
484
 
657
- ### Debug Mode
658
-
659
- Enable debug logging to diagnose issues:
485
+ ### Agent Installation Failures
660
486
 
661
487
  ```bash
662
- export CODEMIE_DEBUG="true"
663
- codemie-code
664
- ```
488
+ # Check internet connection
489
+ curl -I https://api.github.com
665
490
 
666
- Debug mode shows:
667
- - Tool initialization details
668
- - AI request/response info
669
- - File operation details
670
- - Error stack traces
491
+ # Clear npm cache
492
+ npm cache clean --force
671
493
 
672
- ### Clean Installation
494
+ # Retry installation
495
+ codemie install claude
496
+ ```
673
497
 
674
- If you encounter persistent issues:
498
+ ### Model Compatibility Errors
675
499
 
676
- ```bash
677
- # Clean build
678
- rm -rf dist/ node_modules/
679
- npm install
680
- npm run build
681
-
682
- # Re-link
683
- npm link
684
- ```
500
+ When you see "Model not compatible" errors:
685
501
 
686
- ---
502
+ 1. Check your configured model: `codemie config get model`
503
+ 2. Run the agent to see compatible options
504
+ 3. Set a compatible model: `codemie config set model gpt-4o`
505
+ 4. Or override temporarily: `codemie-codex --model gpt-4o`
687
506
 
688
- ## 📊 Architecture
507
+ ## Development
689
508
 
690
- ### Package Structure
509
+ ### Project Structure
691
510
 
692
511
  ```
693
512
  codemie-code/
694
- ├── bin/
695
- │ ├── codemie-code.js # AI assistant entry point
696
- └── codemie.js # CLI wrapper entry point
697
-
513
+ ├── bin/ # Executable entry points
514
+ │ ├── codemie.js # Main CLI
515
+ ├── codemie-code.js # Built-in agent
516
+ ├── codemie-claude.js # Claude shortcut
517
+ │ └── codemie-codex.js # Codex shortcut
698
518
  ├── 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
519
+ │ ├── agents/ # Agent registry and adapters
520
+ │ ├── cli/ # CLI command implementations
521
+ │ ├── env/ # Environment and config management
522
+ │ ├── workflows/ # Workflow management
523
+ │ ├── tools/ # VCS tools management
524
+ └── utils/ # Shared utilities
525
+ └── tests/ # Test files
753
526
  ```
754
527
 
755
- ### Technology Stack
756
-
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
768
-
769
- ---
770
-
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
797
-
798
- ---
799
-
800
- ## 🤝 Contributing
801
-
802
- Contributions are welcome! Please:
803
-
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
809
-
810
- ### Development Setup
528
+ ### Building
811
529
 
812
530
  ```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
- npm link
828
- codemie doctor
531
+ npm run build # Compile TypeScript
532
+ npm run dev # Watch mode
533
+ npm run lint # Check code style
534
+ npm run test # Run tests
535
+ npm run ci # Full CI pipeline
829
536
  ```
830
537
 
831
- ### Running Tests
538
+ ### Testing
832
539
 
833
540
  ```bash
834
- # Run all tests
835
- npm test
836
-
837
- # Run with coverage
838
- npm run test:coverage
839
-
840
- # Run specific test
841
- npm test -- path/to/test
842
-
843
- # Manual integration tests
844
- node tests/test-streaming.js
845
- node tests/test-agent-direct.js
846
- ```
847
-
848
- ---
849
-
850
- ## 📄 License
851
-
852
- MIT License - see LICENSE file for details
853
-
854
- ---
855
-
856
- ## 🙏 Acknowledgments
857
-
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)
862
-
863
- ---
864
-
865
- ## 📞 Support
866
-
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)
871
-
872
- ---
873
-
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
541
+ npm run build && npm link
542
+ codemie --help
885
543
  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
544
+ codemie-code health
901
545
  ```
902
546
 
903
- ### Common Tasks
547
+ ## License
904
548
 
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` |
549
+ Apache-2.0
914
550
 
915
- ---
551
+ ## Links
916
552
 
917
- **Made with ❤️ by the CodeMie Team**
553
+ - [GitHub Repository](https://github.com/codemie-ai/codemie-code)
554
+ - [Issue Tracker](https://github.com/codemie-ai/codemie-code/issues)
555
+ - [NPM Package](https://www.npmjs.com/package/@codemieai/code)