diff options
Diffstat (limited to 'makima/src/daemon/cli/mod.rs')
| -rw-r--r-- | makima/src/daemon/cli/mod.rs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/makima/src/daemon/cli/mod.rs b/makima/src/daemon/cli/mod.rs index 3394b35..216f281 100644 --- a/makima/src/daemon/cli/mod.rs +++ b/makima/src/daemon/cli/mod.rs @@ -1,5 +1,6 @@ //! Command-line interface for the makima CLI. +pub mod config; pub mod contract; pub mod daemon; pub mod server; @@ -8,6 +9,7 @@ pub mod view; use clap::{Parser, Subcommand}; +pub use config::CliConfig; pub use contract::ContractArgs; pub use daemon::DaemonArgs; pub use server::ServerArgs; @@ -48,7 +50,34 @@ pub enum Commands { /// ↑/k: Move up ↓/j: Move down Enter/l: Drill in /// Esc/h: Go back /: Search q: Quit /// e: Edit d: Delete c: cd to worktree + /// n: New contract View(ViewArgs), + + /// Configure CLI settings (API key, server URL) + /// + /// Saves configuration to ~/.makima/config.toml for use by CLI commands. + #[command(subcommand)] + Config(ConfigCommand), +} + +/// Config subcommands for CLI configuration. +#[derive(Subcommand, Debug)] +pub enum ConfigCommand { + /// Set the API key + /// + /// Saves the API key to ~/.makima/config.toml + SetKey(config::SetKeyArgs), + + /// Set the API URL + /// + /// Saves the API URL to ~/.makima/config.toml + SetUrl(config::SetUrlArgs), + + /// Show current configuration + Show, + + /// Show the config file path + Path, } /// Supervisor subcommands for contract orchestration. |
