@codemieai/code 0.0.3 → 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 (257) hide show
  1. package/README.md +375 -325
  2. package/bin/codemie-claude.js +23 -0
  3. package/bin/codemie-code.js +49 -11
  4. package/bin/codemie-codex.js +12 -13
  5. package/dist/agents/adapters/claude-code.d.ts +5 -0
  6. package/dist/agents/adapters/claude-code.d.ts.map +1 -1
  7. package/dist/agents/adapters/claude-code.js +76 -18
  8. package/dist/agents/adapters/claude-code.js.map +1 -1
  9. package/dist/agents/adapters/codex.d.ts +5 -0
  10. package/dist/agents/adapters/codex.d.ts.map +1 -1
  11. package/dist/agents/adapters/codex.js +75 -17
  12. package/dist/agents/adapters/codex.js.map +1 -1
  13. package/dist/agents/codemie-code/agent.d.ts.map +1 -1
  14. package/dist/agents/codemie-code/agent.js +187 -21
  15. package/dist/agents/codemie-code/agent.js.map +1 -1
  16. package/dist/agents/codemie-code/config.d.ts.map +1 -1
  17. package/dist/agents/codemie-code/config.js +29 -27
  18. package/dist/agents/codemie-code/config.js.map +1 -1
  19. package/dist/agents/codemie-code/index.d.ts +16 -2
  20. package/dist/agents/codemie-code/index.d.ts.map +1 -1
  21. package/dist/agents/codemie-code/index.js +74 -6
  22. package/dist/agents/codemie-code/index.js.map +1 -1
  23. package/dist/agents/codemie-code/modes/contextAwarePlanning.d.ts +87 -0
  24. package/dist/agents/codemie-code/modes/contextAwarePlanning.d.ts.map +1 -0
  25. package/dist/agents/codemie-code/modes/contextAwarePlanning.js +957 -0
  26. package/dist/agents/codemie-code/modes/contextAwarePlanning.js.map +1 -0
  27. package/dist/agents/codemie-code/modes/planMode.d.ts +116 -0
  28. package/dist/agents/codemie-code/modes/planMode.d.ts.map +1 -0
  29. package/dist/agents/codemie-code/modes/planMode.js +537 -0
  30. package/dist/agents/codemie-code/modes/planMode.js.map +1 -0
  31. package/dist/agents/codemie-code/prompts.d.ts +29 -0
  32. package/dist/agents/codemie-code/prompts.d.ts.map +1 -1
  33. package/dist/agents/codemie-code/prompts.js +129 -0
  34. package/dist/agents/codemie-code/prompts.js.map +1 -1
  35. package/dist/agents/codemie-code/storage/todoStorage.d.ts +78 -0
  36. package/dist/agents/codemie-code/storage/todoStorage.d.ts.map +1 -0
  37. package/dist/agents/codemie-code/storage/todoStorage.js +225 -0
  38. package/dist/agents/codemie-code/storage/todoStorage.js.map +1 -0
  39. package/dist/agents/codemie-code/tokenUtils.js +1 -1
  40. package/dist/agents/codemie-code/tokenUtils.js.map +1 -1
  41. package/dist/agents/codemie-code/tools/index.d.ts +26 -0
  42. package/dist/agents/codemie-code/tools/index.d.ts.map +1 -1
  43. package/dist/agents/codemie-code/tools/index.js +182 -14
  44. package/dist/agents/codemie-code/tools/index.js.map +1 -1
  45. package/dist/agents/codemie-code/tools/planning.d.ts +53 -0
  46. package/dist/agents/codemie-code/tools/planning.d.ts.map +1 -0
  47. package/dist/agents/codemie-code/tools/planning.js +224 -0
  48. package/dist/agents/codemie-code/tools/planning.js.map +1 -0
  49. package/dist/agents/codemie-code/types.d.ts +170 -6
  50. package/dist/agents/codemie-code/types.d.ts.map +1 -1
  51. package/dist/agents/codemie-code/types.js.map +1 -1
  52. package/dist/agents/codemie-code/ui/progressTracker.d.ts +125 -0
  53. package/dist/agents/codemie-code/ui/progressTracker.d.ts.map +1 -0
  54. package/dist/agents/codemie-code/ui/progressTracker.js +343 -0
  55. package/dist/agents/codemie-code/ui/progressTracker.js.map +1 -0
  56. package/dist/agents/codemie-code/ui/todoPanel.d.ts +112 -0
  57. package/dist/agents/codemie-code/ui/todoPanel.d.ts.map +1 -0
  58. package/dist/agents/codemie-code/ui/todoPanel.js +318 -0
  59. package/dist/agents/codemie-code/ui/todoPanel.js.map +1 -0
  60. package/dist/agents/codemie-code/ui.d.ts +106 -10
  61. package/dist/agents/codemie-code/ui.d.ts.map +1 -1
  62. package/dist/agents/codemie-code/ui.js +913 -129
  63. package/dist/agents/codemie-code/ui.js.map +1 -1
  64. package/dist/agents/codemie-code/utils/progressionEnforcer.d.ts +87 -0
  65. package/dist/agents/codemie-code/utils/progressionEnforcer.d.ts.map +1 -0
  66. package/dist/agents/codemie-code/utils/progressionEnforcer.js +293 -0
  67. package/dist/agents/codemie-code/utils/progressionEnforcer.js.map +1 -0
  68. package/dist/agents/codemie-code/utils/todoParser.d.ts +41 -0
  69. package/dist/agents/codemie-code/utils/todoParser.d.ts.map +1 -0
  70. package/dist/agents/codemie-code/utils/todoParser.js +305 -0
  71. package/dist/agents/codemie-code/utils/todoParser.js.map +1 -0
  72. package/dist/agents/codemie-code/utils/todoValidator.d.ts +65 -0
  73. package/dist/agents/codemie-code/utils/todoValidator.d.ts.map +1 -0
  74. package/dist/agents/codemie-code/utils/todoValidator.js +249 -0
  75. package/dist/agents/codemie-code/utils/todoValidator.js.map +1 -0
  76. package/dist/agents/codemie-code/validators/planValidator.d.ts +94 -0
  77. package/dist/agents/codemie-code/validators/planValidator.d.ts.map +1 -0
  78. package/dist/agents/codemie-code/validators/planValidator.js +281 -0
  79. package/dist/agents/codemie-code/validators/planValidator.js.map +1 -0
  80. package/dist/agents/registry.d.ts.map +1 -1
  81. package/dist/agents/registry.js +7 -5
  82. package/dist/agents/registry.js.map +1 -1
  83. package/dist/cli/commands/auth.d.ts +3 -0
  84. package/dist/cli/commands/auth.d.ts.map +1 -0
  85. package/dist/cli/commands/auth.js +170 -0
  86. package/dist/cli/commands/auth.js.map +1 -0
  87. package/dist/cli/commands/config.d.ts.map +1 -1
  88. package/dist/cli/commands/config.js +40 -13
  89. package/dist/cli/commands/config.js.map +1 -1
  90. package/dist/cli/commands/doctor.d.ts.map +1 -1
  91. package/dist/cli/commands/doctor.js +209 -16
  92. package/dist/cli/commands/doctor.js.map +1 -1
  93. package/dist/cli/commands/env.js +3 -3
  94. package/dist/cli/commands/env.js.map +1 -1
  95. package/dist/cli/commands/install.d.ts.map +1 -1
  96. package/dist/cli/commands/install.js +2 -1
  97. package/dist/cli/commands/install.js.map +1 -1
  98. package/dist/cli/commands/run.d.ts.map +1 -1
  99. package/dist/cli/commands/run.js +15 -9
  100. package/dist/cli/commands/run.js.map +1 -1
  101. package/dist/cli/commands/setup.d.ts.map +1 -1
  102. package/dist/cli/commands/setup.js +177 -11
  103. package/dist/cli/commands/setup.js.map +1 -1
  104. package/dist/cli/commands/tools.d.ts +6 -0
  105. package/dist/cli/commands/tools.d.ts.map +1 -0
  106. package/dist/cli/commands/tools.js +244 -0
  107. package/dist/cli/commands/tools.js.map +1 -0
  108. package/dist/cli/commands/version.js +1 -1
  109. package/dist/cli/commands/version.js.map +1 -1
  110. package/dist/cli/commands/workflow.d.ts +6 -0
  111. package/dist/cli/commands/workflow.d.ts.map +1 -0
  112. package/dist/cli/commands/workflow.js +424 -0
  113. package/dist/cli/commands/workflow.js.map +1 -0
  114. package/dist/cli/index.js +39 -5
  115. package/dist/cli/index.js.map +1 -1
  116. package/dist/clients/adapters/github.d.ts +17 -0
  117. package/dist/clients/adapters/github.d.ts.map +1 -0
  118. package/dist/clients/adapters/github.js +150 -0
  119. package/dist/clients/adapters/github.js.map +1 -0
  120. package/dist/clients/adapters/gitlab.d.ts +17 -0
  121. package/dist/clients/adapters/gitlab.d.ts.map +1 -0
  122. package/dist/clients/adapters/gitlab.js +147 -0
  123. package/dist/clients/adapters/gitlab.js.map +1 -0
  124. package/dist/clients/registry.d.ts +20 -0
  125. package/dist/clients/registry.d.ts.map +1 -0
  126. package/dist/clients/registry.js +27 -0
  127. package/dist/clients/registry.js.map +1 -0
  128. package/dist/tools/detector.d.ts +33 -0
  129. package/dist/tools/detector.d.ts.map +1 -0
  130. package/dist/tools/detector.js +145 -0
  131. package/dist/tools/detector.js.map +1 -0
  132. package/dist/tools/index.d.ts +8 -0
  133. package/dist/tools/index.d.ts.map +1 -0
  134. package/dist/tools/index.js +8 -0
  135. package/dist/tools/index.js.map +1 -0
  136. package/dist/tools/manager.d.ts +21 -0
  137. package/dist/tools/manager.d.ts.map +1 -0
  138. package/dist/tools/manager.js +104 -0
  139. package/dist/tools/manager.js.map +1 -0
  140. package/dist/tools/registry.d.ts +8 -0
  141. package/dist/tools/registry.d.ts.map +1 -0
  142. package/dist/tools/registry.js +36 -0
  143. package/dist/tools/registry.js.map +1 -0
  144. package/dist/tools/types.d.ts +41 -0
  145. package/dist/tools/types.d.ts.map +1 -0
  146. package/dist/tools/types.js +5 -0
  147. package/dist/tools/types.js.map +1 -0
  148. package/dist/types/sso.d.ts +42 -0
  149. package/dist/types/sso.d.ts.map +1 -0
  150. package/dist/types/sso.js +2 -0
  151. package/dist/types/sso.js.map +1 -0
  152. package/dist/utils/agent-compatibility.d.ts +32 -0
  153. package/dist/utils/agent-compatibility.d.ts.map +1 -0
  154. package/dist/utils/agent-compatibility.js +140 -0
  155. package/dist/utils/agent-compatibility.js.map +1 -0
  156. package/dist/utils/codemie-integration-validator.d.ts +17 -0
  157. package/dist/utils/codemie-integration-validator.d.ts.map +1 -0
  158. package/dist/utils/codemie-integration-validator.js +105 -0
  159. package/dist/utils/codemie-integration-validator.js.map +1 -0
  160. package/dist/utils/codemie-model-fetcher.d.ts +11 -0
  161. package/dist/utils/codemie-model-fetcher.d.ts.map +1 -0
  162. package/dist/utils/codemie-model-fetcher.js +242 -0
  163. package/dist/utils/codemie-model-fetcher.js.map +1 -0
  164. package/dist/utils/config-loader.d.ts +23 -1
  165. package/dist/utils/config-loader.d.ts.map +1 -1
  166. package/dist/utils/config-loader.js +73 -27
  167. package/dist/utils/config-loader.js.map +1 -1
  168. package/dist/utils/credential-store.d.ts +16 -0
  169. package/dist/utils/credential-store.d.ts.map +1 -0
  170. package/dist/utils/credential-store.js +109 -0
  171. package/dist/utils/credential-store.js.map +1 -0
  172. package/dist/utils/first-time.d.ts +1 -1
  173. package/dist/utils/first-time.d.ts.map +1 -1
  174. package/dist/utils/first-time.js +52 -71
  175. package/dist/utils/first-time.js.map +1 -1
  176. package/dist/utils/health-checker.d.ts.map +1 -1
  177. package/dist/utils/health-checker.js +5 -1
  178. package/dist/utils/health-checker.js.map +1 -1
  179. package/dist/utils/model-fetcher.d.ts.map +1 -1
  180. package/dist/utils/model-fetcher.js +15 -2
  181. package/dist/utils/model-fetcher.js.map +1 -1
  182. package/dist/utils/sso-auth.d.ts +15 -0
  183. package/dist/utils/sso-auth.d.ts.map +1 -0
  184. package/dist/utils/sso-auth.js +207 -0
  185. package/dist/utils/sso-auth.js.map +1 -0
  186. package/dist/utils/sso-gateway.d.ts +47 -0
  187. package/dist/utils/sso-gateway.d.ts.map +1 -0
  188. package/dist/utils/sso-gateway.js +298 -0
  189. package/dist/utils/sso-gateway.js.map +1 -0
  190. package/dist/workflows/detector.d.ts +37 -0
  191. package/dist/workflows/detector.d.ts.map +1 -0
  192. package/dist/workflows/detector.js +160 -0
  193. package/dist/workflows/detector.js.map +1 -0
  194. package/dist/workflows/index.d.ts +8 -0
  195. package/dist/workflows/index.d.ts.map +1 -0
  196. package/dist/workflows/index.js +8 -0
  197. package/dist/workflows/index.js.map +1 -0
  198. package/dist/workflows/installer.d.ts +24 -0
  199. package/dist/workflows/installer.d.ts.map +1 -0
  200. package/dist/workflows/installer.js +105 -0
  201. package/dist/workflows/installer.js.map +1 -0
  202. package/dist/workflows/registry.d.ts +29 -0
  203. package/dist/workflows/registry.d.ts.map +1 -0
  204. package/dist/workflows/registry.js +54 -0
  205. package/dist/workflows/registry.js.map +1 -0
  206. package/dist/workflows/templates/github/metadata.d.ts +6 -0
  207. package/dist/workflows/templates/github/metadata.d.ts.map +1 -0
  208. package/dist/workflows/templates/github/metadata.js +111 -0
  209. package/dist/workflows/templates/github/metadata.js.map +1 -0
  210. package/dist/workflows/templates/gitlab/metadata.d.ts +6 -0
  211. package/dist/workflows/templates/gitlab/metadata.d.ts.map +1 -0
  212. package/dist/workflows/templates/gitlab/metadata.js +14 -0
  213. package/dist/workflows/templates/gitlab/metadata.js.map +1 -0
  214. package/dist/workflows/types.d.ts +71 -0
  215. package/dist/workflows/types.d.ts.map +1 -0
  216. package/dist/workflows/types.js +5 -0
  217. package/dist/workflows/types.js.map +1 -0
  218. package/package.json +19 -6
  219. package/src/workflows/templates/github/code-ci.yml +529 -0
  220. package/src/workflows/templates/github/inline-fix.yml +665 -0
  221. package/src/workflows/templates/github/pr-review.yml +677 -0
  222. package/.claude/agents/README.md +0 -298
  223. package/.claude/agents/release-manager.md +0 -857
  224. package/.codemie/guides/git-workflow.md +0 -493
  225. package/CLAUDE.md +0 -225
  226. package/config.example.json +0 -10
  227. package/dist/agents/codemie-code/streaming/events.d.ts +0 -7
  228. package/dist/agents/codemie-code/streaming/events.d.ts.map +0 -1
  229. package/dist/agents/codemie-code/streaming/events.js +0 -7
  230. package/dist/agents/codemie-code/streaming/events.js.map +0 -1
  231. package/dist/agents/codemie-code/streaming/formatter.d.ts +0 -2
  232. package/dist/agents/codemie-code/streaming/formatter.d.ts.map +0 -1
  233. package/dist/agents/codemie-code/streaming/formatter.js +0 -2
  234. package/dist/agents/codemie-code/streaming/formatter.js.map +0 -1
  235. package/dist/agents/codemie-code/streaming/ui.d.ts +0 -2
  236. package/dist/agents/codemie-code/streaming/ui.d.ts.map +0 -1
  237. package/dist/agents/codemie-code/streaming/ui.js +0 -2
  238. package/dist/agents/codemie-code/streaming/ui.js.map +0 -1
  239. package/dist/agents/codemie-code/tools/command.d.ts +0 -2
  240. package/dist/agents/codemie-code/tools/command.d.ts.map +0 -1
  241. package/dist/agents/codemie-code/tools/command.js +0 -2
  242. package/dist/agents/codemie-code/tools/command.js.map +0 -1
  243. package/dist/agents/codemie-code/tools/filesystem.d.ts +0 -2
  244. package/dist/agents/codemie-code/tools/filesystem.d.ts.map +0 -1
  245. package/dist/agents/codemie-code/tools/filesystem.js +0 -2
  246. package/dist/agents/codemie-code/tools/filesystem.js.map +0 -1
  247. package/dist/agents/codemie-code/tools/git.d.ts +0 -2
  248. package/dist/agents/codemie-code/tools/git.d.ts.map +0 -1
  249. package/dist/agents/codemie-code/tools/git.js +0 -2
  250. package/dist/agents/codemie-code/tools/git.js.map +0 -1
  251. package/dist/agents/codemie-code/tools/security.d.ts +0 -2
  252. package/dist/agents/codemie-code/tools/security.d.ts.map +0 -1
  253. package/dist/agents/codemie-code/tools/security.js +0 -2
  254. package/dist/agents/codemie-code/tools/security.js.map +0 -1
  255. package/eslint.config.mjs +0 -43
  256. package/scripts/README.md +0 -80
  257. package/scripts/release.sh +0 -156
package/README.md CHANGED
@@ -1,25 +1,79 @@
1
- # CodeMie
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
2
51
 
3
- > CLI wrapper for managing multiple AI coding agents
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
+ ```
4
58
 
5
- CodeMie is a unified CLI tool for installing, configuring, and running multiple AI coding agents (Claude Code, Codex, etc.) from a single interface.
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.
6
60
 
7
- ## Features
61
+ ## Quick Start
8
62
 
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
63
+ ```bash
64
+ # 1. Install
65
+ npm install -g @codemieai/code
17
66
 
18
- ---
67
+ # 2. Setup (interactive wizard)
68
+ codemie setup
19
69
 
20
- ## 📦 Installation
70
+ # 3. Start coding with built-in agent
71
+ codemie-code "Review my code for bugs"
72
+ ```
73
+
74
+ ## Installation
21
75
 
22
- ### From npm (when published)
76
+ ### From npm (Recommended)
23
77
 
24
78
  ```bash
25
79
  npm install -g @codemieai/code
@@ -28,478 +82,474 @@ npm install -g @codemieai/code
28
82
  ### From Source (Development)
29
83
 
30
84
  ```bash
31
- # Clone the repository
32
85
  git clone https://github.com/codemie-ai/codemie-code.git
33
86
  cd codemie-code
34
-
35
- # Install dependencies
36
- npm install
37
-
38
- # Build the project
39
- npm run build
40
-
41
- # Link globally for testing
42
- npm link
87
+ npm install && npm run build && npm link
43
88
  ```
44
89
 
45
90
  ### Verify Installation
46
91
 
47
92
  ```bash
48
- # Check if command is available
49
93
  codemie --help
50
-
51
- # Run health check
52
94
  codemie doctor
53
95
  ```
54
96
 
55
- ---
97
+ ## Usage
56
98
 
57
- ## 🚀 Quick Start
99
+ ### Built-in Agent (CodeMie Native)
58
100
 
59
- ### Installation Setup Use
101
+ Ready to use immediately - no installation required:
60
102
 
61
- CodeMie follows a simple three-step workflow:
103
+ ```bash
104
+ # Interactive conversation
105
+ codemie-code
62
106
 
63
- ```
64
- 1. Install 2. Setup (Wizard OR Manual) → 3. Use (Install & Run Agents)
65
- ```
107
+ # Execute single task
108
+ codemie-code --task "fix bugs in src/utils"
66
109
 
67
- ### Step 1: Install
110
+ # Start with initial message
111
+ codemie-code "Help me refactor this component"
68
112
 
69
- ```bash
70
- npm install -g @codemieai/code
113
+ # Debug mode
114
+ codemie-code --debug
71
115
  ```
72
116
 
73
- ### Step 2: Setup (Choose One Method)
74
-
75
- #### Method A: Interactive Setup Wizard (Recommended)
117
+ ### External Agents
76
118
 
77
- Best for most users - guided configuration with connection testing:
119
+ Install and run external agents:
78
120
 
79
121
  ```bash
80
- codemie setup
81
- ```
122
+ # Install agents
123
+ codemie install claude
124
+ codemie install codex
82
125
 
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`
126
+ # Run via shortcuts (recommended)
127
+ codemie-claude -p "Review my API code"
128
+ codemie-codex --task "Generate unit tests"
90
129
 
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
130
+ # Or run through main CLI
131
+ codemie run claude --task "Fix security issues"
132
+ ```
97
133
 
98
- #### Method B: Manual Configuration Guide
134
+ ## Commands
99
135
 
100
- Best for automated setups or when you have credentials ready:
136
+ ### Core Commands
101
137
 
102
138
  ```bash
103
- # View detailed setup guide with examples
104
- codemie env
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
105
148
  ```
106
149
 
107
- ### Step 3: Use Agents
150
+ ### Agent Shortcuts
108
151
 
109
- #### Try the Built-in Agent (Recommended for New Users)
152
+ Direct access to agents with automatic configuration:
153
+
154
+ ```bash
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
159
+
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
164
+
165
+ # Configuration overrides
166
+ codemie-claude --model claude-4-5-sonnet --api-key your-key
167
+ codemie-codex --model gpt-4o --provider openai
168
+ ```
110
169
 
111
- **CodeMie Native** is built-in and ready to use immediately:
170
+ ### Configuration Commands
112
171
 
113
172
  ```bash
114
- # Start interactive session
115
- codemie run 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
177
+ ```
116
178
 
117
- # OR use direct executable
118
- codemie-code
179
+ ## Configuration
119
180
 
120
- # Execute single task
121
- codemie-code --task "Help me debug this error"
181
+ ### Setup Wizard (Recommended)
122
182
 
123
- # With initial message
124
- codemie-code "Review my code for bugs"
183
+ Run the interactive setup wizard:
184
+
185
+ ```bash
186
+ codemie setup
125
187
  ```
126
188
 
127
- #### Install Additional Agents
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`
128
194
 
129
- ```bash
130
- # Install Claude Code
131
- codemie install claude
195
+ ### Supported Providers
132
196
 
133
- # Install Codex
134
- codemie install codex
135
- ```
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
202
+
203
+ ### Manual Configuration
136
204
 
137
- #### List Available Agents
205
+ #### Environment Variables (Highest Priority)
138
206
 
139
207
  ```bash
140
- codemie list
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"
213
+
214
+ # Provider-specific
215
+ export OPENAI_API_KEY="your-openai-key"
216
+ export OPENAI_BASE_URL="https://api.openai.com/v1"
141
217
  ```
142
218
 
143
- #### Run an Agent
219
+ #### Configuration File
144
220
 
145
- Agents are run directly after installation. Configuration is automatically passed from `~/.codemie/config.json`.
221
+ Location: `~/.codemie/config.json`
146
222
 
147
- ```bash
148
- # Run built-in CodeMie Native
149
- codemie run codemie-code
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
+ }
231
+ ```
150
232
 
151
- # Run Claude
152
- codemie run claude
233
+ ### Model Compatibility
153
234
 
154
- # Run Codex
155
- codemie run codex
156
- ```
235
+ AI/Run CodeMie CLI automatically validates model compatibility:
157
236
 
158
- **Automatic Model Validation:**
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
159
240
 
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
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
163
245
 
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
246
+ ## Authentication & SSO Management
170
247
 
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.)
248
+ ### AI/Run CodeMie SSO Setup
176
249
 
177
- ---
250
+ For enterprise environments with AI/Run CodeMie SSO (Single Sign-On):
178
251
 
179
- ## 📚 Available Commands
252
+ #### Initial Setup via Wizard
180
253
 
181
- ### Core Commands
254
+ The setup wizard automatically detects and configures AI/Run CodeMie SSO:
182
255
 
183
256
  ```bash
184
- # Setup wizard (interactive configuration)
185
257
  codemie setup
258
+ ```
186
259
 
187
- # Environment configuration guide
188
- codemie env
189
-
190
- # List all available agents
191
- codemie list
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`
192
266
 
193
- # Install an agent
194
- codemie install <agent>
267
+ #### Manual SSO Authentication
195
268
 
196
- # Uninstall an agent
197
- codemie uninstall <agent>
269
+ If you need to authenticate separately or refresh your credentials:
198
270
 
199
- # Run an agent
200
- codemie run <agent>
271
+ ```bash
272
+ # Authenticate with AI/Run CodeMie SSO
273
+ codemie auth login --url https://your-airun-codemie-instance.com
201
274
 
202
- # Check installation and configuration
203
- codemie doctor
275
+ # Check authentication status
276
+ codemie auth status
204
277
 
205
- # Manage configuration
206
- codemie config [options]
278
+ # Refresh expired tokens
279
+ codemie auth refresh
207
280
 
208
- # Show version
209
- codemie version
281
+ # Logout and clear credentials
282
+ codemie auth logout
210
283
  ```
211
284
 
212
- ### Built-in Agent Commands
213
-
214
- ```bash
215
- # CodeMie Native - Interactive mode
216
- codemie-code
285
+ ### Token Management
217
286
 
218
- # CodeMie Native - Single task execution
219
- codemie-code --task "Your task here"
287
+ SSO tokens are automatically managed but you can control them manually:
220
288
 
221
- # CodeMie Native - With initial message
222
- codemie-code "Your initial message"
289
+ #### Token Refresh
223
290
 
224
- # CodeMie Native - Health check
225
- codemie-code health
291
+ AI/Run CodeMie CLI automatically refreshes tokens when they expire. For manual refresh:
226
292
 
227
- # CodeMie Native - Debug mode
228
- codemie-code --debug
293
+ ```bash
294
+ # Refresh SSO credentials (extends session)
295
+ codemie auth refresh
229
296
  ```
230
297
 
231
- ### Direct Agent Shortcuts
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
303
+
304
+ #### Authentication Status
232
305
 
233
- Quick access to external agents with configuration overrides:
306
+ Check your current authentication state:
234
307
 
235
308
  ```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
241
-
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
309
+ codemie auth status
247
310
  ```
248
311
 
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
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
255
317
 
256
- ### Configuration Commands
318
+ #### Token Troubleshooting
319
+
320
+ Common authentication issues and solutions:
257
321
 
258
322
  ```bash
259
- # Set a configuration value
260
- codemie config set <key> <value>
323
+ # Token expired
324
+ codemie auth refresh
261
325
 
262
- # Get a configuration value
263
- codemie config get <key>
326
+ # Connection issues
327
+ codemie doctor # Full system diagnostics
328
+ codemie auth status # Check auth-specific issues
264
329
 
265
- # List all configuration
266
- codemie config list
330
+ # Complete re-authentication
331
+ codemie auth logout
332
+ codemie auth login --url https://your-airun-codemie-instance.com
267
333
 
268
- # Reset configuration
334
+ # Reset all configuration
269
335
  codemie config reset
270
-
271
- # Advanced: Change timeout (default: 300 seconds)
272
- codemie config set timeout 600
336
+ codemie setup # Run wizard again
273
337
  ```
274
338
 
275
- ---
276
-
277
- ## ⚙️ Configuration
339
+ ### Enterprise SSO Features
278
340
 
279
- CodeMie stores configuration in `~/.codemie/config.json`:
341
+ AI/Run CodeMie SSO provides enterprise-grade features:
280
342
 
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
- }
291
- ```
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
292
348
 
293
- ### Supported Providers
349
+ ## Examples
294
350
 
295
- - **anthropic** - Anthropic Claude API
296
- - **openai** - OpenAI API
297
- - **azure** - Azure OpenAI
298
- - **bedrock** - AWS Bedrock
299
- - **litellm** - LiteLLM Proxy (custom)
351
+ ### Common Workflows
300
352
 
301
- ### Environment Variables
353
+ ```bash
354
+ # Code review workflow
355
+ codemie-code "Review this PR for security issues and performance"
302
356
 
303
- You can also configure via environment variables (higher priority than config file):
357
+ # Bug fixing
358
+ codemie-claude -p "Fix the authentication bug in src/auth.ts"
304
359
 
305
- ```bash
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"
360
+ # Test generation
361
+ codemie-codex --task "Generate comprehensive tests for the API endpoints"
310
362
 
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"
363
+ # Documentation
364
+ codemie-code "Document the functions in utils/helpers.js"
315
365
 
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"
366
+ # Refactoring
367
+ codemie-claude -p "Refactor this component to use React hooks"
320
368
  ```
321
369
 
322
- ---
370
+ ### Configuration Examples
323
371
 
324
- ## 🤖 Supported Agents
372
+ ```bash
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
325
377
 
326
- ### CodeMie Native (Built-in) ⭐
378
+ # Temporary model override
379
+ codemie-claude --model claude-4-5-sonnet -p "Explain this algorithm"
327
380
 
328
- **NEW:** CodeMie's built-in LangGraph-based coding assistant. No external installation required!
381
+ # Debug mode for troubleshooting
382
+ codemie-code --debug --task "analyze performance issues"
383
+ ```
329
384
 
330
- **Usage:**
331
- ```bash
332
- # Interactive mode
333
- codemie run codemie-code
385
+ ### Advanced Usage
334
386
 
335
- # Direct executable (alternative)
336
- codemie-code
387
+ ```bash
388
+ # Run specific agent versions
389
+ codemie run claude --version latest
337
390
 
338
- # Single task execution
339
- codemie-code --task "Fix the bug in utils.js"
391
+ # Pass custom arguments
392
+ codemie-codex --temperature 0.1 --max-tokens 2000 "Generate clean code"
340
393
 
341
- # With initial message
342
- codemie-code "Help me refactor this component"
394
+ # Health checks
395
+ codemie doctor # Full system check
396
+ codemie-code health # Built-in agent check
397
+ codemie-claude health # Claude agent check
343
398
  ```
344
399
 
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
354
-
355
- **Direct Commands:**
356
- ```bash
357
- # Health check
358
- codemie-code health
400
+ ## Agents
359
401
 
360
- # Interactive mode with debug
361
- codemie-code --debug
402
+ ### CodeMie Native (Built-in)
362
403
 
363
- # Execute task and exit
364
- codemie-code --task "Run tests and fix any failures"
404
+ LangGraph-based coding assistant with no installation required.
405
+
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
413
+
414
+ **Usage:**
415
+ ```bash
416
+ codemie-code # Interactive mode
417
+ codemie-code --task "task" # Single task
418
+ codemie-code --debug # Debug mode
365
419
  ```
366
420
 
367
421
  ### Claude Code
368
422
 
369
- Anthropic's official CLI for Claude AI. Provides advanced code understanding, generation, and refactoring capabilities.
423
+ Anthropic's official CLI with advanced code understanding.
370
424
 
371
- **Installation:**
372
- ```bash
373
- codemie install claude
374
- ```
425
+ **Installation:** `codemie install claude`
375
426
 
376
427
  **Features:**
377
- - Advanced code understanding
378
- - Multi-file editing
379
- - Interactive conversations
428
+ - Advanced code understanding and generation
429
+ - Multi-file editing capabilities
380
430
  - Project-aware context
431
+ - Interactive conversations
381
432
 
382
433
  ### Codex
383
434
 
384
- OpenAI's code generation assistant. Optimized for code completion and generation tasks.
435
+ OpenAI's code generation assistant optimized for completion tasks.
385
436
 
386
- **Installation:**
387
- ```bash
388
- codemie install codex
389
- ```
437
+ **Installation:** `codemie install codex`
390
438
 
391
439
  **Features:**
392
- - Code completion
393
- - Function generation
394
- - Bug fixing
395
- - Code explanation
440
+ - Code completion and generation
441
+ - Function generation and bug fixing
442
+ - Code explanation and documentation
443
+ - **Requires OpenAI-compatible models only**
396
444
 
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)
445
+ ## Troubleshooting
400
446
 
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.
447
+ ### Command Not Found
402
448
 
403
- ---
449
+ ```bash
450
+ # Re-link the package
451
+ npm link
452
+ which codemie
404
453
 
405
- ## 🛠️ Development
454
+ # Check installation
455
+ npm list -g @codemieai/code
456
+ ```
406
457
 
407
- ### Project Structure
458
+ ### Configuration Issues
408
459
 
409
- ```
410
- codemie-code/
411
- ├── bin/
412
- │ └── codemie.js # CLI entry point
413
- ├── src/
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
460
+ ```bash
461
+ # Run setup wizard
462
+ codemie setup
463
+
464
+ # Check current config
465
+ codemie config list
466
+
467
+ # Reset if needed
468
+ codemie config reset
424
469
  ```
425
470
 
426
- ### Building
471
+ ### Connection Problems
427
472
 
428
473
  ```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
- ```
474
+ # Run diagnostics
475
+ codemie doctor
434
476
 
435
- ### Testing
477
+ # Test specific agent
478
+ codemie-code health
479
+ codemie-claude health
436
480
 
437
- After building, test the CLI locally:
481
+ # Debug mode for detailed logs
482
+ codemie-code --debug
483
+ ```
484
+
485
+ ### Agent Installation Failures
438
486
 
439
487
  ```bash
440
- # Build and link
441
- npm run build && npm link
488
+ # Check internet connection
489
+ curl -I https://api.github.com
442
490
 
443
- # Test commands
444
- codemie --help
445
- codemie list
446
- codemie doctor
491
+ # Clear npm cache
492
+ npm cache clean --force
493
+
494
+ # Retry installation
495
+ codemie install claude
447
496
  ```
448
497
 
449
- ---
498
+ ### Model Compatibility Errors
450
499
 
451
- ## 🐛 Troubleshooting
500
+ When you see "Model not compatible" errors:
452
501
 
453
- ### Command not found after installation
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`
454
506
 
455
- Re-link the package:
456
- ```bash
457
- npm link
458
- which codemie
459
- ```
507
+ ## Development
460
508
 
461
- ### Configuration not found
509
+ ### Project Structure
462
510
 
463
- Run the setup wizard:
464
- ```bash
465
- codemie setup
466
511
  ```
467
-
468
- Or check your configuration:
469
- ```bash
470
- codemie config list
512
+ codemie-code/
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
518
+ ├── src/
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
471
526
  ```
472
527
 
473
- ### Agent installation fails
528
+ ### Building
474
529
 
475
- Check your internet connection and try again:
476
530
  ```bash
477
- codemie install <agent>
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
478
536
  ```
479
537
 
480
- ### Connection issues
538
+ ### Testing
481
539
 
482
- Verify your configuration:
483
540
  ```bash
541
+ npm run build && npm link
542
+ codemie --help
484
543
  codemie doctor
544
+ codemie-code health
485
545
  ```
486
546
 
487
- ---
488
-
489
- ## 📄 License
547
+ ## License
490
548
 
491
549
  Apache-2.0
492
550
 
493
- ---
494
-
495
- ## 🤝 Contributing
496
-
497
- Contributions are welcome! Please read our contributing guidelines before submitting PRs.
498
-
499
- ---
500
-
501
- ## 🔗 Links
551
+ ## Links
502
552
 
503
553
  - [GitHub Repository](https://github.com/codemie-ai/codemie-code)
504
554
  - [Issue Tracker](https://github.com/codemie-ai/codemie-code/issues)
505
- - [NPM Package](https://www.npmjs.com/package/@codemieai/code)
555
+ - [NPM Package](https://www.npmjs.com/package/@codemieai/code)