aemeathcli 1.0.10 → 1.0.11

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 (208) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +609 -608
  3. package/dist/App-YAHJUWCX.js +4274 -0
  4. package/dist/App-YAHJUWCX.js.map +1 -0
  5. package/dist/agent-store/architect.md +32 -0
  6. package/dist/agent-store/debugger.md +32 -0
  7. package/dist/agent-store/developer.md +29 -0
  8. package/dist/agent-store/documenter.md +30 -0
  9. package/dist/agent-store/researcher.md +31 -0
  10. package/dist/agent-store/reviewer.md +28 -0
  11. package/dist/agent-store/supervisor.md +37 -0
  12. package/dist/agent-store/tester.md +30 -0
  13. package/dist/api-key-fallback-UN3TJEOO.js +11 -0
  14. package/dist/{api-key-fallback-YQQBOQIL.js.map → api-key-fallback-UN3TJEOO.js.map} +1 -1
  15. package/dist/auth-status-EIM5A5KL.js +13 -0
  16. package/dist/auth-status-EIM5A5KL.js.map +1 -0
  17. package/dist/{chunk-UY2SYSEZ.js → chunk-25UNNEHN.js} +32 -103
  18. package/dist/chunk-25UNNEHN.js.map +1 -0
  19. package/dist/{chunk-CYQNBB25.js → chunk-2GKOK6T7.js} +28 -5
  20. package/dist/chunk-2GKOK6T7.js.map +1 -0
  21. package/dist/{chunk-MFBHNWGV.js → chunk-2LF7ALGR.js} +12 -20
  22. package/dist/chunk-2LF7ALGR.js.map +1 -0
  23. package/dist/{chunk-H66O5Z2V.js → chunk-2NWNIKBK.js} +42 -7
  24. package/dist/chunk-2NWNIKBK.js.map +1 -0
  25. package/dist/chunk-3TSPZRGM.js +26 -0
  26. package/dist/chunk-3TSPZRGM.js.map +1 -0
  27. package/dist/{chunk-ZGOHARPV.js → chunk-473JN6M5.js} +2 -2
  28. package/dist/chunk-473JN6M5.js.map +1 -0
  29. package/dist/{chunk-IYW62KKR.js → chunk-5XFSV6PF.js} +66 -23
  30. package/dist/chunk-5XFSV6PF.js.map +1 -0
  31. package/dist/{chunk-HCIHOHLX.js → chunk-62HSGYQD.js} +2 -2
  32. package/dist/chunk-62HSGYQD.js.map +1 -0
  33. package/dist/{chunk-I5PZ4JTS.js → chunk-6GUD7QIM.js} +4 -4
  34. package/dist/chunk-6GUD7QIM.js.map +1 -0
  35. package/dist/{chunk-4IJD72YB.js → chunk-AQ23TYSQ.js} +7 -7
  36. package/dist/chunk-AQ23TYSQ.js.map +1 -0
  37. package/dist/{chunk-NBR3GHMT.js → chunk-BY4DAKUU.js} +39 -7
  38. package/dist/chunk-BY4DAKUU.js.map +1 -0
  39. package/dist/chunk-CC7MGWYY.js +12 -0
  40. package/dist/chunk-CC7MGWYY.js.map +1 -0
  41. package/dist/chunk-CTFZTARK.js +155 -0
  42. package/dist/chunk-CTFZTARK.js.map +1 -0
  43. package/dist/chunk-FIC7AK4Q.js +232 -0
  44. package/dist/chunk-FIC7AK4Q.js.map +1 -0
  45. package/dist/chunk-GU33WKPG.js +140 -0
  46. package/dist/chunk-GU33WKPG.js.map +1 -0
  47. package/dist/{chunk-DMBPX3RG.js → chunk-H2SYKIMI.js} +10 -10
  48. package/dist/chunk-H2SYKIMI.js.map +1 -0
  49. package/dist/{chunk-JAXXTYID.js → chunk-HEKFAKVH.js} +2 -2
  50. package/dist/chunk-HEKFAKVH.js.map +1 -0
  51. package/dist/chunk-IARA5XYP.js +186 -0
  52. package/dist/chunk-IARA5XYP.js.map +1 -0
  53. package/dist/{chunk-HMJRPNPZ.js → chunk-LCYH4T6N.js} +95 -23
  54. package/dist/chunk-LCYH4T6N.js.map +1 -0
  55. package/dist/{chunk-CARHU3DO.js → chunk-LDVY5ELP.js} +66 -18
  56. package/dist/chunk-LDVY5ELP.js.map +1 -0
  57. package/dist/chunk-OCJPQFOR.js +88 -0
  58. package/dist/chunk-OCJPQFOR.js.map +1 -0
  59. package/dist/chunk-ODBY7S4X.js +141 -0
  60. package/dist/chunk-ODBY7S4X.js.map +1 -0
  61. package/dist/{chunk-DAHGLHNR.js → chunk-ONQ4WCUI.js} +7 -142
  62. package/dist/chunk-ONQ4WCUI.js.map +1 -0
  63. package/dist/{chunk-WPP3PEDE.js → chunk-P5TKZM3T.js} +32 -107
  64. package/dist/chunk-P5TKZM3T.js.map +1 -0
  65. package/dist/{chunk-RWCNNAL7.js → chunk-P66WDACW.js} +23 -22
  66. package/dist/chunk-P66WDACW.js.map +1 -0
  67. package/dist/{chunk-LSOYPSAT.js → chunk-QCRK4QEL.js} +4 -4
  68. package/dist/chunk-QCRK4QEL.js.map +1 -0
  69. package/dist/{chunk-YL5XFHR3.js → chunk-ROJPFPJ7.js} +2 -2
  70. package/dist/chunk-ROJPFPJ7.js.map +1 -0
  71. package/dist/chunk-RP2TAL3J.js +71 -0
  72. package/dist/chunk-RP2TAL3J.js.map +1 -0
  73. package/dist/{chunk-6PDJ45T4.js → chunk-RYOB3TLZ.js} +51 -26
  74. package/dist/chunk-RYOB3TLZ.js.map +1 -0
  75. package/dist/{chunk-Y5XVD2CD.js → chunk-SOQFMNQC.js} +110 -83
  76. package/dist/chunk-SOQFMNQC.js.map +1 -0
  77. package/dist/{chunk-TEVZS4FA.js → chunk-TDFTX32B.js} +16 -9
  78. package/dist/chunk-TDFTX32B.js.map +1 -0
  79. package/dist/chunk-VBLLDY4R.js +38 -0
  80. package/dist/chunk-VBLLDY4R.js.map +1 -0
  81. package/dist/{chunk-CGEV3ARR.js → chunk-VJNQJALF.js} +4 -4
  82. package/dist/chunk-VJNQJALF.js.map +1 -0
  83. package/dist/chunk-WAYSJMPS.js +26 -0
  84. package/dist/chunk-WAYSJMPS.js.map +1 -0
  85. package/dist/chunk-WC72BRHR.js +241 -0
  86. package/dist/chunk-WC72BRHR.js.map +1 -0
  87. package/dist/{chunk-MXZSI3AY.js → chunk-YPFOE2QJ.js} +43 -11
  88. package/dist/chunk-YPFOE2QJ.js.map +1 -0
  89. package/dist/claude-adapter-6P4SJH7P.js +7 -0
  90. package/dist/{claude-adapter-QMLFMSP3.js.map → claude-adapter-6P4SJH7P.js.map} +1 -1
  91. package/dist/{claude-login-5WELXPKT.js → claude-login-IS5WTBMP.js} +10 -10
  92. package/dist/claude-login-IS5WTBMP.js.map +1 -0
  93. package/dist/cli.js +371 -172
  94. package/dist/cli.js.map +1 -1
  95. package/dist/{codex-login-GZIFXUWD.js → codex-login-GMPF64MR.js} +11 -11
  96. package/dist/codex-login-GMPF64MR.js.map +1 -0
  97. package/dist/config-store-POB6I37G.js +7 -0
  98. package/dist/{config-store-W6FBCQAQ.js.map → config-store-POB6I37G.js.map} +1 -1
  99. package/dist/conversation-store-PRBHWQMJ.js +4 -0
  100. package/dist/conversation-store-PRBHWQMJ.js.map +1 -0
  101. package/dist/detect-providers-C4SVQHFF.js +4 -0
  102. package/dist/detect-providers-C4SVQHFF.js.map +1 -0
  103. package/dist/executor-RUX7VK3T.js +4 -0
  104. package/dist/{executor-6RIKIGXK.js.map → executor-RUX7VK3T.js.map} +1 -1
  105. package/dist/first-run-GDEVRFPO.js +230 -0
  106. package/dist/first-run-GDEVRFPO.js.map +1 -0
  107. package/dist/gemini-adapter-MV3U4QFH.js +7 -0
  108. package/dist/{gemini-adapter-6JIHZ7WI.js.map → gemini-adapter-MV3U4QFH.js.map} +1 -1
  109. package/dist/{gemini-login-AZGL3CE7.js → gemini-login-KE224MSW.js} +10 -10
  110. package/dist/gemini-login-KE224MSW.js.map +1 -0
  111. package/dist/index.d.ts +47 -17
  112. package/dist/index.js +86 -471
  113. package/dist/index.js.map +1 -1
  114. package/dist/input-history-MIOO3FIW.js +57 -0
  115. package/dist/input-history-MIOO3FIW.js.map +1 -0
  116. package/dist/kimi-adapter-UODMNX6K.js +6 -0
  117. package/dist/{kimi-adapter-JN4HFFHU.js.map → kimi-adapter-UODMNX6K.js.map} +1 -1
  118. package/dist/{kimi-login-6LUWB7P6.js → kimi-login-DNT5YBKX.js} +10 -10
  119. package/dist/kimi-login-DNT5YBKX.js.map +1 -0
  120. package/dist/logger-PLPDWACQ.js +3 -0
  121. package/dist/logger-PLPDWACQ.js.map +1 -0
  122. package/dist/model-discovery-O64ZWPX5.js +6 -0
  123. package/dist/model-discovery-O64ZWPX5.js.map +1 -0
  124. package/dist/native-cli-adapters-JMZX2C2C.js +8 -0
  125. package/dist/{native-cli-adapters-OLW3XX57.js.map → native-cli-adapters-JMZX2C2C.js.map} +1 -1
  126. package/dist/ollama-adapter-GE67BNSS.js +5 -0
  127. package/dist/{ollama-adapter-OJQ3FKWK.js.map → ollama-adapter-GE67BNSS.js.map} +1 -1
  128. package/dist/openai-adapter-SHPLK77L.js +7 -0
  129. package/dist/{openai-adapter-XU46EN7B.js.map → openai-adapter-SHPLK77L.js.map} +1 -1
  130. package/dist/pathResolver-A6IXQQFE.js +3 -0
  131. package/dist/pathResolver-A6IXQQFE.js.map +1 -0
  132. package/dist/profile-loader-TNAXBLDX.js +162 -0
  133. package/dist/profile-loader-TNAXBLDX.js.map +1 -0
  134. package/dist/registry-3NHVCXCZ.js +6 -0
  135. package/dist/{registry-AZ2LOHHJ.js.map → registry-3NHVCXCZ.js.map} +1 -1
  136. package/dist/registry-7CQ3NCAD.js +5 -0
  137. package/dist/{registry-H7B3AHPQ.js.map → registry-7CQ3NCAD.js.map} +1 -1
  138. package/dist/server-manager-DES23IBQ.js +5 -0
  139. package/dist/{server-manager-PTGBHCLS.js.map → server-manager-DES23IBQ.js.map} +1 -1
  140. package/dist/session-manager-EHD7GWM2.js +12 -0
  141. package/dist/{session-manager-XOMDMC77.js.map → session-manager-EHD7GWM2.js.map} +1 -1
  142. package/dist/skills/built-in/code-review/SKILL.md +85 -0
  143. package/dist/skills/built-in/commit/SKILL.md +83 -0
  144. package/dist/skills/built-in/debug/SKILL.md +119 -0
  145. package/dist/skills/built-in/plan/SKILL.md +123 -0
  146. package/dist/skills/built-in/refactor/SKILL.md +132 -0
  147. package/dist/skills/built-in/test/SKILL.md +128 -0
  148. package/dist/sqlite-store-7ZIVOUNI.js +5 -0
  149. package/dist/sqlite-store-7ZIVOUNI.js.map +1 -0
  150. package/dist/team-manager-6DCNLGTC.js +11 -0
  151. package/dist/{team-manager-HC4XGCFY.js.map → team-manager-6DCNLGTC.js.map} +1 -1
  152. package/dist/team-state-R2D7DT5M.js +3 -0
  153. package/dist/team-state-R2D7DT5M.js.map +1 -0
  154. package/dist/tmux-manager-WBKHUHDT.js +6 -0
  155. package/dist/{tmux-manager-GPYZ3WQH.js.map → tmux-manager-WBKHUHDT.js.map} +1 -1
  156. package/dist/tools-I6XCTEZY.js +6 -0
  157. package/dist/{tools-TSMXMHIF.js.map → tools-I6XCTEZY.js.map} +1 -1
  158. package/package.json +93 -89
  159. package/dist/App-FKRSMFMB.js +0 -2789
  160. package/dist/App-FKRSMFMB.js.map +0 -1
  161. package/dist/api-key-fallback-YQQBOQIL.js +0 -11
  162. package/dist/chunk-4IJD72YB.js.map +0 -1
  163. package/dist/chunk-6PDJ45T4.js.map +0 -1
  164. package/dist/chunk-CARHU3DO.js.map +0 -1
  165. package/dist/chunk-CGEV3ARR.js.map +0 -1
  166. package/dist/chunk-CS5X3BWX.js +0 -27
  167. package/dist/chunk-CS5X3BWX.js.map +0 -1
  168. package/dist/chunk-CYQNBB25.js.map +0 -1
  169. package/dist/chunk-DAHGLHNR.js.map +0 -1
  170. package/dist/chunk-DMBPX3RG.js.map +0 -1
  171. package/dist/chunk-H66O5Z2V.js.map +0 -1
  172. package/dist/chunk-HCIHOHLX.js.map +0 -1
  173. package/dist/chunk-HMJRPNPZ.js.map +0 -1
  174. package/dist/chunk-I5PZ4JTS.js.map +0 -1
  175. package/dist/chunk-IYW62KKR.js.map +0 -1
  176. package/dist/chunk-JAXXTYID.js.map +0 -1
  177. package/dist/chunk-LSOYPSAT.js.map +0 -1
  178. package/dist/chunk-MFBHNWGV.js.map +0 -1
  179. package/dist/chunk-MXZSI3AY.js.map +0 -1
  180. package/dist/chunk-NBR3GHMT.js.map +0 -1
  181. package/dist/chunk-RWCNNAL7.js.map +0 -1
  182. package/dist/chunk-TEVZS4FA.js.map +0 -1
  183. package/dist/chunk-UY2SYSEZ.js.map +0 -1
  184. package/dist/chunk-WAHVZH7V.js +0 -260
  185. package/dist/chunk-WAHVZH7V.js.map +0 -1
  186. package/dist/chunk-WPP3PEDE.js.map +0 -1
  187. package/dist/chunk-Y5XVD2CD.js.map +0 -1
  188. package/dist/chunk-YL5XFHR3.js.map +0 -1
  189. package/dist/chunk-ZGOHARPV.js.map +0 -1
  190. package/dist/claude-adapter-QMLFMSP3.js +0 -6
  191. package/dist/claude-login-5WELXPKT.js.map +0 -1
  192. package/dist/codex-login-GZIFXUWD.js.map +0 -1
  193. package/dist/config-store-W6FBCQAQ.js +0 -6
  194. package/dist/executor-6RIKIGXK.js +0 -4
  195. package/dist/gemini-adapter-6JIHZ7WI.js +0 -6
  196. package/dist/gemini-login-AZGL3CE7.js.map +0 -1
  197. package/dist/kimi-adapter-JN4HFFHU.js +0 -6
  198. package/dist/kimi-login-6LUWB7P6.js.map +0 -1
  199. package/dist/native-cli-adapters-OLW3XX57.js +0 -6
  200. package/dist/ollama-adapter-OJQ3FKWK.js +0 -6
  201. package/dist/openai-adapter-XU46EN7B.js +0 -6
  202. package/dist/registry-AZ2LOHHJ.js +0 -6
  203. package/dist/registry-H7B3AHPQ.js +0 -5
  204. package/dist/server-manager-PTGBHCLS.js +0 -5
  205. package/dist/session-manager-XOMDMC77.js +0 -12
  206. package/dist/team-manager-HC4XGCFY.js +0 -11
  207. package/dist/tmux-manager-GPYZ3WQH.js +0 -6
  208. package/dist/tools-TSMXMHIF.js +0 -6
package/README.md CHANGED
@@ -1,608 +1,609 @@
1
- <p align="center">
2
- <br />
3
- <code>&nbsp;A E M E A T H&nbsp;</code>
4
- <br />
5
- <br />
6
- <strong>Next-generation multi-model CLI coding tool</strong>
7
- <br />
8
- Agent teams &middot; Split-panel coordination &middot; Role-based routing
9
- <br />
10
- <br />
11
- <a href="https://www.npmjs.com/package/aemeathcli"><img src="https://img.shields.io/npm/v/aemeathcli?style=flat-square&color=red" alt="npm" /></a>
12
- <a href="#installation"><img src="https://img.shields.io/badge/node-%3E%3D20-brightgreen?style=flat-square" alt="Node.js >= 20" /></a>
13
- <a href="#license"><img src="https://img.shields.io/badge/license-MIT-blue?style=flat-square" alt="MIT License" /></a>
14
- <a href="#supported-models"><img src="https://img.shields.io/badge/models-9-orange?style=flat-square" alt="9 Models" /></a>
15
- <a href="#providers"><img src="https://img.shields.io/badge/providers-5-purple?style=flat-square" alt="5 Providers" /></a>
16
- </p>
17
-
18
- <br />
19
-
20
- ```
21
- ╔══════════════════════════════════════════════╗
22
- ║ Welcome to AemeathCLI ║
23
- Multi-Model CLI Coding Tool v1.0.0
24
- ╚══════════════════════════════════════════════╝
25
- ```
26
-
27
- AemeathCLI orchestrates **multiple AI models** across **parallel agent teams** in your terminal. Route Claude for planning, GPT for coding, Gemini for reviews -- all in split-panel panes (iTerm2 native on macOS, tmux elsewhere) with real-time streaming, hub-and-spoke coordination, cost tracking, and enterprise-grade security.
28
-
29
- <br />
30
-
31
- ## Table of Contents
32
-
33
- - [Why AemeathCLI](#why-aemeathcli)
34
- - [Quick Start](#quick-start)
35
- - [Installation](#installation)
36
- - [Authentication](#authentication)
37
- - [Usage](#usage)
38
- - [Supported Models](#supported-models)
39
- - [Role-Based Model Routing](#role-based-model-routing)
40
- - [Agent Teams](#agent-teams)
41
- - [Skills System](#skills-system)
42
- - [MCP Integration](#mcp-integration)
43
- - [Interactive Commands](#interactive-commands)
44
- - [Configuration](#configuration)
45
- - [Architecture](#architecture)
46
- - [Security](#security)
47
- - [Development](#development)
48
- - [License](#license)
49
-
50
- <br />
51
-
52
- ## Why AemeathCLI
53
-
54
- Most AI coding tools lock you into a single model. AemeathCLI breaks that ceiling:
55
-
56
- - **Multi-model orchestration** -- Use the right model for each task. Claude Opus for architecture, GPT-5.2 for implementation, Gemini 2.5 Pro for code review -- in one session.
57
- - **Agent teams** -- Describe what you need in plain English and the LLM designs the team. Agents spawn in iTerm2/tmux split panes with a hub-and-spoke coordination model -- a leader orchestrates, teammates execute, and results are synthesized through a shared board.
58
- - **Smart routing** -- Define role-based routing rules. When you switch to "review" mode, the system automatically picks the best model for reviewing code.
59
- - **Cost-aware** -- Real-time token counting, per-model cost tracking, configurable budget warnings and hard stops. Know exactly what you're spending.
60
- - **Skills & MCP** -- Extend functionality with YAML-defined skills and Model Context Protocol servers. Your tools, your workflow.
61
- - **Enterprise-grade** -- OS keychain storage, AES-256-GCM encryption, HMAC-SHA256 IPC auth, sandboxed execution, structured logging, typed error hierarchy.
62
-
63
- <br />
64
-
65
- ## Quick Start
66
-
67
- ```bash
68
- # Install globally
69
- npm install -g aemeathcli
70
-
71
- # Authenticate with your providers
72
- aemeathcli auth login claude
73
- aemeathcli auth login codex
74
- aemeathcli auth login gemini
75
-
76
- # Start coding
77
- aemeathcli "Refactor the authentication module to use JWT tokens"
78
- ```
79
-
80
- That's it. AemeathCLI detects your project, picks the best model, and starts streaming.
81
-
82
- <br />
83
-
84
- ## Installation
85
-
86
- ### Requirements
87
-
88
- - **Node.js** >= 20.0.0
89
- - **npm** >= 9 (or pnpm / yarn)
90
- - **tmux** (optional, for split-panel mode)
91
- - **iTerm2** (optional, macOS native pane support)
92
-
93
- ### Install
94
-
95
- ```bash
96
- npm install -g aemeathcli
97
- ```
98
-
99
- The CLI installs two commands: `aemeathcli` and the shorthand `ac`.
100
-
101
- ### Verify
102
-
103
- ```bash
104
- aemeathcli --version
105
- # 1.0.0
106
- ```
107
-
108
- ### First Run
109
-
110
- ```bash
111
- aemeathcli config init
112
- ```
113
-
114
- This launches an interactive setup wizard that walks you through provider authentication and initial configuration.
115
-
116
- <br />
117
-
118
- ## Authentication
119
-
120
- AemeathCLI supports four cloud providers with native OAuth PKCE login:
121
-
122
- ```bash
123
- # Browser-based OAuth login (recommended)
124
- aemeathcli auth login claude # Anthropic
125
- aemeathcli auth login codex # OpenAI
126
- aemeathcli auth login gemini # Google
127
- aemeathcli auth login kimi # Moonshot
128
-
129
- # Or set API keys directly
130
- aemeathcli auth set-key claude sk-ant-api03-...
131
- aemeathcli auth set-key codex sk-...
132
- aemeathcli auth set-key gemini AIza...
133
-
134
- # Check status
135
- aemeathcli auth status
136
- ```
137
-
138
- ```
139
- claude ● Logged in (user@example.com) — Pro plan
140
- codex ● Logged in (user@example.com) — Plus plan
141
- gemini ● Logged in (user@gmail.com)
142
- kimi ○ Not logged in
143
- ```
144
-
145
- Credentials are stored in your **OS keychain** (macOS Keychain, Windows Credential Vault, or Linux libsecret). An AES-256-GCM encrypted fallback is used when keychain is unavailable.
146
-
147
- ```bash
148
- # Manage sessions
149
- aemeathcli auth logout codex # Single provider
150
- aemeathcli auth logout --all # All providers
151
- aemeathcli auth switch claude # Set default provider
152
- ```
153
-
154
- <br />
155
-
156
- ## Usage
157
-
158
- ### Interactive Chat
159
-
160
- ```bash
161
- # Start interactive session
162
- aemeathcli
163
-
164
- # Start with a message
165
- aemeathcli "Explain the architecture of this project"
166
-
167
- # Specify model and role
168
- aemeathcli chat --model gpt-5.2 --role coding "Add input validation to the API"
169
-
170
- # With a custom system prompt
171
- aemeathcli chat --system "You are a security auditor" "Review this codebase"
172
- ```
173
-
174
- ### Task-Specific Modes
175
-
176
- ```bash
177
- # Planning mode uses Claude Opus by default
178
- aemeathcli plan "Design a caching layer for the API"
179
-
180
- # Code review — analyzes specified files
181
- aemeathcli review src/auth/ src/api/middleware.ts
182
-
183
- # Test generation — uses Haiku/Flash for speed
184
- aemeathcli test "Generate tests for the recent changes"
185
- ```
186
-
187
- ### Team Mode
188
-
189
- Teams are created through **natural language** in the interactive chat -- no CLI subcommands needed:
190
-
191
- ```bash
192
- # Start interactive session
193
- aemeathcli
194
-
195
- # Then describe the team you need:
196
- > Create a team to refactor the authentication module
197
- > I need agents to review this PR from security, architecture, and code quality angles
198
- > Spawn a team to build the new payment feature with planning, coding, and testing
199
- ```
200
-
201
- The LLM designs the optimal team (roles, models, agent count) and spawns each agent in its own split pane. On macOS with iTerm2, panes are native terminal splits. On Linux or inside tmux, panes use tmux splits. Stop a team with `/team stop`.
202
-
203
- ```
204
- ┌───────────────────────┬───────────────────────┐
205
- LeadArchitect │ BackendDev │
206
- │ (Claude Opus 4.6) │ (Claude Sonnet 4.6) │
207
- Role: planning │ Role: coding │
208
- │ ├───────────────────────┤
209
- Coordinates team, │ SecurityAuditor │
210
- synthesizes results │ (GPT-5.2 Codex) │
211
- │ │ Role: review │
212
- └───────────────────────┴───────────────────────┘
213
- ```
214
-
215
- <br />
216
-
217
- ## Supported Models
218
-
219
- AemeathCLI ships with 9 models across 5 providers:
220
-
221
- | Model | Provider | Context | Output | Input $/M | Output $/M |
222
- |:------|:---------|--------:|-------:|----------:|-----------:|
223
- | **claude-opus-4-6** | Anthropic | 200K | 32K | $15.00 | $75.00 |
224
- | **claude-sonnet-4-6** | Anthropic | 200K | 16K | $3.00 | $15.00 |
225
- | **claude-haiku-4-5** | Anthropic | 200K | 8K | $0.80 | $4.00 |
226
- | **gpt-5.2** | OpenAI | 256K | 32K | $2.50 | $10.00 |
227
- | **gpt-5.2-mini** | OpenAI | 256K | 16K | $0.15 | $0.60 |
228
- | **o3** | OpenAI | 256K | 100K | $10.00 | $40.00 |
229
- | **gemini-2.5-pro** | Google | 2M | 64K | $1.25 | $10.00 |
230
- | **gemini-2.5-flash** | Google | 2M | 64K | $0.15 | $0.60 |
231
- | **kimi-k2.5** | Moonshot | 128K | 8K | $0.50 | $2.00 |
232
-
233
- Local models via **Ollama** (Llama, Mistral, etc.) are also supported with a configurable base URL.
234
-
235
- <br />
236
-
237
- ## Role-Based Model Routing
238
-
239
- AemeathCLI automatically selects the best model for each task through a 4-step resolution pipeline:
240
-
241
- ```
242
- User Override → Role Config → Fallback Chain → System Default
243
- ```
244
-
245
- ### Default Role Assignments
246
-
247
- | Role | Primary Model | Fallback Chain |
248
- |:-----|:--------------|:---------------|
249
- | **Planning** | Claude Opus 4.6 | GPT-5.2 &rarr; Gemini 2.5 Pro |
250
- | **Coding** | Claude Sonnet 4.6 | GPT-5.2 &rarr; Gemini 2.5 Flash |
251
- | **Review** | Claude Opus 4.6 | Gemini 2.5 Pro |
252
- | **Testing** | Claude Haiku 4.5 | Gemini 2.5 Flash |
253
- | **Bugfix** | Claude Sonnet 4.6 | GPT-5.2 |
254
- | **Documentation** | Gemini 2.5 Flash | Claude Haiku 4.5 |
255
-
256
- Override at any time:
257
-
258
- ```bash
259
- # Session-level override
260
- aemeathcli chat --model gpt-5.2 --role planning
261
-
262
- # Or interactively
263
- /model gemini-2.5-pro
264
- /role review
265
- ```
266
-
267
- Customize routing in `~/.aemeathcli/config.json`:
268
-
269
- ```json
270
- {
271
- "roles": {
272
- "coding": {
273
- "primary": "gpt-5.2",
274
- "fallback": ["claude-sonnet-4-6", "gemini-2.5-flash"]
275
- }
276
- }
277
- }
278
- ```
279
-
280
- <br />
281
-
282
- ## Agent Teams
283
-
284
- Create parallel agent teams through natural language. The LLM designs the team, split panes launch automatically, and agents coordinate via a hub-and-spoke model.
285
-
286
- ### How It Works
287
-
288
- 1. **Natural language creation** -- Describe the team you need ("Create a team to review the codebase"). No CLI subcommands or JSON config needed.
289
- 2. **LLM-driven design** -- The active model decides the optimal team: agent count, names, roles, models, and task prompts -- all tailored to your request.
290
- 3. **Split-panel mode** -- Each agent gets its own terminal pane (iTerm2 native splits on macOS, tmux splits on Linux/inside tmux).
291
- 4. **Hub-and-spoke coordination** -- A lead agent orchestrates the effort. All agents share a board directory where they write outputs, read each other's work, and the lead synthesizes a final summary.
292
- 5. **Cross-model teams** -- The LLM assigns different providers per agent: Claude Opus for planning, GPT Codex for coding, Gemini Pro for research -- all in one team.
293
-
294
- ### Split-Panel Backends
295
-
296
- | Environment | Backend | How |
297
- |:------------|:--------|:----|
298
- | **macOS + iTerm2** | Native iTerm2 panes | AppleScript creates vertical/horizontal splits directly in your iTerm2 window |
299
- | **Inside tmux** | tmux splits | Auto-splits the current tmux window for each agent |
300
- | **Outside tmux (Linux)** | tmux session | Creates a new tmux session and attaches |
301
- | **No pane manager** | Single-pane fallback | Tab-based agent switching within the TUI |
302
-
303
- ### Hub-and-Spoke Coordination
304
-
305
- Following the patterns established by Claude Code Agent Teams and OpenAI Codex Multi-Agent:
306
-
307
- ```
308
- ┌─────────────────────┐
309
- │ Shared Board │
310
- │ /tmp/aemeathcli-*/
311
- │ board/ │
312
- └──┬──────┬──────┬───┘
313
- │ │ │
314
- ┌──────┘ │ └──────┐
315
- │ │ │
316
- ┌─────┴─────┐ ┌────┴────┐ ┌──────┴─────┐
317
- │ Lead │ │ Agent 2 │ │ Agent 3 │
318
- Writes: │ │ Writes: │ │ Writes:
319
- coord.md own .md │ │ own .md │
320
- SUMMARY.md │ │ │ │
321
- └───────────┘ └─────────┘ └────────────┘
322
- ```
323
-
324
- - **Team manifest** (`team-manifest.json`) -- Full team structure visible to every agent: names, roles, models, output file paths
325
- - **Lead agent writes** `coordinator.md` with the task breakdown and assignments, then reads all agent outputs to produce `SUMMARY.md`
326
- - **Non-lead agents** check the coordinator plan, do their bounded work, and write results to their output file
327
- - **File-based protocol** -- No complex IPC needed for coordination. Agents read/write markdown files in the shared board directory.
328
-
329
- ### Cross-Model Teams
330
-
331
- Each agent runs a different model selected by the LLM based on role suitability:
332
-
333
- ```json
334
- [
335
- { "name": "AuthArchitect", "model": "claude-opus-4-6", "role": "planning" },
336
- { "name": "BackendDev", "model": "claude-sonnet-4-6", "role": "coding" },
337
- { "name": "SecurityReviewer", "model": "gpt-5.2-codex", "role": "review" },
338
- { "name": "TestWriter", "model": "gemini-2.5-flash", "role": "testing" }
339
- ]
340
- ```
341
-
342
- ### Team Controls
343
-
344
- | Action | How |
345
- |:-------|:----|
346
- | Create team | Natural language in chat: "Create a team to build X" |
347
- | View agents | Each agent has its own pane -- click or switch panes |
348
- | Stop team | `/team stop` in the leader pane |
349
-
350
- <br />
351
-
352
- ## Skills System
353
-
354
- Extend AemeathCLI with reusable, model-agnostic skill files.
355
-
356
- ### Built-in Skills
357
-
358
- | Skill | Trigger | Description |
359
- |:------|:--------|:------------|
360
- | Code Review | `$review` | Structured code review with severity ratings |
361
- | Commit | `$commit` | Conventional commit message generation |
362
- | Plan | `$plan` | Architecture and implementation planning |
363
- | Debug | `$debug` | Systematic debugging with hypothesis testing |
364
- | Test | `$test` | Test generation with coverage analysis |
365
- | Refactor | `$refactor` | Safe refactoring with before/after validation |
366
-
367
- ### Custom Skills
368
-
369
- Create a `SKILL.md` file with YAML frontmatter:
370
-
371
- ```markdown
372
- ---
373
- name: my-skill
374
- description: Custom skill for my workflow
375
- version: 1.0.0
376
- triggers:
377
- - $my-skill
378
- - my-skill
379
- allowed-tools:
380
- - read
381
- - write
382
- - bash
383
- model-requirements:
384
- preferred-role: coding
385
- min-context: 100000
386
- ---
387
-
388
- # My Custom Skill
389
-
390
- Instructions for the AI when this skill is active...
391
- ```
392
-
393
- **Skill resolution priority:** Project (`.aemeathcli/skills/`) > User (`~/.aemeathcli/skills/`) > Built-in
394
-
395
- <br />
396
-
397
- ## MCP Integration
398
-
399
- Connect external tools via the [Model Context Protocol](https://modelcontextprotocol.io):
400
-
401
- ```json
402
- // ~/.aemeathcli/mcp.json
403
- {
404
- "mcpServers": {
405
- "filesystem": {
406
- "command": "npx",
407
- "args": ["-y", "@modelcontextprotocol/server-filesystem", "./"],
408
- "env": {}
409
- },
410
- "postgres": {
411
- "command": "npx",
412
- "args": ["-y", "@modelcontextprotocol/server-postgres"],
413
- "env": {
414
- "DATABASE_URL": "${DATABASE_URL}"
415
- }
416
- }
417
- }
418
- }
419
- ```
420
-
421
- Features:
422
-
423
- - **stdio + Streamable HTTP** transport
424
- - **Automatic tool discovery** -- MCP tools appear alongside built-in tools
425
- - **Namespaced** -- `mcp__serverName__toolName` prevents conflicts
426
- - **Rate-limited** -- Configurable per-server call limits
427
- - **Health-checked** -- Auto-restart on consecutive failures
428
- - **Hot-reload** -- File watching with live config updates
429
-
430
- <br />
431
-
432
- ## Interactive Commands
433
-
434
- During a chat session:
435
-
436
- | Command | Description |
437
- |:--------|:------------|
438
- | `/help` | Show available commands |
439
- | `/model [name]` | Switch model or show current |
440
- | `/model list` | List all available models |
441
- | `/role [name]` | Switch role (planning, coding, review, testing, bugfix) |
442
- | `/cost` | Show session cost breakdown |
443
- | `/clear` | Clear conversation history |
444
- | `/compact` | Compress context to free token budget |
445
- | `/quit` | Exit the session |
446
-
447
- <br />
448
-
449
- ## Configuration
450
-
451
- ### File Locations
452
-
453
- ```
454
- ~/.aemeathcli/
455
- config.json # Global configuration
456
- credentials.enc # Encrypted credential fallback
457
- mcp.json # MCP server definitions
458
- skills/ # User-level custom skills
459
- teams/ # Team configurations
460
- tasks/ # Task persistence
461
- db/aemeathcli.db # SQLite database (WAL mode)
462
- logs/ # Structured logs (pino)
463
-
464
- .aemeathcli/ # Project-level overrides
465
- config.json # Project configuration (merges over global)
466
- skills/ # Project-specific skills
467
- mcp.json # Project-specific MCP servers
468
- AGENTS.md # Agent instructions
469
- ```
470
-
471
- ### Key Settings
472
-
473
- ```json
474
- {
475
- "defaultModel": "claude-sonnet-4-6",
476
- "permissions": {
477
- "mode": "standard",
478
- "allowedPaths": ["./"],
479
- "blockedCommands": ["rm -rf /", "git push --force"]
480
- },
481
- "splitPanel": {
482
- "enabled": true,
483
- "backend": "auto",
484
- "defaultLayout": "auto",
485
- "maxPanes": 6
486
- },
487
- "cost": {
488
- "budgetWarning": 5.00,
489
- "budgetHardStop": 20.00,
490
- "currency": "USD"
491
- }
492
- }
493
- ```
494
-
495
- ### Permission Modes
496
-
497
- | Mode | Behavior |
498
- |:-----|:---------|
499
- | **strict** | All operations require explicit approval |
500
- | **standard** | Reads auto-approved; writes and shell require approval |
501
- | **permissive** | All operations auto-approved (trusted environments only) |
502
-
503
- ```bash
504
- aemeathcli --permission-mode strict "Delete all unused imports"
505
- ```
506
-
507
- <br />
508
-
509
- ## Architecture
510
-
511
- ```
512
- aemeathcli/
513
- src/
514
- cli/ Command-line interface (Commander.js)
515
- ui/ Terminal UI components (Ink 5 / React)
516
- core/ Model router, event bus, context manager, cost tracker
517
- providers/ AI provider adapters (Vercel AI SDK)
518
- tools/ Built-in tools (bash, read, write, edit, glob, grep, git, web-fetch)
519
- auth/ OAuth PKCE login, credential store, session management
520
- teams/ Agent process management, message bus, task store
521
- panes/ tmux/iTerm2 integration, IPC hub, layout engine
522
- skills/ Skill loader, registry, executor
523
- mcp/ MCP client, server manager, tool bridge
524
- storage/ SQLite store, config store, conversation persistence
525
- types/ TypeScript type definitions, error hierarchy
526
- utils/ Logger, sanitizer, path resolver, retry, token counter
527
- ```
528
-
529
- **99 source files** &middot; **~14,000 lines of TypeScript** &middot; **Zero `any` types** &middot; **Strict mode + all strict flags**
530
-
531
- ### Technology Stack
532
-
533
- | Layer | Technology |
534
- |:------|:-----------|
535
- | Runtime | Node.js 20+ |
536
- | Language | TypeScript 5.7+ (maximum strict mode) |
537
- | CLI Framework | Commander.js 13 |
538
- | Terminal UI | Ink 5 (React 18 for CLI) |
539
- | AI Integration | Vercel AI SDK + provider adapters |
540
- | Database | better-sqlite3 (WAL mode) |
541
- | Validation | Zod |
542
- | Logging | pino (structured, redacted) |
543
- | Auth | keytar (OS keychain) + AES-256-GCM fallback |
544
- | Build | tsup (ESM-only, sourcemaps, DTS) |
545
- | Testing | Vitest |
546
- | Linting | ESLint v9 + typescript-eslint (strict type-checked) |
547
-
548
- <br />
549
-
550
- ## Security
551
-
552
- AemeathCLI is built with defense-in-depth:
553
-
554
- - **Credential storage** -- OS keychain primary (macOS Keychain, Windows Credential Vault, Linux libsecret). AES-256-GCM encrypted file fallback with scrypt key derivation (N=32768, r=8, p=1) and per-file random salt.
555
- - **IPC authentication** -- HMAC-SHA256 message signing for all inter-agent communication over Unix domain sockets. Socket permissions set to `0o700`.
556
- - **Shell sandboxing** -- Dangerous command blocklist, sensitive environment variable filtering, configurable permission modes with per-operation approval.
557
- - **Path traversal protection** -- All file operations validate resolved paths against the project root boundary.
558
- - **SSRF protection** -- Web fetch blocks private IP ranges (RFC 1918, loopback, link-local, cloud metadata).
559
- - **Secret redaction** -- pino structured logging with 15+ credential field paths redacted. Regex-based secret scrubbing for API keys in command output.
560
- - **File permissions** -- All sensitive files written with `0o600`, directories with `0o700`.
561
- - **Typed error hierarchy** -- 14 error classes with codes, user messages, diagnostic details, and recovery suggestions. No untyped `catch(e)` anywhere.
562
-
563
- <br />
564
-
565
- ## Development
566
-
567
- ### Setup
568
-
569
- ```bash
570
- git clone https://github.com/AemeathCLI/AemeathCLI.git
571
- cd AemeathCLI
572
- npm install
573
- ```
574
-
575
- ### Scripts
576
-
577
- ```bash
578
- npm run build # Build with tsup
579
- npm run dev # Watch mode
580
- npm run typecheck # tsc --noEmit
581
- npm run lint # ESLint (strict type-checked)
582
- npm run format # Prettier
583
- npm run test # Vitest
584
- npm run test:coverage # With coverage report
585
- ```
586
-
587
- ### Project Conventions
588
-
589
- - **Interfaces** use `I` prefix: `IModelInfo`, `IChatMessage`, `IToolResult`
590
- - **Error classes** extend `AemeathError` with structured error codes
591
- - **Type imports** use `import type { ... }` consistently
592
- - **No `any`** -- enforced by ESLint `no-explicit-any` + `no-unsafe-*` rules
593
- - **All `catch` blocks** use `catch (error: unknown)` or bare `catch {}`
594
- - **Barrel exports** via `index.ts` in each module
595
-
596
- <br />
597
-
598
- ## License
599
-
600
- MIT
601
-
602
- <br />
603
-
604
- ---
605
-
606
- <p align="center">
607
- Built with Claude, GPT, and Gemini — orchestrated by AemeathCLI itself.
608
- </p>
1
+ <p align="center">
2
+ <br />
3
+ <code>&nbsp;A E M E A T H&nbsp;</code>
4
+ <br />
5
+ <br />
6
+ <strong>Next-generation multi-model CLI coding tool</strong>
7
+ <br />
8
+ Agent teams &middot; Split-panel coordination &middot; Role-based routing
9
+ <br />
10
+ <br />
11
+ <a href="https://aemeathcli.pages.dev"><img src="https://img.shields.io/badge/website-aemeathcli.pages.dev-34d399?style=flat-square" alt="Website" /></a>
12
+ <a href="https://www.npmjs.com/package/aemeathcli"><img src="https://img.shields.io/npm/v/aemeathcli?style=flat-square&color=red" alt="npm" /></a>
13
+ <a href="#installation"><img src="https://img.shields.io/badge/node-%3E%3D20-brightgreen?style=flat-square" alt="Node.js >= 20" /></a>
14
+ <a href="#license"><img src="https://img.shields.io/badge/license-MIT-blue?style=flat-square" alt="MIT License" /></a>
15
+ <a href="#supported-models"><img src="https://img.shields.io/badge/models-9-orange?style=flat-square" alt="9 Models" /></a>
16
+ <a href="#providers"><img src="https://img.shields.io/badge/providers-5-purple?style=flat-square" alt="5 Providers" /></a>
17
+ </p>
18
+
19
+ <br />
20
+
21
+ ```
22
+ ╔══════════════════════════════════════════════╗
23
+ Welcome to AemeathCLI
24
+ ║ Multi-Model CLI Coding Tool v1.0.10 ║
25
+ ╚══════════════════════════════════════════════╝
26
+ ```
27
+
28
+ AemeathCLI orchestrates **multiple AI models** across **parallel agent teams** in your terminal. Route Claude for planning, GPT for coding, Gemini for reviews -- with real-time streaming, tmux-backed visual orchestration when enabled, cost tracking, and enterprise-grade security.
29
+
30
+ <br />
31
+
32
+ ## Table of Contents
33
+
34
+ - [Why AemeathCLI](#why-aemeathcli)
35
+ - [Quick Start](#quick-start)
36
+ - [Installation](#installation)
37
+ - [Authentication](#authentication)
38
+ - [Usage](#usage)
39
+ - [Supported Models](#supported-models)
40
+ - [Role-Based Model Routing](#role-based-model-routing)
41
+ - [Agent Teams](#agent-teams)
42
+ - [Skills System](#skills-system)
43
+ - [MCP Integration](#mcp-integration)
44
+ - [Interactive Commands](#interactive-commands)
45
+ - [Configuration](#configuration)
46
+ - [Architecture](#architecture)
47
+ - [Security](#security)
48
+ - [Development](#development)
49
+ - [License](#license)
50
+
51
+ <br />
52
+
53
+ ## Why AemeathCLI
54
+
55
+ Most AI coding tools lock you into a single model. AemeathCLI breaks that ceiling:
56
+
57
+ - **Multi-model orchestration** -- Use the right model for each task. Claude Opus for architecture, GPT-5.2 for implementation, Gemini 2.5 Pro for code review -- in one session.
58
+ - **Agent teams** -- Describe what you need in plain English and the LLM designs the team. Agents can run under the orchestrator with tmux-backed visual panes when enabled, while a leader orchestrates, teammates execute, and results are synthesized through a shared board.
59
+ - **Smart routing** -- Define role-based routing rules. When you switch to "review" mode, the system automatically picks the best model for reviewing code.
60
+ - **Cost-aware** -- Real-time token counting, per-model cost tracking, configurable budget warnings and hard stops. Know exactly what you're spending.
61
+ - **Skills & MCP** -- Extend functionality with YAML-defined skills and Model Context Protocol servers. Your tools, your workflow.
62
+ - **Enterprise-grade** -- OS keychain storage, AES-256-GCM encryption, HMAC-SHA256 IPC auth, sandboxed execution, structured logging, typed error hierarchy.
63
+
64
+ <br />
65
+
66
+ ## Quick Start
67
+
68
+ ```bash
69
+ # Install globally
70
+ npm install -g aemeathcli
71
+
72
+ # Authenticate with your providers
73
+ aemeathcli login
74
+
75
+ # For orchestrator mode, also configure API keys
76
+ export ANTHROPIC_API_KEY=your_key_here
77
+ export OPENAI_API_KEY=your_key_here
78
+
79
+ # Start coding
80
+ aemeathcli "Refactor the authentication module to use JWT tokens"
81
+ ```
82
+
83
+ That's it. AemeathCLI detects your project, picks the best model, and starts streaming.
84
+
85
+ <br />
86
+
87
+ ## Installation
88
+
89
+ ### Requirements
90
+
91
+ - **Node.js** >= 20.0.0
92
+ - **npm** >= 9 (or pnpm / yarn)
93
+ - **tmux** (optional, for external split-panel swarm panes)
94
+ - Native build tools for Node modules such as `node-pty` and `better-sqlite3`
95
+ - macOS: Xcode Command Line Tools
96
+ - Linux: Python, make, and a C/C++ compiler
97
+ - Windows: Visual Studio Build Tools or an equivalent MSVC toolchain
98
+
99
+ ### Install
100
+
101
+ ```bash
102
+ npm install -g aemeathcli
103
+ ```
104
+
105
+ The CLI installs two commands: `aemeathcli` and the shorthand `ac`.
106
+
107
+ ### Verify
108
+
109
+ ```bash
110
+ aemeathcli --version
111
+ # 1.0.10
112
+ ```
113
+
114
+ ### First Run
115
+
116
+ ```bash
117
+ aemeathcli config init
118
+ ```
119
+
120
+ This launches an interactive setup wizard that walks you through provider authentication, detects installed agent CLIs, and lets you choose the master provider used for swarm orchestration. SDK-backed swarm features still need `aemeathcli auth set-key <provider>` or matching environment variables when browser login is not enough.
121
+
122
+ <br />
123
+
124
+ ## Authentication
125
+
126
+ AemeathCLI supports four cloud providers with native OAuth PKCE login:
127
+
128
+ ```bash
129
+ # Browser-based OAuth login (recommended)
130
+ aemeathcli auth login claude # Anthropic
131
+ aemeathcli auth login codex # OpenAI
132
+ aemeathcli auth login gemini # Google
133
+ aemeathcli auth login kimi # Moonshot
134
+
135
+ # Or set API keys directly
136
+ aemeathcli auth set-key claude sk-ant-api03-...
137
+ aemeathcli auth set-key codex sk-...
138
+ aemeathcli auth set-key gemini AIza...
139
+
140
+ # Check status
141
+ aemeathcli auth status
142
+ ```
143
+
144
+ ```
145
+ claude ● Logged in (user@example.com) Pro plan
146
+ codex ● Logged in (user@example.com) — Plus plan
147
+ gemini ● Logged in (user@gmail.com)
148
+ kimi ○ Not logged in
149
+ ```
150
+
151
+ Credentials are stored in your **OS keychain** (macOS Keychain, Windows Credential Vault, or Linux libsecret). An AES-256-GCM encrypted fallback is used when keychain is unavailable.
152
+
153
+ ```bash
154
+ # Manage sessions
155
+ aemeathcli auth logout codex # Single provider
156
+ aemeathcli auth logout --all # All providers
157
+ aemeathcli auth switch claude # Set default provider
158
+ ```
159
+
160
+ <br />
161
+
162
+ ## Usage
163
+
164
+ ### Interactive Chat
165
+
166
+ ```bash
167
+ # Start interactive session
168
+ aemeathcli
169
+
170
+ # Start with a message
171
+ aemeathcli "Explain the architecture of this project"
172
+
173
+ # Specify model and role
174
+ aemeathcli chat --model gpt-5.2 --role coding "Add input validation to the API"
175
+
176
+ # With a custom system prompt
177
+ aemeathcli chat --system "You are a security auditor" "Review this codebase"
178
+ ```
179
+
180
+ ### Task-Specific Modes
181
+
182
+ ```bash
183
+ # Planning mode — uses Claude Opus by default
184
+ aemeathcli plan "Design a caching layer for the API"
185
+
186
+ # Code review — analyzes specified files
187
+ aemeathcli review src/auth/ src/api/middleware.ts
188
+
189
+ # Test generation uses Haiku/Flash for speed
190
+ aemeathcli test "Generate tests for the recent changes"
191
+ ```
192
+
193
+ ### Swarm Mode
194
+
195
+ Swarm orchestration now lives inside the default TUI:
196
+
197
+ ```bash
198
+ # Start the CLI
199
+ aemeathcli
200
+
201
+ # Or start with a first task
202
+ aemeathcli "Refactor the authentication module"
203
+ ```
204
+
205
+ Inside the TUI:
206
+
207
+ - Press `Shift+Tab` to switch into swarm mode.
208
+ - The onboarding flow detects supported native agent CLIs and stores your preferred master provider.
209
+ - The master agent owns the left half of the split layout; worker agents stack on the right.
210
+ - When tmux or iTerm2 is available, AemeathCLI can project the swarm into native panes while keeping the same hub-and-spoke model.
211
+
212
+ SDK-backed swarm planning still needs a tool-calling-capable provider, so browser login alone may not be enough; configure an API key or environment variable for the provider you want to sponsor the swarm.
213
+
214
+ ```
215
+ ┌───────────────────────┬───────────────────────┐
216
+ │ LeadArchitect │ BackendDev │
217
+ (Claude Opus 4.6) │ (Claude Sonnet 4.6) │
218
+ │ Role: planning │ Role: coding │
219
+ │ ├───────────────────────┤
220
+ │ Coordinates team, │ SecurityAuditor │
221
+ synthesizes results │ (GPT-5.2 Codex) │
222
+ │ │ Role: review │
223
+ └───────────────────────┴───────────────────────┘
224
+ ```
225
+
226
+ <br />
227
+
228
+ ## Supported Models
229
+
230
+ AemeathCLI ships with 9 models across 5 providers:
231
+
232
+ | Model | Provider | Context | Output | Input $/M | Output $/M |
233
+ |:------|:---------|--------:|-------:|----------:|-----------:|
234
+ | **claude-opus-4-6** | Anthropic | 200K | 32K | $15.00 | $75.00 |
235
+ | **claude-sonnet-4-6** | Anthropic | 200K | 16K | $3.00 | $15.00 |
236
+ | **claude-haiku-4-5** | Anthropic | 200K | 8K | $0.80 | $4.00 |
237
+ | **gpt-5.2** | OpenAI | 256K | 32K | $2.50 | $10.00 |
238
+ | **gpt-5.2-mini** | OpenAI | 256K | 16K | $0.15 | $0.60 |
239
+ | **o3** | OpenAI | 256K | 100K | $10.00 | $40.00 |
240
+ | **gemini-2.5-pro** | Google | 2M | 64K | $1.25 | $10.00 |
241
+ | **gemini-2.5-flash** | Google | 2M | 64K | $0.15 | $0.60 |
242
+ | **kimi-k2.5** | Moonshot | 128K | 8K | $0.50 | $2.00 |
243
+
244
+ Local models via **Ollama** (Llama, Mistral, etc.) are also supported with a configurable base URL.
245
+
246
+ <br />
247
+
248
+ ## Role-Based Model Routing
249
+
250
+ AemeathCLI automatically selects the best model for each task through a 4-step resolution pipeline:
251
+
252
+ ```
253
+ User Override → Role Config → Fallback Chain → System Default
254
+ ```
255
+
256
+ ### Default Role Assignments
257
+
258
+ | Role | Primary Model | Fallback Chain |
259
+ |:-----|:--------------|:---------------|
260
+ | **Planning** | Claude Opus 4.6 | GPT-5.2 &rarr; Gemini 2.5 Pro |
261
+ | **Coding** | Claude Sonnet 4.6 | GPT-5.2 &rarr; Gemini 2.5 Flash |
262
+ | **Review** | Claude Opus 4.6 | Gemini 2.5 Pro |
263
+ | **Testing** | Claude Haiku 4.5 | Gemini 2.5 Flash |
264
+ | **Bugfix** | Claude Sonnet 4.6 | GPT-5.2 |
265
+ | **Documentation** | Gemini 2.5 Flash | Claude Haiku 4.5 |
266
+
267
+ Override at any time:
268
+
269
+ ```bash
270
+ # Session-level override
271
+ aemeathcli chat --model gpt-5.2 --role planning
272
+
273
+ # Or interactively
274
+ /model gemini-2.5-pro
275
+ /role review
276
+ ```
277
+
278
+ Customize routing in `~/.aemeathcli/config.json`:
279
+
280
+ ```json
281
+ {
282
+ "roles": {
283
+ "coding": {
284
+ "primary": "gpt-5.2",
285
+ "fallback": ["claude-sonnet-4-6", "gemini-2.5-flash"]
286
+ }
287
+ }
288
+ }
289
+ ```
290
+
291
+ <br />
292
+
293
+ ## Agent Teams
294
+
295
+ Create parallel agent teams through the default swarm experience. The master agent sponsors specialized workers, optional tmux panes open when enabled, and every team follows a hub-and-spoke model.
296
+
297
+ ### How It Works
298
+
299
+ 1. **Master-led orchestration** -- Start `aemeathcli`, press `Shift+Tab`, and describe the task. The configured master agent decomposes the work.
300
+ 2. **Profile-driven delegation** -- The supervisor chooses specialized worker profiles such as `developer`, `reviewer`, `tester`, and `architect`.
301
+ 3. **Split-panel mode** -- Each worker can get its own terminal pane (tmux today; interactive chat still supports natural-language team creation flows).
302
+ 4. **Hub-and-spoke coordination** -- A lead agent orchestrates the effort. Workers execute bounded tasks and results are synthesized by the supervisor.
303
+ 5. **Cross-model teams** -- Different providers can be assigned per worker: Claude for planning, Codex for coding, Gemini for documentation and testing.
304
+
305
+ ### Split-Panel Backends
306
+
307
+ | Environment | Backend | How |
308
+ |:------------|:--------|:----|
309
+ | **macOS / Linux with tmux** | tmux panes | Creates or reuses a tmux session for each worker pane |
310
+ | **No tmux available** | Single-pane mode | Orchestrator still runs without the visual overlay |
311
+
312
+ ### Hub-and-Spoke Coordination
313
+
314
+ Following the patterns established by Claude Code Agent Teams and OpenAI Codex Multi-Agent:
315
+
316
+ ```
317
+ ┌─────────────────────┐
318
+ Shared Board
319
+ /tmp/aemeathcli-*/
320
+ board/
321
+ └──┬──────┬──────┬───┘
322
+ │ │ │
323
+ ┌──────┘ │ └──────┐
324
+ │ │ │
325
+ ┌─────┴─────┐ ┌────┴────┐ ┌──────┴─────┐
326
+ │ Lead │ Agent 2 │ Agent 3 │
327
+ Writes: │ Writes: Writes: │
328
+ │ coord.md │ │ own .md │ │ own .md │
329
+ SUMMARY.md│ │ │ │ │
330
+ └───────────┘ └─────────┘ └────────────┘
331
+ ```
332
+
333
+ - **Team manifest** (`team-manifest.json`) -- Full team structure visible to every agent: names, roles, models, output file paths
334
+ - **Lead agent writes** `coordinator.md` with the task breakdown and assignments, then reads all agent outputs to produce `SUMMARY.md`
335
+ - **Non-lead agents** check the coordinator plan, do their bounded work, and write results to their output file
336
+ - **File-based protocol** -- No complex IPC needed for coordination. Agents read/write markdown files in the shared board directory.
337
+
338
+ ### Cross-Model Teams
339
+
340
+ Each agent runs a different model selected by the LLM based on role suitability:
341
+
342
+ ```json
343
+ [
344
+ { "name": "AuthArchitect", "model": "claude-opus-4-6", "role": "planning" },
345
+ { "name": "BackendDev", "model": "claude-sonnet-4-6", "role": "coding" },
346
+ { "name": "SecurityReviewer", "model": "gpt-5.2-codex", "role": "review" },
347
+ { "name": "TestWriter", "model": "gemini-2.5-flash", "role": "testing" }
348
+ ]
349
+ ```
350
+
351
+ ### Team Controls
352
+
353
+ | Action | How |
354
+ |:-------|:----|
355
+ | Enter swarm mode | Start `aemeathcli` and press `Shift+Tab` |
356
+ | Run one task | `aemeathcli "Build X"` then switch to swarm mode if needed |
357
+ | Focus next agent | `Tab` |
358
+ | Cycle input mode | `Shift+Tab` |
359
+ | Stop the active team | `/team stop` |
360
+
361
+ <br />
362
+
363
+ ## Skills System
364
+
365
+ Extend AemeathCLI with reusable, model-agnostic skill files.
366
+
367
+ ### Built-in Skills
368
+
369
+ | Skill | Trigger | Description |
370
+ |:------|:--------|:------------|
371
+ | Code Review | `$review` | Structured code review with severity ratings |
372
+ | Commit | `$commit` | Conventional commit message generation |
373
+ | Plan | `$plan` | Architecture and implementation planning |
374
+ | Debug | `$debug` | Systematic debugging with hypothesis testing |
375
+ | Test | `$test` | Test generation with coverage analysis |
376
+ | Refactor | `$refactor` | Safe refactoring with before/after validation |
377
+
378
+ ### Custom Skills
379
+
380
+ Create a `SKILL.md` file with YAML frontmatter:
381
+
382
+ ```markdown
383
+ ---
384
+ name: my-skill
385
+ description: Custom skill for my workflow
386
+ version: 1.0.10
387
+ triggers:
388
+ - $my-skill
389
+ - my-skill
390
+ allowed-tools:
391
+ - read
392
+ - write
393
+ - bash
394
+ model-requirements:
395
+ preferred-role: coding
396
+ min-context: 100000
397
+ ---
398
+
399
+ # My Custom Skill
400
+
401
+ Instructions for the AI when this skill is active...
402
+ ```
403
+
404
+ **Skill resolution priority:** Project (`.aemeathcli/skills/`) > User (`~/.aemeathcli/skills/`) > Built-in
405
+
406
+ <br />
407
+
408
+ ## MCP Integration
409
+
410
+ Connect external tools via the [Model Context Protocol](https://modelcontextprotocol.io):
411
+
412
+ ```json
413
+ // ~/.aemeathcli/mcp.json
414
+ {
415
+ "mcpServers": {
416
+ "filesystem": {
417
+ "command": "npx",
418
+ "args": ["-y", "@modelcontextprotocol/server-filesystem", "./"],
419
+ "env": {}
420
+ },
421
+ "postgres": {
422
+ "command": "npx",
423
+ "args": ["-y", "@modelcontextprotocol/server-postgres"],
424
+ "env": {
425
+ "DATABASE_URL": "${DATABASE_URL}"
426
+ }
427
+ }
428
+ }
429
+ }
430
+ ```
431
+
432
+ Features:
433
+
434
+ - **stdio + Streamable HTTP** transport
435
+ - **Automatic tool discovery** -- MCP tools appear alongside built-in tools
436
+ - **Namespaced** -- `mcp__serverName__toolName` prevents conflicts
437
+ - **Rate-limited** -- Configurable per-server call limits
438
+ - **Health-checked** -- Auto-restart on consecutive failures
439
+ - **Hot-reload** -- File watching with live config updates
440
+
441
+ <br />
442
+
443
+ ## Interactive Commands
444
+
445
+ During a chat session:
446
+
447
+ | Command | Description |
448
+ |:--------|:------------|
449
+ | `/help` | Show available commands |
450
+ | `/model [name]` | Switch model or show current |
451
+ | `/model list` | List all available models |
452
+ | `/role [name]` | Switch role (planning, coding, review, testing, bugfix) |
453
+ | `/cost` | Show session cost breakdown |
454
+ | `/clear` | Clear conversation history |
455
+ | `/compact` | Compress context to free token budget |
456
+ | `/quit` | Exit the session |
457
+
458
+ <br />
459
+
460
+ ## Configuration
461
+
462
+ ### File Locations
463
+
464
+ ```
465
+ ~/.aemeathcli/
466
+ config.json # Global configuration
467
+ credentials.enc # Encrypted credential fallback
468
+ mcp.json # MCP server definitions
469
+ skills/ # User-level custom skills
470
+ teams/ # Team configurations
471
+ tasks/ # Task persistence
472
+ db/aemeathcli.db # SQLite database (WAL mode)
473
+ logs/ # Structured logs (pino)
474
+
475
+ .aemeathcli/ # Project-level overrides
476
+ config.json # Project configuration (merges over global)
477
+ skills/ # Project-specific skills
478
+ mcp.json # Project-specific MCP servers
479
+ AGENTS.md # Agent instructions
480
+ ```
481
+
482
+ ### Key Settings
483
+
484
+ ```json
485
+ {
486
+ "defaultModel": "claude-sonnet-4-6",
487
+ "permissions": {
488
+ "mode": "standard",
489
+ "allowedPaths": ["./"],
490
+ "blockedCommands": ["rm -rf /", "git push --force"]
491
+ },
492
+ "splitPanel": {
493
+ "enabled": true,
494
+ "backend": "auto",
495
+ "defaultLayout": "auto",
496
+ "maxPanes": 6
497
+ },
498
+ "cost": {
499
+ "budgetWarning": 5.00,
500
+ "budgetHardStop": 20.00,
501
+ "currency": "USD"
502
+ }
503
+ }
504
+ ```
505
+
506
+ ### Permission Modes
507
+
508
+ | Mode | Behavior |
509
+ |:-----|:---------|
510
+ | **strict** | All operations require explicit approval |
511
+ | **standard** | Reads auto-approved; writes and shell require approval |
512
+ | **permissive** | All operations auto-approved (trusted environments only) |
513
+
514
+ ```bash
515
+ aemeathcli --permission-mode strict "Delete all unused imports"
516
+ ```
517
+
518
+ <br />
519
+
520
+ ## Architecture
521
+
522
+ ```
523
+ aemeathcli/
524
+ src/
525
+ cli/ Command-line interface (Commander.js)
526
+ ui/ Terminal UI components (Ink 5 / React)
527
+ core/ Model router, event bus, context manager, cost tracker
528
+ providers/ AI provider adapters (Vercel AI SDK)
529
+ tools/ Built-in tools (bash, read, write, edit, glob, grep, git, web-fetch)
530
+ auth/ OAuth PKCE login, credential store, session management
531
+ teams/ Agent process management, message bus, task store
532
+ panes/ tmux/iTerm2 integration, IPC hub, layout engine
533
+ skills/ Skill loader, registry, executor
534
+ mcp/ MCP client, server manager, tool bridge
535
+ storage/ SQLite store, config store, conversation persistence
536
+ types/ TypeScript type definitions, error hierarchy
537
+ utils/ Logger, sanitizer, path resolver, retry, token counter
538
+ ```
539
+
540
+ ### Technology Stack
541
+
542
+ | Layer | Technology |
543
+ |:------|:-----------|
544
+ | Runtime | Node.js 20+ |
545
+ | Language | TypeScript 5.7+ (maximum strict mode) |
546
+ | CLI Framework | Commander.js 13 |
547
+ | Terminal UI | Ink 5 (React 18 for CLI) |
548
+ | AI Integration | Vercel AI SDK + provider adapters |
549
+ | Database | better-sqlite3 (WAL mode) |
550
+ | Validation | Zod |
551
+ | Logging | pino (structured, redacted) |
552
+ | Auth | keytar (OS keychain) + AES-256-GCM fallback |
553
+ | Build | tsup (ESM-only, sourcemaps, DTS) |
554
+ | Testing | Vitest |
555
+ | Linting | ESLint v9 + typescript-eslint (strict type-checked) |
556
+
557
+ <br />
558
+
559
+ ## Security
560
+
561
+ AemeathCLI is built with defense-in-depth:
562
+
563
+ - **Credential storage** -- OS keychain primary (macOS Keychain, Windows Credential Vault, Linux libsecret). AES-256-GCM encrypted file fallback with scrypt key derivation (N=32768, r=8, p=1) and per-file random salt.
564
+ - **IPC authentication** -- HMAC-SHA256 message signing for all inter-agent communication over Unix domain sockets. Socket permissions set to `0o700`.
565
+ - **Shell sandboxing** -- Dangerous command blocklist, sensitive environment variable filtering, configurable permission modes with per-operation approval.
566
+ - **Path traversal protection** -- All file operations validate resolved paths against the project root boundary.
567
+ - **SSRF protection** -- Web fetch blocks private IP ranges (RFC 1918, loopback, link-local, cloud metadata).
568
+ - **Secret redaction** -- pino structured logging with 15+ credential field paths redacted. Regex-based secret scrubbing for API keys in command output.
569
+ - **File permissions** -- All sensitive files written with `0o600`, directories with `0o700`.
570
+ - **Typed error hierarchy** -- 14 error classes with codes, user messages, diagnostic details, and recovery suggestions. No untyped `catch(e)` anywhere.
571
+
572
+ <br />
573
+
574
+ ## Development
575
+
576
+ ### Setup
577
+
578
+ ```bash
579
+ git clone https://github.com/AemeathCLI/AemeathCLI.git
580
+ cd AemeathCLI
581
+ npm install
582
+ ```
583
+
584
+ ### Scripts
585
+
586
+ ```bash
587
+ npm run build # Build with tsup
588
+ npm run dev # Watch mode
589
+ npm run typecheck # tsc --noEmit
590
+ npm run lint # ESLint (strict type-checked)
591
+ npm run format # Prettier
592
+ npm run test # Vitest
593
+ npm run test:coverage # With coverage report
594
+ ```
595
+
596
+ ### Project Conventions
597
+
598
+ - **Interfaces** use `I` prefix: `IModelInfo`, `IChatMessage`, `IToolResult`
599
+ - **Error classes** extend `AemeathError` with structured error codes
600
+ - **Type imports** use `import type { ... }` consistently
601
+ - **No `any`** -- enforced by ESLint `no-explicit-any` + `no-unsafe-*` rules
602
+ - **All `catch` blocks** use `catch (error: unknown)` or bare `catch {}`
603
+ - **Barrel exports** via `index.ts` in each module
604
+
605
+ <br />
606
+
607
+ ## License
608
+
609
+ MIT