aemeathcli 1.0.11 → 1.1.0

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