legionio 1.5.19 → 1.5.22

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bb76821fb4802e78a19c4518c18f32a961a144cd96f0ef146ce0b582ef96f699
4
- data.tar.gz: c9c6eb50bef1df98a3ede6ce943e4a45a9dc4c638ce682519708d3d0008eddd5
3
+ metadata.gz: dc118d8800708d94fc279455bd379cda4f159cc535b6af290997aacf311765bb
4
+ data.tar.gz: b144e6d8fa85659d6a929f427c611ddd5e5288bfce404eeb11b41bfe1f85d82f
5
5
  SHA512:
6
- metadata.gz: 2e502641a0f4177baeab32e78b839f80fa163953fe55770cd0a31364b352b5eda156e0971e67057ad5263160cc5f874b7cdbfdafc1a7cc9799fdd7a9ebd73a65
7
- data.tar.gz: 90ec056445d835e01d044dd1ca6272c7e30ef5cffa0e30c39d93d4c2e8004f0e4d3ff59d83e12753bc485484a68a2526e90ebe1ccfdd1fb39e12b89e549d01d1
6
+ metadata.gz: ba5b7bfc06588c0a8f3e6e5d123e481a847e72614e76bb312b3dbf78bec3f55d56c539fd501db189a6827ab81a36716377084c8419a11548c5a1463fa4fe5dc8
7
+ data.tar.gz: 35580f0a9895e93c225fe596a02379f57a21669e67b2485805beb37ec9082c4098302b6dfb465ec5f21f06d9265e0bc103dd882ec68377e8f4e4ce2d891c3d59
data/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # Legion Changelog
2
2
 
3
+ ## [1.5.22] - 2026-03-26
4
+
5
+ ### Changed
6
+ - Consolidate 48 root CLI commands into 7 groups + 19 root commands
7
+ - New groups: `ai`, `git`, `pipeline`, `ops`, `serve`, `admin`, `dev`
8
+ - `ai`: chat, llm, gaia, apollo, knowledge, memory, mind-growth, swarm, plan, trace
9
+ - `git`: commit, pr, review
10
+ - `pipeline`: skill, prompt, eval, dataset, image, notebook
11
+ - `ops`: telemetry, observe, detect, cost, payroll, audit, debug, failover
12
+ - `serve`: mcp, acp
13
+ - `admin`: rbac, auth, worker, team
14
+ - `dev`: generate, docs, openapi, completion, marketplace, features
15
+ - Root keepers: start, stop, status, version, check, doctor, setup, update, config, init, lex, task, chain, schedule, coldstart, tty, do, ask, dream, tree
16
+
17
+ ## [1.5.21] - 2026-03-26
18
+
19
+ ### Changed
20
+ - `legionio setup agentic` now installs the full cognitive stack (63 gems): core libs, all agentic domains, all AI providers, and key operational extensions
21
+ - Added `brains` and `give-me-all-the-brains` as aliases for the `agentic` subcommand
22
+
23
+ ## [1.5.20] - 2026-03-26
24
+
25
+ ### Added
26
+ - `legion knowledge health` — local/Apollo/sync health report
27
+ - `legion knowledge maintain` — orphan chunk detection and cleanup (dry-run by default)
28
+ - `legion knowledge quality` — hot/cold/low-confidence chunk quality report
29
+
3
30
  ## [1.5.19] - 2026-03-26
4
31
 
5
32
  ### Added
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'thor'
4
+
5
+ module Legion
6
+ module CLI
7
+ module Groups
8
+ class Admin < Thor
9
+ namespace 'admin'
10
+
11
+ def self.exit_on_failure?
12
+ true
13
+ end
14
+
15
+ desc 'rbac SUBCOMMAND', 'Role-based access control management'
16
+ subcommand 'rbac', Legion::CLI::Rbac
17
+
18
+ desc 'auth SUBCOMMAND', 'Authenticate with external services'
19
+ subcommand 'auth', Legion::CLI::Auth
20
+
21
+ desc 'worker SUBCOMMAND', 'Manage digital workers'
22
+ subcommand 'worker', Legion::CLI::Worker
23
+
24
+ desc 'team SUBCOMMAND', 'Team and multi-user management'
25
+ subcommand 'team', Legion::CLI::Team
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,47 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'thor'
4
+
5
+ module Legion
6
+ module CLI
7
+ module Groups
8
+ class Ai < Thor
9
+ namespace 'ai'
10
+
11
+ def self.exit_on_failure?
12
+ true
13
+ end
14
+
15
+ desc 'chat SUBCOMMAND', 'Interactive AI conversation'
16
+ subcommand 'chat', Legion::CLI::Chat
17
+
18
+ desc 'llm SUBCOMMAND', 'LLM provider diagnostics (status, ping, models)'
19
+ subcommand 'llm', Legion::CLI::Llm
20
+
21
+ desc 'gaia SUBCOMMAND', 'GAIA cognitive coordination'
22
+ subcommand 'gaia', Legion::CLI::Gaia
23
+
24
+ desc 'apollo SUBCOMMAND', 'Apollo knowledge graph'
25
+ subcommand 'apollo', Legion::CLI::Apollo
26
+
27
+ desc 'knowledge SUBCOMMAND', 'Search and manage the document knowledge base'
28
+ subcommand 'knowledge', Legion::CLI::Knowledge
29
+
30
+ desc 'memory SUBCOMMAND', 'Persistent project memory across sessions'
31
+ subcommand 'memory', Legion::CLI::Memory
32
+
33
+ desc 'mind-growth SUBCOMMAND', 'Autonomous cognitive architecture expansion'
34
+ subcommand 'mind-growth', Legion::CLI::MindGrowth
35
+
36
+ desc 'swarm SUBCOMMAND', 'Multi-agent swarm orchestration'
37
+ subcommand 'swarm', Legion::CLI::Swarm
38
+
39
+ desc 'plan', 'Start plan mode (read-only exploration, no writes)'
40
+ subcommand 'plan', Legion::CLI::Plan
41
+
42
+ desc 'trace SUBCOMMAND', 'Natural language trace search via LLM'
43
+ subcommand 'trace', Legion::CLI::TraceCommand
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'thor'
4
+
5
+ module Legion
6
+ module CLI
7
+ module Groups
8
+ class Dev < Thor
9
+ namespace 'dev'
10
+
11
+ def self.exit_on_failure?
12
+ true
13
+ end
14
+
15
+ desc 'generate SUBCOMMAND', 'Code generators for LEX components'
16
+ map 'g' => :generate
17
+ subcommand 'generate', Legion::CLI::Generate
18
+
19
+ desc 'docs SUBCOMMAND', 'Documentation site generator'
20
+ subcommand 'docs', Legion::CLI::Docs
21
+
22
+ desc 'openapi SUBCOMMAND', 'OpenAPI spec generation'
23
+ subcommand 'openapi', Legion::CLI::Openapi
24
+
25
+ desc 'completion SUBCOMMAND', 'Shell tab completion scripts'
26
+ subcommand 'completion', Legion::CLI::Completion
27
+
28
+ desc 'marketplace', 'Extension marketplace (search, info, scan)'
29
+ subcommand 'marketplace', Legion::CLI::Marketplace
30
+
31
+ desc 'features SUBCOMMAND', 'Install feature bundles (interactive selector)'
32
+ subcommand 'features', Legion::CLI::Features
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'thor'
4
+
5
+ module Legion
6
+ module CLI
7
+ module Groups
8
+ class Git < Thor
9
+ namespace 'git'
10
+
11
+ def self.exit_on_failure?
12
+ true
13
+ end
14
+
15
+ desc 'commit', 'Generate AI commit message from staged changes'
16
+ subcommand 'commit', Legion::CLI::Commit
17
+
18
+ desc 'pr', 'Create pull request with AI-generated title and description'
19
+ subcommand 'pr', Legion::CLI::Pr
20
+
21
+ desc 'review', 'AI code review of changes'
22
+ subcommand 'review', Legion::CLI::Review
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'thor'
4
+
5
+ module Legion
6
+ module CLI
7
+ module Groups
8
+ class Ops < Thor
9
+ namespace 'ops'
10
+
11
+ def self.exit_on_failure?
12
+ true
13
+ end
14
+
15
+ desc 'telemetry SUBCOMMAND', 'Session log analytics and telemetry'
16
+ subcommand 'telemetry', Legion::CLI::Telemetry
17
+
18
+ desc 'observe SUBCOMMAND', 'MCP tool observation stats'
19
+ subcommand 'observe', Legion::CLI::ObserveCommand
20
+
21
+ desc 'detect', 'Scan environment and recommend extensions'
22
+ subcommand 'detect', Legion::CLI::Detect
23
+
24
+ desc 'cost', 'Cost visibility and reporting'
25
+ subcommand 'cost', Legion::CLI::Cost
26
+
27
+ desc 'payroll SUBCOMMAND', 'Workforce cost and labor economics'
28
+ subcommand 'payroll', Legion::CLI::Payroll
29
+
30
+ desc 'audit SUBCOMMAND', 'Audit log inspection and verification'
31
+ subcommand 'audit', Legion::CLI::Audit
32
+
33
+ desc 'debug', 'Diagnostic dump for troubleshooting (pipe to LLM for analysis)'
34
+ subcommand 'debug', Legion::CLI::Debug
35
+
36
+ desc 'failover SUBCOMMAND', 'Region failover management'
37
+ subcommand 'failover', Legion::CLI::Failover
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'thor'
4
+
5
+ module Legion
6
+ module CLI
7
+ module Groups
8
+ class Pipeline < Thor
9
+ namespace 'pipeline'
10
+
11
+ def self.exit_on_failure?
12
+ true
13
+ end
14
+
15
+ desc 'skill', 'Manage skills (.legion/skills/ markdown files)'
16
+ subcommand 'skill', Legion::CLI::Skill
17
+
18
+ desc 'prompt SUBCOMMAND', 'Manage versioned LLM prompt templates'
19
+ subcommand 'prompt', Legion::CLI::Prompt
20
+
21
+ desc 'eval SUBCOMMAND', 'Eval gating and experiment management'
22
+ subcommand 'eval', Legion::CLI::Eval
23
+
24
+ desc 'dataset SUBCOMMAND', 'Manage versioned datasets'
25
+ subcommand 'dataset', Legion::CLI::Dataset
26
+
27
+ desc 'image SUBCOMMAND', 'Multimodal image analysis and comparison'
28
+ subcommand 'image', Legion::CLI::Image
29
+
30
+ desc 'notebook', 'Read and export Jupyter notebooks'
31
+ subcommand 'notebook', Legion::CLI::Notebook
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'thor'
4
+
5
+ module Legion
6
+ module CLI
7
+ module Groups
8
+ class Serve < Thor
9
+ namespace 'serve'
10
+
11
+ def self.exit_on_failure?
12
+ true
13
+ end
14
+
15
+ desc 'mcp SUBCOMMAND', 'Start MCP server for AI agent integration'
16
+ subcommand 'mcp', Legion::CLI::Mcp
17
+
18
+ desc 'acp SUBCOMMAND', 'Start ACP agent for editor integration'
19
+ subcommand 'acp', Legion::CLI::Acp
20
+ end
21
+ end
22
+ end
23
+ end
@@ -91,7 +91,77 @@ module Legion
91
91
  end
92
92
  end
93
93
 
94
- no_commands do
94
+ desc 'health', 'Show knowledge base health report (local, Apollo, sync)'
95
+ option :corpus_path, type: :string, desc: 'Path to corpus directory (falls back to settings)'
96
+ def health
97
+ require_maintenance!
98
+ path = resolve_corpus_path
99
+ result = knowledge_maintenance.health(path: path)
100
+ out = formatter
101
+ if options[:json]
102
+ out.json(result)
103
+ elsif result[:success]
104
+ out.header('Knowledge Health')
105
+ out.spacer
106
+ out.header('Local')
107
+ out.detail(result[:local])
108
+ out.spacer
109
+ out.header('Apollo')
110
+ out.detail(result[:apollo])
111
+ out.spacer
112
+ out.header('Sync')
113
+ out.detail(result[:sync])
114
+ else
115
+ out.warn("Health check failed: #{result[:error]}")
116
+ end
117
+ end
118
+
119
+ desc 'maintain', 'Detect and clean up orphaned knowledge chunks'
120
+ option :corpus_path, type: :string, desc: 'Path to corpus directory (falls back to settings)'
121
+ option :dry_run, type: :boolean, default: true, desc: 'Preview without archiving (default: true)'
122
+ def maintain
123
+ require_maintenance!
124
+ path = resolve_corpus_path
125
+ result = knowledge_maintenance.cleanup_orphans(path: path, dry_run: options[:dry_run])
126
+ out = formatter
127
+ if options[:json]
128
+ out.json(result)
129
+ elsif result[:success]
130
+ out.header("Knowledge Maintain#{' (dry run)' if options[:dry_run]}")
131
+ out.detail({
132
+ 'Orphan files' => (result[:orphan_files] || []).join(', '),
133
+ 'Archived' => result[:archived].to_s,
134
+ 'Files cleaned' => result[:files_cleaned].to_s,
135
+ 'Dry run' => result[:dry_run].to_s
136
+ })
137
+ else
138
+ out.warn("Maintenance failed: #{result[:error]}")
139
+ end
140
+ end
141
+
142
+ desc 'quality', 'Show knowledge quality report (hot, cold, low-confidence chunks)'
143
+ option :limit, type: :numeric, default: 10, desc: 'Max entries per category'
144
+ def quality
145
+ require_maintenance!
146
+ result = knowledge_maintenance.quality_report(limit: options[:limit])
147
+ out = formatter
148
+ if options[:json]
149
+ out.json(result)
150
+ elsif result[:success]
151
+ out.header('Knowledge Quality Report')
152
+ out.spacer
153
+ print_chunk_section('Hot Chunks (most accessed)', result[:hot_chunks], out)
154
+ print_chunk_section('Cold Chunks (never accessed)', result[:cold_chunks], out)
155
+ print_chunk_section('Low Confidence', result[:low_confidence], out)
156
+ out.spacer
157
+ out.header('Summary')
158
+ out.detail(result[:summary])
159
+ else
160
+ out.warn("Quality report failed: #{result[:error]}")
161
+ end
162
+ end
163
+
164
+ no_commands do # rubocop:disable Metrics/BlockLength
95
165
  def formatter
96
166
  @formatter ||= Output::Formatter.new(json: options[:json], color: !options[:no_color])
97
167
  end
@@ -108,6 +178,12 @@ module Legion
108
178
  raise CLI::Error, 'lex-knowledge extension is not loaded. Install and enable it first.'
109
179
  end
110
180
 
181
+ def require_maintenance!
182
+ return if defined?(Legion::Extensions::Knowledge::Runners::Maintenance)
183
+
184
+ raise CLI::Error, 'lex-knowledge extension is not loaded. Install and enable it first.'
185
+ end
186
+
111
187
  def knowledge_query
112
188
  Legion::Extensions::Knowledge::Runners::Query
113
189
  end
@@ -116,6 +192,20 @@ module Legion
116
192
  Legion::Extensions::Knowledge::Runners::Ingest
117
193
  end
118
194
 
195
+ def knowledge_maintenance
196
+ Legion::Extensions::Knowledge::Runners::Maintenance
197
+ end
198
+
199
+ def resolve_corpus_path
200
+ if options[:corpus_path]
201
+ options[:corpus_path]
202
+ elsif defined?(Legion::Settings)
203
+ Legion::Settings.dig(:knowledge, :corpus_path) || ::Dir.pwd
204
+ else
205
+ ::Dir.pwd
206
+ end
207
+ end
208
+
119
209
  def print_sources(sources, out, verbose:)
120
210
  return out.warn('No sources found') if sources.empty?
121
211
 
@@ -128,6 +218,18 @@ module Legion
128
218
  end
129
219
  end
130
220
 
221
+ def print_chunk_section(title, chunks, out)
222
+ out.header(title)
223
+ if chunks.empty?
224
+ out.warn(' (none)')
225
+ else
226
+ chunks.each do |c|
227
+ puts " id=#{c[:id]} confidence=#{c[:confidence]} #{c[:source_file]}"
228
+ end
229
+ end
230
+ out.spacer
231
+ end
232
+
131
233
  def truncate(text, max)
132
234
  return text if text.length <= max
133
235
  return text[0, max] if max < 4
@@ -27,8 +27,24 @@ module Legion
27
27
 
28
28
  PACKS = {
29
29
  agentic: {
30
- description: 'Full cognitive stack: GAIA + LLM + MCP + Apollo',
31
- gems: %w[legion-gaia legion-llm]
30
+ description: 'Full cognitive stack: core libs, agentic domains, AI providers, and operational extensions',
31
+ gems: %w[
32
+ legion-apollo legion-gaia legion-llm legion-mcp legion-rbac
33
+ lex-acp lex-adapter lex-agentic-affect lex-agentic-attention
34
+ lex-agentic-defense lex-agentic-executive lex-agentic-homeostasis
35
+ lex-agentic-imagination lex-agentic-inference lex-agentic-integration
36
+ lex-agentic-language lex-agentic-learning lex-agentic-memory
37
+ lex-agentic-self lex-agentic-social lex-apollo lex-audit lex-autofix
38
+ lex-azure-ai lex-bedrock lex-claude lex-codegen lex-coldstart
39
+ lex-conditioner lex-cortex lex-cost-scanner lex-dataset lex-detect
40
+ lex-eval lex-exec lex-extinction lex-factory lex-finops lex-foundry
41
+ lex-gemini lex-governance lex-kerberos lex-knowledge lex-llm-gateway
42
+ lex-metering lex-mesh lex-microsoft_teams lex-mind-growth lex-node
43
+ lex-onboard lex-openai lex-pilot-infra-monitor
44
+ lex-pilot-knowledge-assist lex-privatecore lex-prompt lex-react
45
+ lex-swarm lex-swarm-github lex-synapse lex-telemetry lex-tick
46
+ lex-transformer lex-xai
47
+ ]
32
48
  },
33
49
  llm: {
34
50
  description: 'LLM routing and provider integration (no cognitive stack)',
@@ -114,6 +130,8 @@ module Legion
114
130
  def agentic
115
131
  install_pack(:agentic)
116
132
  end
133
+ map 'give-me-all-the-brains' => :agentic
134
+ map 'brains' => :agentic
117
135
 
118
136
  desc 'llm', 'Install LLM routing and provider integration'
119
137
  option :dry_run, type: :boolean, default: false, desc: 'Show what would be installed without installing'
data/lib/legion/cli.rb CHANGED
@@ -65,6 +65,16 @@ module Legion
65
65
  autoload :Features, 'legion/cli/features_command'
66
66
  autoload :Debug, 'legion/cli/debug_command'
67
67
 
68
+ module Groups
69
+ autoload :Ai, 'legion/cli/groups/ai_group'
70
+ autoload :Git, 'legion/cli/groups/git_group'
71
+ autoload :Pipeline, 'legion/cli/groups/pipeline_group'
72
+ autoload :Ops, 'legion/cli/groups/ops_group'
73
+ autoload :Serve, 'legion/cli/groups/serve_group'
74
+ autoload :Admin, 'legion/cli/groups/admin_group'
75
+ autoload :Dev, 'legion/cli/groups/dev_group'
76
+ end
77
+
68
78
  class Main < Thor
69
79
  def self.exit_on_failure?
70
80
  true
@@ -199,6 +209,7 @@ module Legion
199
209
  exit(exit_code) if exit_code != 0
200
210
  end
201
211
 
212
+ # --- Core framework ---
202
213
  desc 'lex SUBCOMMAND', 'Manage Legion extensions (LEXs)'
203
214
  subcommand 'lex', Legion::CLI::Lex
204
215
 
@@ -211,81 +222,18 @@ module Legion
211
222
  desc 'config SUBCOMMAND', 'View and validate configuration'
212
223
  subcommand 'config', Legion::CLI::Config
213
224
 
214
- desc 'generate SUBCOMMAND', 'Code generators for LEX components'
215
- map 'g' => :generate
216
- subcommand 'generate', Legion::CLI::Generate
217
-
218
- desc 'acp SUBCOMMAND', 'Start ACP agent for editor integration'
219
- subcommand 'acp', Legion::CLI::Acp
220
-
221
- desc 'mcp SUBCOMMAND', 'Start MCP server for AI agent integration'
222
- subcommand 'mcp', Legion::CLI::Mcp
223
-
224
- desc 'worker SUBCOMMAND', 'Manage digital workers'
225
- subcommand 'worker', Legion::CLI::Worker
226
-
227
- desc 'coldstart SUBCOMMAND', 'Cold start bootstrap and Claude memory ingestion'
228
- subcommand 'coldstart', Legion::CLI::Coldstart
229
-
230
- desc 'chat SUBCOMMAND', 'Interactive AI conversation'
231
- subcommand 'chat', Legion::CLI::Chat
232
-
233
- desc 'commit', 'Generate AI commit message from staged changes'
234
- subcommand 'commit', Legion::CLI::Commit
235
-
236
- desc 'pr', 'Create pull request with AI-generated title and description'
237
- subcommand 'pr', Legion::CLI::Pr
238
-
239
- desc 'review', 'AI code review of changes'
240
- subcommand 'review', Legion::CLI::Review
241
-
242
- desc 'memory SUBCOMMAND', 'Persistent project memory across sessions'
243
- subcommand 'memory', Legion::CLI::Memory
244
-
245
- desc 'mind-growth SUBCOMMAND', 'Autonomous cognitive architecture expansion'
246
- subcommand 'mind-growth', Legion::CLI::MindGrowth
247
-
248
- desc 'plan', 'Start plan mode (read-only exploration, no writes)'
249
- subcommand 'plan', Legion::CLI::Plan
250
-
251
- desc 'swarm SUBCOMMAND', 'Multi-agent swarm orchestration'
252
- subcommand 'swarm', Legion::CLI::Swarm
253
-
254
- desc 'gaia SUBCOMMAND', 'GAIA cognitive coordination'
255
- subcommand 'gaia', Legion::CLI::Gaia
256
-
257
- desc 'apollo SUBCOMMAND', 'Apollo knowledge graph'
258
- subcommand 'apollo', Legion::CLI::Apollo
259
-
260
- desc 'knowledge SUBCOMMAND', 'Search and manage the document knowledge base'
261
- subcommand 'knowledge', Legion::CLI::Knowledge
262
-
263
225
  desc 'schedule SUBCOMMAND', 'Manage schedules'
264
226
  subcommand 'schedule', Legion::CLI::Schedule
265
227
 
266
- desc 'completion SUBCOMMAND', 'Shell tab completion scripts'
267
- subcommand 'completion', Legion::CLI::Completion
268
-
269
- desc 'openapi SUBCOMMAND', 'OpenAPI spec generation'
270
- subcommand 'openapi', Legion::CLI::Openapi
228
+ desc 'coldstart SUBCOMMAND', 'Cold start bootstrap and Claude memory ingestion'
229
+ subcommand 'coldstart', Legion::CLI::Coldstart
271
230
 
231
+ # --- Health & maintenance ---
272
232
  desc 'doctor', 'Diagnose environment and suggest fixes'
273
233
  subcommand 'doctor', Legion::CLI::Doctor
274
234
 
275
- desc 'telemetry SUBCOMMAND', 'Session log analytics and telemetry'
276
- subcommand 'telemetry', Legion::CLI::Telemetry
277
-
278
- desc 'auth SUBCOMMAND', 'Authenticate with external services'
279
- subcommand 'auth', Legion::CLI::Auth
280
-
281
- desc 'rbac SUBCOMMAND', 'Role-based access control management'
282
- subcommand 'rbac', Legion::CLI::Rbac
283
-
284
- desc 'audit SUBCOMMAND', 'Audit log inspection and verification'
285
- subcommand 'audit', Legion::CLI::Audit
286
-
287
- desc 'detect', 'Scan environment and recommend extensions'
288
- subcommand 'detect', Legion::CLI::Detect
235
+ desc 'setup SUBCOMMAND', 'Install feature packs and configure IDE integrations'
236
+ subcommand 'setup', Legion::CLI::Setup
289
237
 
290
238
  desc 'update', 'Update Legion gems to latest versions'
291
239
  subcommand 'update', Legion::CLI::Update
@@ -293,62 +241,31 @@ module Legion
293
241
  desc 'init', 'Initialize a new Legion workspace'
294
242
  subcommand 'init', Legion::CLI::Init
295
243
 
296
- desc 'setup SUBCOMMAND', 'Install feature packs and configure IDE integrations'
297
- subcommand 'setup', Legion::CLI::Setup
298
-
299
- desc 'skill', 'Manage skills (.legion/skills/ markdown files)'
300
- subcommand 'skill', Legion::CLI::Skill
301
-
302
- desc 'prompt SUBCOMMAND', 'Manage versioned LLM prompt templates'
303
- subcommand 'prompt', Legion::CLI::Prompt
304
-
305
- desc 'dataset SUBCOMMAND', 'Manage versioned datasets'
306
- subcommand 'dataset', Legion::CLI::Dataset
307
-
308
- desc 'cost', 'Cost visibility and reporting'
309
- subcommand 'cost', Legion::CLI::Cost
310
-
311
- desc 'team SUBCOMMAND', 'Team and multi-user management'
312
- subcommand 'team', Legion::CLI::Team
313
-
314
- desc 'marketplace', 'Extension marketplace (search, info, scan)'
315
- subcommand 'marketplace', Legion::CLI::Marketplace
316
-
317
- desc 'notebook', 'Read and export Jupyter notebooks'
318
- subcommand 'notebook', Legion::CLI::Notebook
319
-
320
- desc 'llm', 'LLM provider diagnostics (status, ping, models)'
321
- subcommand 'llm', Legion::CLI::Llm
322
-
244
+ # --- Interactive & shortcuts ---
323
245
  desc 'tty', 'Rich terminal UI (onboarding, AI chat, dashboard)'
324
246
  subcommand 'tty', Legion::CLI::Tty
325
247
 
326
- desc 'eval SUBCOMMAND', 'Eval gating and experiment management'
327
- subcommand 'eval', Legion::CLI::Eval
328
-
329
- desc 'observe SUBCOMMAND', 'MCP tool observation stats'
330
- subcommand 'observe', Legion::CLI::ObserveCommand
331
-
332
- desc 'image SUBCOMMAND', 'Multimodal image analysis and comparison'
333
- subcommand 'image', Legion::CLI::Image
248
+ # --- Command groups ---
249
+ desc 'ai SUBCOMMAND', 'AI, cognitive, and knowledge commands'
250
+ subcommand 'ai', Legion::CLI::Groups::Ai
334
251
 
335
- desc 'payroll SUBCOMMAND', 'Workforce cost and labor economics'
336
- subcommand 'payroll', Legion::CLI::Payroll
252
+ desc 'git SUBCOMMAND', 'AI-assisted git workflow (commit, pr, review)'
253
+ subcommand 'git', Legion::CLI::Groups::Git
337
254
 
338
- desc 'docs SUBCOMMAND', 'Documentation site generator'
339
- subcommand 'docs', Legion::CLI::Docs
255
+ desc 'pipeline SUBCOMMAND', 'LLM pipeline tools (prompts, evals, datasets, skills)'
256
+ subcommand 'pipeline', Legion::CLI::Groups::Pipeline
340
257
 
341
- desc 'failover SUBCOMMAND', 'Region failover management'
342
- subcommand 'failover', Legion::CLI::Failover
258
+ desc 'ops SUBCOMMAND', 'Observability, cost, audit, and operations'
259
+ subcommand 'ops', Legion::CLI::Groups::Ops
343
260
 
344
- desc 'trace SUBCOMMAND', 'Natural language trace search via LLM'
345
- subcommand 'trace', Legion::CLI::TraceCommand
261
+ desc 'serve SUBCOMMAND', 'Protocol servers (MCP, ACP)'
262
+ subcommand 'serve', Legion::CLI::Groups::Serve
346
263
 
347
- desc 'features SUBCOMMAND', 'Install feature bundles (interactive selector)'
348
- subcommand 'features', Legion::CLI::Features
264
+ desc 'admin SUBCOMMAND', 'Auth, RBAC, workers, and teams'
265
+ subcommand 'admin', Legion::CLI::Groups::Admin
349
266
 
350
- desc 'debug', 'Diagnostic dump for troubleshooting (pipe to LLM for analysis)'
351
- subcommand 'debug', Legion::CLI::Debug
267
+ desc 'dev SUBCOMMAND', 'Generators, docs, marketplace, and shell completion'
268
+ subcommand 'dev', Legion::CLI::Groups::Dev
352
269
 
353
270
  desc 'tree', 'Print a tree of all available commands'
354
271
  def tree
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Legion
4
- VERSION = '1.5.19'
4
+ VERSION = '1.5.22'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: legionio
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.19
4
+ version: 1.5.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity
@@ -625,6 +625,13 @@ files:
625
625
  - lib/legion/cli/gaia_command.rb
626
626
  - lib/legion/cli/generate_command.rb
627
627
  - lib/legion/cli/graph_command.rb
628
+ - lib/legion/cli/groups/admin_group.rb
629
+ - lib/legion/cli/groups/ai_group.rb
630
+ - lib/legion/cli/groups/dev_group.rb
631
+ - lib/legion/cli/groups/git_group.rb
632
+ - lib/legion/cli/groups/ops_group.rb
633
+ - lib/legion/cli/groups/pipeline_group.rb
634
+ - lib/legion/cli/groups/serve_group.rb
628
635
  - lib/legion/cli/image_command.rb
629
636
  - lib/legion/cli/init/config_generator.rb
630
637
  - lib/legion/cli/init/environment_detector.rb