Skip to main content

systemprompt_models/modules/
cli_paths.rs

1//! CLI command path constants - prevents hardcoded strings from getting out of
2//! sync.
3
4#[derive(Debug, Clone, Copy)]
5pub struct CliPaths;
6
7impl CliPaths {
8    pub const ADMIN: &'static str = "admin";
9    pub const INFRA: &'static str = "infra";
10    pub const CORE: &'static str = "core";
11    pub const PLUGINS: &'static str = "plugins";
12    pub const CLOUD: &'static str = "cloud";
13    pub const ANALYTICS: &'static str = "analytics";
14    pub const WEB: &'static str = "web";
15    pub const BUILD: &'static str = "build";
16
17    pub const AGENTS: &'static str = "agents";
18    pub const USERS: &'static str = "users";
19    pub const CONFIG: &'static str = "config";
20    pub const SETUP: &'static str = "setup";
21    pub const SESSION: &'static str = "session";
22
23    pub const DB: &'static str = "db";
24    pub const JOBS: &'static str = "jobs";
25    pub const LOGS: &'static str = "logs";
26    pub const SERVICES: &'static str = "services";
27    pub const SYSTEM: &'static str = "system";
28
29    pub const CONTENT: &'static str = "content";
30    pub const FILES: &'static str = "files";
31    pub const CONTEXTS: &'static str = "contexts";
32    pub const SKILLS: &'static str = "skills";
33
34    pub const MCP: &'static str = "mcp";
35
36    pub const RUN: &'static str = "run";
37    pub const LIST: &'static str = "list";
38    pub const SHOW: &'static str = "show";
39    pub const START: &'static str = "start";
40    pub const STOP: &'static str = "stop";
41    pub const STATUS: &'static str = "status";
42    pub const RESTART: &'static str = "restart";
43    pub const MIGRATE: &'static str = "migrate";
44    pub const SERVE: &'static str = "serve";
45
46    pub const fn agent_run_args() -> [&'static str; 3] {
47        [Self::ADMIN, Self::AGENTS, Self::RUN]
48    }
49
50    pub const fn db_migrate_args() -> [&'static str; 3] {
51        [Self::INFRA, Self::DB, Self::MIGRATE]
52    }
53
54    pub const fn services_serve_args() -> [&'static str; 3] {
55        [Self::INFRA, Self::SERVICES, Self::SERVE]
56    }
57
58    pub const fn infra_db_args(subcommand: &str) -> [&str; 3] {
59        [Self::INFRA, Self::DB, subcommand]
60    }
61
62    pub const fn infra_services_args(subcommand: &str) -> [&str; 3] {
63        [Self::INFRA, Self::SERVICES, subcommand]
64    }
65
66    pub const fn admin_agents_args(subcommand: &str) -> [&str; 3] {
67        [Self::ADMIN, Self::AGENTS, subcommand]
68    }
69
70    pub const fn plugins_mcp_args(subcommand: &str) -> [&str; 3] {
71        [Self::PLUGINS, Self::MCP, subcommand]
72    }
73
74    pub const fn db_migrate_cmd() -> &'static str {
75        "infra db migrate"
76    }
77
78    pub const fn services_serve_cmd() -> &'static str {
79        "infra services serve"
80    }
81
82    pub const fn agent_run_cmd_pattern() -> &'static str {
83        "admin agents run"
84    }
85}