kura_cli/commands/dev.rs
1use clap::Subcommand;
2
3use crate::commands;
4
5#[derive(Subcommand)]
6pub enum DevCommands {
7 /// Check API health
8 Health,
9 /// Direct API access (like gh api — works with any endpoint)
10 Api(commands::api::ApiArgs),
11 /// Execute one request from a JSON envelope file (defaults to stdin)
12 Exec(commands::exec::ExecArgs),
13 /// Emit machine-readable schema for CLI commands/args
14 Schema {
15 /// Optional command path, e.g. `dev api` or `log workout`
16 #[arg(value_name = "COMMAND", num_args = 0..)]
17 path: Vec<String>,
18 },
19 /// Event operations (create, list, batch)
20 Event {
21 #[command(subcommand)]
22 command: commands::event::EventCommands,
23 },
24 /// Projection operations (get, list)
25 Projection {
26 #[command(subcommand)]
27 command: commands::projection::ProjectionCommands,
28 },
29 /// Agent operations (vNext writes, context, legacy repair surfaces, preferences, visualization)
30 Agent {
31 #[command(subcommand)]
32 command: commands::agent::AgentCommands,
33 },
34 /// Observation workflows (draft visibility + promotion)
35 Observation {
36 #[command(subcommand)]
37 command: commands::observation::ObservationCommands,
38 },
39 /// MCP server operations (Model Context Protocol over stdio)
40 Mcp {
41 #[command(subcommand)]
42 command: commands::mcp::McpCommands,
43 },
44 /// External import job operations
45 Import {
46 #[command(subcommand)]
47 command: commands::imports::ImportCommands,
48 },
49 /// Provider connection operations
50 Provider {
51 #[command(subcommand)]
52 command: commands::provider::ProviderCommands,
53 },
54 /// Offline replay evaluation wrappers (worker-backed)
55 Eval {
56 #[command(subcommand)]
57 command: commands::eval::EvalCommands,
58 },
59 /// Get all projections in one call (agent bootstrap snapshot)
60 Snapshot,
61 /// Get system configuration (dimensions, conventions, event types)
62 Config,
63 /// Diagnose setup: API, auth, worker, system config
64 Doctor,
65 /// Discover API surfaces (OpenAPI endpoints or exercise vocabulary)
66 Discover {
67 /// Show compact endpoint list only (method, path, summary)
68 #[arg(long, conflicts_with = "exercises")]
69 endpoints: bool,
70 /// Show exercise vocabulary entries from semantic catalog
71 #[arg(long, conflicts_with = "endpoints")]
72 exercises: bool,
73 /// Optional search query (case-insensitive), only with --exercises
74 #[arg(long, requires = "exercises")]
75 query: Option<String>,
76 /// Max number of entries (1..=200), only with --exercises
77 #[arg(long, requires = "exercises", value_parser = clap::value_parser!(u32).range(1..=200))]
78 limit: Option<u32>,
79 },
80}