From afc53a421d7fbba940424337d25197b00a8ef781 Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Sun, 5 Apr 2026 16:06:42 -0400 Subject: [PATCH] refactor(cli): deglobalize server and storage target flags Move --storage-dir and --server-url off GlobalArgs and onto the leaf commands that actually honor them. This aligns help, parser behavior, and env-var wiring with the current command architecture while preserving the intended model and exec targeting semantics. --- lib/crates/fabro-cli/src/args.rs | 352 +++++++++++++----- .../fabro-cli/src/commands/artifact/cp.rs | 4 +- .../fabro-cli/src/commands/artifact/list.rs | 4 +- .../fabro-cli/src/commands/config/mod.rs | 6 +- lib/crates/fabro-cli/src/commands/exec.rs | 19 +- lib/crates/fabro-cli/src/commands/model.rs | 33 +- lib/crates/fabro-cli/src/commands/pr/close.rs | 4 +- .../fabro-cli/src/commands/pr/create.rs | 4 +- lib/crates/fabro-cli/src/commands/pr/list.rs | 4 +- lib/crates/fabro-cli/src/commands/pr/merge.rs | 4 +- lib/crates/fabro-cli/src/commands/pr/mod.rs | 31 +- lib/crates/fabro-cli/src/commands/pr/view.rs | 4 +- .../fabro-cli/src/commands/preflight.rs | 6 +- .../fabro-cli/src/commands/run/command.rs | 7 +- lib/crates/fabro-cli/src/commands/run/cp.rs | 4 +- lib/crates/fabro-cli/src/commands/run/diff.rs | 4 +- lib/crates/fabro-cli/src/commands/run/fork.rs | 4 +- lib/crates/fabro-cli/src/commands/run/logs.rs | 4 +- lib/crates/fabro-cli/src/commands/run/mod.rs | 25 +- .../fabro-cli/src/commands/run/preview.rs | 4 +- .../fabro-cli/src/commands/run/resume.rs | 4 +- .../fabro-cli/src/commands/run/rewind.rs | 4 +- lib/crates/fabro-cli/src/commands/run/ssh.rs | 4 +- lib/crates/fabro-cli/src/commands/run/wait.rs | 4 +- .../fabro-cli/src/commands/runs/inspect.rs | 6 +- .../fabro-cli/src/commands/runs/list.rs | 4 +- lib/crates/fabro-cli/src/commands/runs/rm.rs | 4 +- .../fabro-cli/src/commands/server/mod.rs | 37 +- .../fabro-cli/src/commands/store/dump.rs | 4 +- .../fabro-cli/src/commands/system/df.rs | 4 +- .../fabro-cli/src/commands/system/prune.rs | 4 +- lib/crates/fabro-cli/src/main.rs | 113 ++++-- lib/crates/fabro-cli/src/user_config.rs | 104 +++--- lib/crates/fabro-cli/tests/it/cmd/artifact.rs | 14 +- .../fabro-cli/tests/it/cmd/artifact_cp.rs | 15 +- .../fabro-cli/tests/it/cmd/artifact_list.rs | 7 +- lib/crates/fabro-cli/tests/it/cmd/attach.rs | 5 +- .../fabro-cli/tests/it/cmd/completion.rs | 14 +- lib/crates/fabro-cli/tests/it/cmd/config.rs | 33 +- lib/crates/fabro-cli/tests/it/cmd/create.rs | 11 +- lib/crates/fabro-cli/tests/it/cmd/diff.rs | 15 +- lib/crates/fabro-cli/tests/it/cmd/discord.rs | 14 +- lib/crates/fabro-cli/tests/it/cmd/docs.rs | 14 +- lib/crates/fabro-cli/tests/it/cmd/doctor.rs | 16 +- lib/crates/fabro-cli/tests/it/cmd/exec.rs | 7 +- lib/crates/fabro-cli/tests/it/cmd/fabro.rs | 16 +- lib/crates/fabro-cli/tests/it/cmd/fork.rs | 5 +- lib/crates/fabro-cli/tests/it/cmd/graph.rs | 10 - lib/crates/fabro-cli/tests/it/cmd/inspect.rs | 3 +- lib/crates/fabro-cli/tests/it/cmd/install.rs | 16 +- lib/crates/fabro-cli/tests/it/cmd/logs.rs | 9 +- lib/crates/fabro-cli/tests/it/cmd/model.rs | 14 +- .../fabro-cli/tests/it/cmd/model_list.rs | 8 +- .../fabro-cli/tests/it/cmd/model_test.rs | 14 +- lib/crates/fabro-cli/tests/it/cmd/parse.rs | 14 +- lib/crates/fabro-cli/tests/it/cmd/pr.rs | 14 +- lib/crates/fabro-cli/tests/it/cmd/pr_close.rs | 3 +- .../fabro-cli/tests/it/cmd/pr_create.rs | 5 +- lib/crates/fabro-cli/tests/it/cmd/pr_list.rs | 5 +- lib/crates/fabro-cli/tests/it/cmd/pr_merge.rs | 5 +- lib/crates/fabro-cli/tests/it/cmd/pr_view.rs | 3 +- .../fabro-cli/tests/it/cmd/preflight.rs | 9 +- lib/crates/fabro-cli/tests/it/cmd/provider.rs | 14 +- .../fabro-cli/tests/it/cmd/provider_login.rs | 16 +- lib/crates/fabro-cli/tests/it/cmd/ps.rs | 9 +- lib/crates/fabro-cli/tests/it/cmd/repo.rs | 28 +- .../fabro-cli/tests/it/cmd/repo_deinit.rs | 14 +- .../fabro-cli/tests/it/cmd/repo_init.rs | 14 +- lib/crates/fabro-cli/tests/it/cmd/resume.rs | 7 +- lib/crates/fabro-cli/tests/it/cmd/rewind.rs | 5 +- lib/crates/fabro-cli/tests/it/cmd/rm.rs | 5 +- lib/crates/fabro-cli/tests/it/cmd/run.rs | 11 +- lib/crates/fabro-cli/tests/it/cmd/runner.rs | 7 +- .../fabro-cli/tests/it/cmd/sandbox_cp.rs | 5 +- .../fabro-cli/tests/it/cmd/sandbox_preview.rs | 7 +- .../fabro-cli/tests/it/cmd/sandbox_ssh.rs | 7 +- lib/crates/fabro-cli/tests/it/cmd/secret.rs | 14 +- .../fabro-cli/tests/it/cmd/secret_get.rs | 14 +- .../fabro-cli/tests/it/cmd/secret_list.rs | 16 +- .../fabro-cli/tests/it/cmd/secret_rm.rs | 14 +- .../fabro-cli/tests/it/cmd/secret_set.rs | 14 +- .../fabro-cli/tests/it/cmd/send_analytics.rs | 14 +- .../fabro-cli/tests/it/cmd/send_panic.rs | 14 +- .../fabro-cli/tests/it/cmd/server_start.rs | 42 +-- .../fabro-cli/tests/it/cmd/server_status.rs | 5 +- .../fabro-cli/tests/it/cmd/server_stop.rs | 5 +- lib/crates/fabro-cli/tests/it/cmd/start.rs | 3 +- lib/crates/fabro-cli/tests/it/cmd/store.rs | 14 +- .../fabro-cli/tests/it/cmd/store_dump.rs | 5 +- lib/crates/fabro-cli/tests/it/cmd/system.rs | 14 +- .../fabro-cli/tests/it/cmd/system_df.rs | 5 +- .../fabro-cli/tests/it/cmd/system_prune.rs | 11 +- lib/crates/fabro-cli/tests/it/cmd/upgrade.rs | 20 +- lib/crates/fabro-cli/tests/it/cmd/validate.rs | 14 +- lib/crates/fabro-cli/tests/it/cmd/wait.rs | 5 +- lib/crates/fabro-cli/tests/it/cmd/workflow.rs | 14 +- .../fabro-cli/tests/it/cmd/workflow_create.rs | 16 +- .../fabro-cli/tests/it/cmd/workflow_list.rs | 14 +- 98 files changed, 871 insertions(+), 706 deletions(-) diff --git a/lib/crates/fabro-cli/src/args.rs b/lib/crates/fabro-cli/src/args.rs index 6572911be..43d6d54c3 100644 --- a/lib/crates/fabro-cli/src/args.rs +++ b/lib/crates/fabro-cli/src/args.rs @@ -1,5 +1,5 @@ use std::fmt; -use std::path::PathBuf; +use std::path::{Path, PathBuf}; use clap::{Args, Subcommand, ValueEnum}; use fabro_agent::cli::AgentArgs; @@ -35,19 +35,6 @@ pub(crate) struct GlobalArgs { /// Enable verbose output #[arg(long, global = true, env = "FABRO_VERBOSE", value_parser = clap::builder::BoolishValueParser::new(), conflicts_with = "quiet")] pub verbose: bool, - - /// Local storage directory (default: ~/.fabro) - #[arg(long, global = true, env = "FABRO_STORAGE_DIR")] - pub storage_dir: Option, - - /// Fabro API server URL (overrides server.base_url from user.toml when supported) - #[arg( - long, - global = true, - env = "FABRO_SERVER_URL", - conflicts_with = "storage_dir" - )] - pub server_url: Option, } impl GlobalArgs { @@ -57,6 +44,57 @@ impl GlobalArgs { } } +#[derive(Args, Debug, Clone, Default)] +pub(crate) struct StorageDirArgs { + /// Local storage directory (default: ~/.fabro) + #[arg(long, env = "FABRO_STORAGE_DIR")] + pub(crate) storage_dir: Option, +} + +impl StorageDirArgs { + pub(crate) fn as_deref(&self) -> Option<&Path> { + self.storage_dir.as_deref() + } + + pub(crate) fn clone_path(&self) -> Option { + self.storage_dir.clone() + } +} + +#[derive(Args, Debug, Clone, Default)] +pub(crate) struct ServerUrlArgs { + /// Fabro API server URL (overrides server.base_url from user.toml when supported) + #[arg(long, env = "FABRO_SERVER_URL")] + pub(crate) server_url: Option, +} + +impl ServerUrlArgs { + pub(crate) fn as_deref(&self) -> Option<&str> { + self.server_url.as_deref() + } +} + +#[derive(Args, Debug, Clone, Default)] +pub(crate) struct ModelTargetArgs { + /// Local storage directory (default: ~/.fabro) + #[arg(long, env = "FABRO_STORAGE_DIR", conflicts_with = "server_url")] + pub(crate) storage_dir: Option, + + /// Fabro API server URL (overrides server.base_url from user.toml when supported) + #[arg(long, env = "FABRO_SERVER_URL", conflicts_with = "storage_dir")] + pub(crate) server_url: Option, +} + +impl ModelTargetArgs { + pub(crate) fn storage_dir(&self) -> Option<&Path> { + self.storage_dir.as_deref() + } + + pub(crate) fn server_url(&self) -> Option<&str> { + self.server_url.as_deref() + } +} + #[derive(Debug, Clone, Copy, ValueEnum)] pub(crate) enum CliSandboxProvider { Local, @@ -86,6 +124,9 @@ impl From for CliSandboxProvider { #[derive(Args)] pub(crate) struct RunArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + /// Path to a .fabro workflow file or .toml task config #[arg(required = true)] pub(crate) workflow: Option, @@ -145,6 +186,9 @@ pub(crate) struct RunArgs { #[derive(Args)] pub(crate) struct PreflightArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + /// Path to a .fabro workflow file or .toml task config pub(crate) workflow: PathBuf, @@ -194,6 +238,9 @@ pub(crate) struct RunFilterArgs { #[derive(Args)] pub(crate) struct RunsListArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + #[command(flatten)] pub(crate) filter: RunFilterArgs, @@ -208,6 +255,9 @@ pub(crate) struct RunsListArgs { #[derive(Args)] pub(crate) struct RunsRemoveArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + /// Run IDs or workflow names to remove #[arg(required = true)] pub(crate) runs: Vec, @@ -219,6 +269,9 @@ pub(crate) struct RunsRemoveArgs { #[derive(Args)] pub(crate) struct LogsArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + /// Run ID prefix or workflow name (most recent run) pub(crate) run: String, /// Follow log output @@ -308,6 +361,9 @@ pub(crate) struct ParseArgs { #[derive(Args)] pub(crate) struct ArtifactListArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + /// Run ID (or prefix) pub(crate) run_id: String, @@ -322,6 +378,9 @@ pub(crate) struct ArtifactListArgs { #[derive(Args)] pub(crate) struct ArtifactCpArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + /// Source: RUN_ID (all artifacts) or RUN_ID:path (specific artifact) pub(crate) source: String, @@ -344,6 +403,9 @@ pub(crate) struct ArtifactCpArgs { #[derive(Args)] pub(crate) struct CpArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + /// Source: : or local path pub(crate) src: String, /// Destination: : or local path @@ -355,6 +417,9 @@ pub(crate) struct CpArgs { #[derive(Args)] pub(crate) struct PreviewArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + /// Run ID or prefix pub(crate) run: String, /// Port number @@ -372,6 +437,9 @@ pub(crate) struct PreviewArgs { #[derive(Args)] pub(crate) struct SshArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + /// Run ID or prefix pub(crate) run: String, /// SSH access expiry in minutes (default 60) @@ -384,6 +452,9 @@ pub(crate) struct SshArgs { #[derive(Args)] pub(crate) struct DiffArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + /// Run ID or prefix pub(crate) run: String, /// Show diff for a specific node @@ -399,12 +470,18 @@ pub(crate) struct DiffArgs { #[derive(Args)] pub(crate) struct InspectArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + /// Run ID prefix or workflow name (most recent run) pub(crate) run: String, } #[derive(Args)] pub(crate) struct StoreDumpArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + /// Run ID prefix or workflow name pub(crate) run: String, @@ -442,6 +519,9 @@ pub(crate) struct SecretSetArgs { #[derive(Debug, Args)] pub(crate) struct ResumeArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + /// Run ID or unambiguous prefix pub(crate) run: String, @@ -452,6 +532,9 @@ pub(crate) struct ResumeArgs { #[derive(Debug, Args)] pub(crate) struct RewindArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + /// Run ID (or unambiguous prefix) pub(crate) run_id: String, @@ -469,6 +552,9 @@ pub(crate) struct RewindArgs { #[derive(Debug, Args)] pub(crate) struct ForkArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + /// Run ID (or unambiguous prefix) pub(crate) run_id: String, @@ -486,6 +572,9 @@ pub(crate) struct ForkArgs { #[derive(Args)] pub(crate) struct WaitArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + /// Run ID prefix or workflow name (most recent run) pub(crate) run: String, @@ -520,6 +609,9 @@ pub(crate) struct ProviderLoginArgs { #[derive(Args)] pub(crate) struct RunsPruneArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + #[command(flatten)] pub(crate) filter: RunFilterArgs, @@ -538,6 +630,9 @@ pub(crate) struct RunsPruneArgs { #[derive(Args)] pub(crate) struct DfArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + /// Show per-run breakdown #[arg(short, long)] pub(crate) verbose: bool, @@ -545,6 +640,9 @@ pub(crate) struct DfArgs { #[derive(Args)] pub(crate) struct SettingsArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + /// Optional workflow name, .fabro path, or .toml run config to overlay pub(crate) workflow: Option, } @@ -578,6 +676,9 @@ pub(crate) struct SkillInstallArgs { #[derive(Args)] pub(crate) struct PrCreateArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + /// Run ID or prefix pub(crate) run_id: String, /// LLM model for generating PR description @@ -587,6 +688,9 @@ pub(crate) struct PrCreateArgs { #[derive(Args)] pub(crate) struct PrListArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + /// Show all PRs (including closed/merged), not just open #[arg(long)] pub(crate) all: bool, @@ -594,12 +698,18 @@ pub(crate) struct PrListArgs { #[derive(Args)] pub(crate) struct PrViewArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + /// Run ID or prefix pub(crate) run_id: String, } #[derive(Args)] pub(crate) struct PrMergeArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + /// Run ID or prefix pub(crate) run_id: String, /// Merge method: merge, squash, or rebase @@ -609,10 +719,85 @@ pub(crate) struct PrMergeArgs { #[derive(Args)] pub(crate) struct PrCloseArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + /// Run ID or prefix pub(crate) run_id: String, } +#[derive(Args)] +pub(crate) struct StartArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + + /// Run ID prefix or workflow name + pub(crate) run: String, +} + +#[derive(Args)] +pub(crate) struct AttachArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + + /// Run ID prefix or workflow name + pub(crate) run: String, +} + +#[derive(Args)] +pub(crate) struct RunnerArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + + /// Run ID + #[arg(long)] + pub(crate) run_id: fabro_types::RunId, + /// Resume from checkpoint instead of fresh start + #[arg(long)] + pub(crate) resume: bool, +} + +#[derive(Args, Debug, Clone, Default)] +pub(crate) struct ModelListArgs { + #[command(flatten)] + pub(crate) target: ModelTargetArgs, + + /// Filter by provider + #[arg(short, long)] + pub(crate) provider: Option, + + /// Search for models matching this string + #[arg(short, long)] + pub(crate) query: Option, +} + +#[derive(Args, Debug, Clone, Default)] +pub(crate) struct ModelTestArgs { + #[command(flatten)] + pub(crate) target: ModelTargetArgs, + + /// Filter by provider + #[arg(short, long)] + pub(crate) provider: Option, + + /// Test a specific model + #[arg(short, long)] + pub(crate) model: Option, + + /// Run a multi-turn tool-use test (catches reasoning round-trip bugs) + #[arg(long)] + pub(crate) deep: bool, +} + +#[derive(Args)] +pub(crate) struct ExecArgs { + #[command(flatten)] + pub(crate) server_url: ServerUrlArgs, + + #[command(flatten)] + pub(crate) agent: AgentArgs, +} + #[derive(Args)] pub(crate) struct UpgradeArgs { /// Target version (e.g. "0.5.0" or "v0.5.0") @@ -635,25 +820,12 @@ pub(crate) enum RunCommands { /// Create a workflow run (allocate run dir, persist spec) Create(RunArgs), /// Start a created workflow run on the server - Start { - /// Run ID prefix or workflow name - run: String, - }, + Start(StartArgs), /// Attach to a running or finished workflow run - Attach { - /// Run ID prefix or workflow name - run: String, - }, + Attach(AttachArgs), /// Internal: queue or resume a workflow run via the server #[command(name = "__runner", hide = true)] - Runner { - /// Run ID - #[arg(long)] - run_id: fabro_types::RunId, - /// Resume from checkpoint instead of fresh start - #[arg(long)] - resume: bool, - }, + Runner(RunnerArgs), /// Show the diff of changes from a workflow run #[command(hide = true)] Diff(DiffArgs), @@ -674,9 +846,9 @@ impl RunCommands { match self { Self::Run(_) => "run", Self::Create(_) => "create", - Self::Start { .. } => "start", - Self::Attach { .. } => "attach", - Self::Runner { .. } => "__runner", + Self::Start(_) => "start", + Self::Attach(_) => "attach", + Self::Runner(_) => "__runner", Self::Diff(_) => "diff", Self::Logs(_) => "logs", Self::Resume(_) => "resume", @@ -731,37 +903,17 @@ impl RunsCommands { #[derive(Subcommand)] pub(crate) enum ModelsCommand { /// List available models - List { - /// Filter by provider - #[arg(short, long)] - provider: Option, - - /// Search for models matching this string - #[arg(short, long)] - query: Option, - }, + List(ModelListArgs), /// Test model availability by sending a simple prompt - Test { - /// Filter by provider - #[arg(short, long)] - provider: Option, - - /// Test a specific model - #[arg(short, long)] - model: Option, - - /// Run a multi-turn tool-use test (catches reasoning round-trip bugs) - #[arg(long)] - deep: bool, - }, + Test(ModelTestArgs), } #[derive(Subcommand)] pub(crate) enum Commands { /// Run an agentic coding session #[command(hide = true)] - Exec(AgentArgs), + Exec(ExecArgs), #[command(flatten)] RunCmd(RunCommands), /// Validate run configuration without executing @@ -871,15 +1023,15 @@ impl Commands { Self::Parse(_) => "parse", Self::RunsCmd(cmd) => cmd.name(), Self::Model { command } => match command { - Some(ModelsCommand::List { .. }) => "model list", - Some(ModelsCommand::Test { .. }) => "model test", + Some(ModelsCommand::List(_)) => "model list", + Some(ModelsCommand::Test(_)) => "model test", None => "model", }, Self::Server(ns) => match &ns.command { - ServerCommand::Start { .. } => "server start", - ServerCommand::Stop { .. } => "server stop", - ServerCommand::Status { .. } => "server status", - ServerCommand::Serve { .. } => "server __serve", + ServerCommand::Start(_) => "server start", + ServerCommand::Stop(_) => "server stop", + ServerCommand::Status(_) => "server status", + ServerCommand::Serve(_) => "server __serve", }, Self::Doctor { .. } => "doctor", Self::Repo(ns) => match &ns.command { @@ -1001,39 +1153,63 @@ pub(crate) struct ServerNamespace { use fabro_server::serve::ServeArgs; +#[derive(Args)] +pub(crate) struct ServerStartArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + + /// Run in the foreground instead of daemonizing + #[arg(long)] + pub(crate) foreground: bool, + + #[command(flatten)] + pub(crate) serve_args: ServeArgs, +} + +#[derive(Args)] +pub(crate) struct ServerStopArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + + /// Seconds to wait for graceful shutdown before SIGKILL + #[arg(long, default_value = "10")] + pub(crate) timeout: u64, +} + +#[derive(Args)] +pub(crate) struct ServerStatusArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + + /// Output as JSON + #[arg(long)] + pub(crate) json: bool, +} + +#[derive(Args)] +pub(crate) struct ServerServeArgs { + #[command(flatten)] + pub(crate) storage_dir: StorageDirArgs, + + /// Path to the server record file + #[arg(long)] + pub(crate) record_path: PathBuf, + + #[command(flatten)] + pub(crate) serve_args: ServeArgs, +} + #[derive(Subcommand)] pub(crate) enum ServerCommand { /// Start the HTTP API server - Start { - /// Run in the foreground instead of daemonizing - #[arg(long)] - foreground: bool, - - #[command(flatten)] - serve_args: ServeArgs, - }, + Start(ServerStartArgs), /// Stop the HTTP API server - Stop { - /// Seconds to wait for graceful shutdown before SIGKILL - #[arg(long, default_value = "10")] - timeout: u64, - }, + Stop(ServerStopArgs), /// Show server status - Status { - /// Output as JSON - #[arg(long)] - json: bool, - }, + Status(ServerStatusArgs), /// Internal: run the server process (spawned by `start`) #[command(name = "__serve", hide = true)] - Serve { - /// Path to the server record file - #[arg(long)] - record_path: PathBuf, - - #[command(flatten)] - serve_args: ServeArgs, - }, + Serve(ServerServeArgs), } #[derive(Args)] diff --git a/lib/crates/fabro-cli/src/commands/artifact/cp.rs b/lib/crates/fabro-cli/src/commands/artifact/cp.rs index b1288b132..fb30c187d 100644 --- a/lib/crates/fabro-cli/src/commands/artifact/cp.rs +++ b/lib/crates/fabro-cli/src/commands/artifact/cp.rs @@ -7,10 +7,10 @@ use fabro_workflow::artifacts::{ArtifactEntry, scan_artifacts}; use crate::args::{ArtifactCpArgs, GlobalArgs}; use crate::server_runs::ServerRunLookup; use crate::shared::{print_json_pretty, split_run_path}; -use crate::user_config::load_user_settings_with_globals; +use crate::user_config::load_user_settings_with_storage_dir; pub(super) async fn cp_command(args: &ArtifactCpArgs, globals: &GlobalArgs) -> Result<()> { - let cli_settings = load_user_settings_with_globals(globals)?; + let cli_settings = load_user_settings_with_storage_dir(args.storage_dir.as_deref())?; let (run_id, asset_path) = parse_source(&args.source); let lookup = ServerRunLookup::connect(&cli_settings.storage_dir()).await?; let run = lookup.resolve(run_id)?; diff --git a/lib/crates/fabro-cli/src/commands/artifact/list.rs b/lib/crates/fabro-cli/src/commands/artifact/list.rs index a7715df5d..7e91cd1f4 100644 --- a/lib/crates/fabro-cli/src/commands/artifact/list.rs +++ b/lib/crates/fabro-cli/src/commands/artifact/list.rs @@ -5,10 +5,10 @@ use fabro_workflow::artifacts::scan_artifacts; use crate::args::{ArtifactListArgs, GlobalArgs}; use crate::server_runs::ServerRunLookup; use crate::shared::format_size; -use crate::user_config::load_user_settings_with_globals; +use crate::user_config::load_user_settings_with_storage_dir; pub(super) async fn list_command(args: &ArtifactListArgs, globals: &GlobalArgs) -> Result<()> { - let cli_settings = load_user_settings_with_globals(globals)?; + let cli_settings = load_user_settings_with_storage_dir(args.storage_dir.as_deref())?; let lookup = ServerRunLookup::connect(&cli_settings.storage_dir()).await?; let run = lookup.resolve(&args.run_id)?; let runtime_state = RuntimeState::new(&run.path); diff --git a/lib/crates/fabro-cli/src/commands/config/mod.rs b/lib/crates/fabro-cli/src/commands/config/mod.rs index e8a23ae20..19972f0e7 100644 --- a/lib/crates/fabro-cli/src/commands/config/mod.rs +++ b/lib/crates/fabro-cli/src/commands/config/mod.rs @@ -7,19 +7,19 @@ use crate::user_config; use fabro_config::ConfigLayer; use fabro_types::Settings; -fn merged_config(workflow: Option<&Path>, globals: &GlobalArgs) -> anyhow::Result { +fn merged_config(workflow: Option<&Path>, args: &SettingsArgs) -> anyhow::Result { let cwd = std::env::current_dir()?; let base = match workflow { Some(path) => ConfigLayer::for_workflow(path, &cwd)?, None => ConfigLayer::project(&cwd)?, }; - let cli = user_config::user_layer_with_globals(globals)?; + let cli = user_config::user_layer_with_storage_dir(args.storage_dir.as_deref())?; base.combine(cli).resolve() } pub(crate) fn execute(args: &SettingsArgs, globals: &GlobalArgs) -> anyhow::Result<()> { - let config = merged_config(args.workflow.as_deref(), globals)?; + let config = merged_config(args.workflow.as_deref(), args)?; if globals.json { print_json_pretty(&config)?; return Ok(()); diff --git a/lib/crates/fabro-cli/src/commands/exec.rs b/lib/crates/fabro-cli/src/commands/exec.rs index c97ad1ec4..43721697e 100644 --- a/lib/crates/fabro-cli/src/commands/exec.rs +++ b/lib/crates/fabro-cli/src/commands/exec.rs @@ -1,5 +1,5 @@ use anyhow::Result; -use fabro_agent::cli::{AgentArgs, OutputFormat, run_with_args, run_with_args_and_client}; +use fabro_agent::cli::{OutputFormat, run_with_args, run_with_args_and_client}; use fabro_config::mcp::McpServerEntry; use fabro_llm::client::Client; use fabro_llm::providers::FabroServerAdapter; @@ -7,24 +7,24 @@ use fabro_mcp::config::McpServerSettings; use std::collections::HashMap; use std::sync::Arc; -use crate::args::GlobalArgs; +use crate::args::{ExecArgs, GlobalArgs}; use crate::user_config; -pub(crate) async fn execute(mut args: AgentArgs, globals: &GlobalArgs) -> Result<()> { - let cli_settings = user_config::load_user_settings_with_globals(globals)?; +pub(crate) async fn execute(mut args: ExecArgs, globals: &GlobalArgs) -> Result<()> { + let cli_settings = user_config::load_user_settings()?; #[cfg(feature = "sleep_inhibitor")] let _sleep_guard = crate::sleep_inhibitor::guard(cli_settings.prevent_idle_sleep_enabled()); let exec_defaults = cli_settings.exec.as_ref(); - args.apply_cli_defaults( + args.agent.apply_cli_defaults( exec_defaults.and_then(|a| a.provider.as_deref()), exec_defaults.and_then(|a| a.model.as_deref()), exec_defaults.and_then(|a| a.permissions), exec_defaults.and_then(|a| a.output_format), ); if globals.json { - args.output_format = Some(OutputFormat::Json); + args.agent.output_format = Some(OutputFormat::Json); } - let server_target = user_config::exec_server_target(globals, &cli_settings); + let server_target = user_config::exec_server_target(&args.server_url, &cli_settings); let mcp_servers: Vec = cli_settings .mcp_servers .into_iter() @@ -34,6 +34,7 @@ pub(crate) async fn execute(mut args: AgentArgs, globals: &GlobalArgs) -> Result tracing::info!(transport = "server", "Agent session starting"); let http_client = user_config::build_server_client(target.tls.as_ref())?; let provider_name = args + .agent .provider .clone() .unwrap_or_else(|| "anthropic".to_string()); @@ -47,10 +48,10 @@ pub(crate) async fn execute(mut args: AgentArgs, globals: &GlobalArgs) -> Result .register_provider(adapter) .await .map_err(|e| anyhow::anyhow!("Failed to register fabro server adapter: {e}"))?; - run_with_args_and_client(args, Some(client), mcp_servers).await?; + run_with_args_and_client(args.agent, Some(client), mcp_servers).await?; } else { tracing::info!(transport = "direct", "Agent session starting"); - run_with_args(args, mcp_servers).await?; + run_with_args(args.agent, mcp_servers).await?; } Ok(()) diff --git a/lib/crates/fabro-cli/src/commands/model.rs b/lib/crates/fabro-cli/src/commands/model.rs index a4e196b48..ef8745a6a 100644 --- a/lib/crates/fabro-cli/src/commands/model.rs +++ b/lib/crates/fabro-cli/src/commands/model.rs @@ -7,7 +7,7 @@ use fabro_util::terminal::Styles; use serde::Serialize; use serde::de::DeserializeOwned; -use crate::args::{GlobalArgs, ModelsCommand}; +use crate::args::{GlobalArgs, ModelListArgs, ModelTestArgs, ModelsCommand}; use crate::server_client; use crate::user_config; @@ -38,8 +38,13 @@ struct ModelTestOutput { } pub(crate) async fn execute(command: Option, globals: &GlobalArgs) -> Result<()> { - let cli_settings = user_config::load_user_settings_with_globals(globals)?; - let client = match user_config::model_server_target(globals, &cli_settings) { + let command = command.unwrap_or_default(); + let target_args = match &command { + ModelsCommand::List(args) => &args.target, + ModelsCommand::Test(args) => &args.target, + }; + let cli_settings = user_config::load_user_settings_with_storage_dir(target_args.storage_dir())?; + let client = match user_config::model_server_target(target_args, &cli_settings) { Some(target) => { server_client::connect_remote_api_client(&target.server_base_url, target.tls.as_ref())? } @@ -394,19 +399,16 @@ async fn test_models_via_server( #[allow(clippy::print_stdout)] async fn run_models( - command: Option, + command: ModelsCommand, client: fabro_api::Client, json_output: bool, ) -> Result<()> { - let command = command.unwrap_or(ModelsCommand::List { - provider: None, - query: None, - }); - let styles = Styles::detect_stdout(); match command { - ModelsCommand::List { provider, query } => { + ModelsCommand::List(ModelListArgs { + provider, query, .. + }) => { let models = fetch_models_from_server(&client, provider.as_deref(), query.as_deref()).await?; @@ -416,11 +418,12 @@ async fn run_models( print_models_table(&models, &styles); } } - ModelsCommand::Test { + ModelsCommand::Test(ModelTestArgs { provider, model, deep, - } => { + .. + }) => { test_models_via_server( &client, provider.as_deref(), @@ -436,6 +439,12 @@ async fn run_models( Ok(()) } +impl Default for ModelsCommand { + fn default() -> Self { + Self::List(ModelListArgs::default()) + } +} + #[cfg(test)] mod tests { use super::*; diff --git a/lib/crates/fabro-cli/src/commands/pr/close.rs b/lib/crates/fabro-cli/src/commands/pr/close.rs index 7e16b3b77..39d01b3f3 100644 --- a/lib/crates/fabro-cli/src/commands/pr/close.rs +++ b/lib/crates/fabro-cli/src/commands/pr/close.rs @@ -6,14 +6,14 @@ use tracing::info; use crate::args::{GlobalArgs, PrCloseArgs}; use crate::shared::print_json_pretty; -use crate::user_config::load_user_settings_with_globals; +use crate::user_config::load_user_settings_with_storage_dir; pub(super) async fn close_command( args: PrCloseArgs, github_app: Option, globals: &GlobalArgs, ) -> Result<()> { - let cli_settings = load_user_settings_with_globals(globals)?; + let cli_settings = load_user_settings_with_storage_dir(args.storage_dir.as_deref())?; let base = runs_base(&cli_settings.storage_dir()); close_from(&base, args, github_app, globals).await } diff --git a/lib/crates/fabro-cli/src/commands/pr/create.rs b/lib/crates/fabro-cli/src/commands/pr/create.rs index d12cd6fb5..1a0d8b4a1 100644 --- a/lib/crates/fabro-cli/src/commands/pr/create.rs +++ b/lib/crates/fabro-cli/src/commands/pr/create.rs @@ -12,14 +12,14 @@ use crate::args::{GlobalArgs, PrCreateArgs}; use crate::commands::store::rebuild::rebuild_run_store; use crate::server_runs::ServerRunLookup; use crate::shared::print_json_pretty; -use crate::user_config::load_user_settings_with_globals; +use crate::user_config::load_user_settings_with_storage_dir; pub(super) async fn create_command( args: PrCreateArgs, github_app: Option, globals: &GlobalArgs, ) -> Result<()> { - let cli_settings = load_user_settings_with_globals(globals)?; + let cli_settings = load_user_settings_with_storage_dir(args.storage_dir.as_deref())?; let base = runs_base(&cli_settings.storage_dir()); create_from(&base, args, github_app, globals).await } diff --git a/lib/crates/fabro-cli/src/commands/pr/list.rs b/lib/crates/fabro-cli/src/commands/pr/list.rs index 85e3b7789..21cd964ae 100644 --- a/lib/crates/fabro-cli/src/commands/pr/list.rs +++ b/lib/crates/fabro-cli/src/commands/pr/list.rs @@ -11,7 +11,7 @@ use crate::args::{GlobalArgs, PrListArgs}; use crate::server_client; use crate::server_runs::ServerRunLookup; use crate::shared::print_json_pretty; -use crate::user_config::load_user_settings_with_globals; +use crate::user_config::load_user_settings_with_storage_dir; #[derive(Serialize)] struct PrRow { @@ -27,7 +27,7 @@ pub(super) async fn list_command( github_app: Option, globals: &GlobalArgs, ) -> Result<()> { - let cli_settings = load_user_settings_with_globals(globals)?; + let cli_settings = load_user_settings_with_storage_dir(args.storage_dir.as_deref())?; let base = runs_base(&cli_settings.storage_dir()); let lookup = ServerRunLookup::connect(&cli_settings.storage_dir()).await?; list_from( diff --git a/lib/crates/fabro-cli/src/commands/pr/merge.rs b/lib/crates/fabro-cli/src/commands/pr/merge.rs index 4a6de903f..44f821e75 100644 --- a/lib/crates/fabro-cli/src/commands/pr/merge.rs +++ b/lib/crates/fabro-cli/src/commands/pr/merge.rs @@ -7,14 +7,14 @@ use fabro_workflow::run_lookup::runs_base; use crate::args::{GlobalArgs, PrMergeArgs}; use crate::shared::print_json_pretty; -use crate::user_config::load_user_settings_with_globals; +use crate::user_config::load_user_settings_with_storage_dir; pub(super) async fn merge_command( args: PrMergeArgs, github_app: Option, globals: &GlobalArgs, ) -> Result<()> { - let cli_settings = load_user_settings_with_globals(globals)?; + let cli_settings = load_user_settings_with_storage_dir(args.storage_dir.as_deref())?; let base = runs_base(&cli_settings.storage_dir()); merge_from(&base, args, github_app, globals).await } diff --git a/lib/crates/fabro-cli/src/commands/pr/mod.rs b/lib/crates/fabro-cli/src/commands/pr/mod.rs index fce7abd2a..547814f98 100644 --- a/lib/crates/fabro-cli/src/commands/pr/mod.rs +++ b/lib/crates/fabro-cli/src/commands/pr/mod.rs @@ -13,20 +13,35 @@ use fabro_types::PullRequestRecord; use crate::args::{GlobalArgs, PrCommand, PrNamespace}; use crate::server_runs::ServerRunLookup; use crate::shared::github::build_github_app_credentials; -use crate::user_config::load_user_settings_with_globals; +use crate::user_config::load_user_settings_with_storage_dir; pub(crate) async fn dispatch(ns: PrNamespace, globals: &GlobalArgs) -> Result<()> { - let cli_settings = load_user_settings_with_globals(globals)?; - let github_app = build_github_app_credentials(cli_settings.app_id())?; - match ns.command { PrCommand::Create(args) => { + let cli_settings = load_user_settings_with_storage_dir(args.storage_dir.as_deref())?; + let github_app = build_github_app_credentials(cli_settings.app_id())?; Box::pin(create::create_command(args, github_app, globals)).await } - PrCommand::List(args) => list::list_command(args, github_app, globals).await, - PrCommand::View(args) => view::view_command(args, github_app, globals).await, - PrCommand::Merge(args) => merge::merge_command(args, github_app, globals).await, - PrCommand::Close(args) => close::close_command(args, github_app, globals).await, + PrCommand::List(args) => { + let cli_settings = load_user_settings_with_storage_dir(args.storage_dir.as_deref())?; + let github_app = build_github_app_credentials(cli_settings.app_id())?; + list::list_command(args, github_app, globals).await + } + PrCommand::View(args) => { + let cli_settings = load_user_settings_with_storage_dir(args.storage_dir.as_deref())?; + let github_app = build_github_app_credentials(cli_settings.app_id())?; + view::view_command(args, github_app, globals).await + } + PrCommand::Merge(args) => { + let cli_settings = load_user_settings_with_storage_dir(args.storage_dir.as_deref())?; + let github_app = build_github_app_credentials(cli_settings.app_id())?; + merge::merge_command(args, github_app, globals).await + } + PrCommand::Close(args) => { + let cli_settings = load_user_settings_with_storage_dir(args.storage_dir.as_deref())?; + let github_app = build_github_app_credentials(cli_settings.app_id())?; + close::close_command(args, github_app, globals).await + } } } diff --git a/lib/crates/fabro-cli/src/commands/pr/view.rs b/lib/crates/fabro-cli/src/commands/pr/view.rs index 419b0eebb..d481c4dc2 100644 --- a/lib/crates/fabro-cli/src/commands/pr/view.rs +++ b/lib/crates/fabro-cli/src/commands/pr/view.rs @@ -7,14 +7,14 @@ use fabro_workflow::run_lookup::runs_base; use crate::args::{GlobalArgs, PrViewArgs}; use crate::shared::print_json_pretty; -use crate::user_config::load_user_settings_with_globals; +use crate::user_config::load_user_settings_with_storage_dir; pub(super) async fn view_command( args: PrViewArgs, github_app: Option, globals: &GlobalArgs, ) -> Result<()> { - let cli_settings = load_user_settings_with_globals(globals)?; + let cli_settings = load_user_settings_with_storage_dir(args.storage_dir.as_deref())?; let base = runs_base(&cli_settings.storage_dir()); view_from(&base, args, github_app, globals).await } diff --git a/lib/crates/fabro-cli/src/commands/preflight.rs b/lib/crates/fabro-cli/src/commands/preflight.rs index 1b4402e08..bad04f673 100644 --- a/lib/crates/fabro-cli/src/commands/preflight.rs +++ b/lib/crates/fabro-cli/src/commands/preflight.rs @@ -18,12 +18,12 @@ use fabro_workflow::operations::{ValidateInput, WorkflowInput, validate}; use crate::args::{GlobalArgs, PreflightArgs}; use crate::shared::github::build_github_app_credentials; use crate::shared::print_json_pretty; -use crate::user_config::{load_user_settings_with_globals, user_layer_with_globals}; +use crate::user_config::{load_user_settings_with_storage_dir, user_layer_with_storage_dir}; pub(crate) async fn execute(mut args: PreflightArgs, globals: &GlobalArgs) -> anyhow::Result<()> { let styles: &'static Styles = Box::leak(Box::new(Styles::detect_stderr())); - let cli = user_layer_with_globals(globals)?; - let cli_settings: Settings = load_user_settings_with_globals(globals)?; + let cli = user_layer_with_storage_dir(args.storage_dir.as_deref())?; + let cli_settings: Settings = load_user_settings_with_storage_dir(args.storage_dir.as_deref())?; args.verbose = args.verbose || cli_settings.verbose_enabled(); let github_app = build_github_app_credentials(cli_settings.app_id())?; diff --git a/lib/crates/fabro-cli/src/commands/run/command.rs b/lib/crates/fabro-cli/src/commands/run/command.rs index dc97a1223..8bd81a368 100644 --- a/lib/crates/fabro-cli/src/commands/run/command.rs +++ b/lib/crates/fabro-cli/src/commands/run/command.rs @@ -3,12 +3,13 @@ use fabro_util::terminal::Styles; use crate::args::{GlobalArgs, RunArgs}; use crate::shared::print_json_pretty; -use crate::user_config::{self, user_layer_with_globals}; +use crate::user_config::{self, user_layer_with_storage_dir}; pub(crate) async fn execute(mut args: RunArgs, globals: &GlobalArgs) -> Result<()> { let styles: &'static Styles = Box::leak(Box::new(Styles::detect_stderr())); - let cli_settings = user_config::load_user_settings_with_globals(globals)?; - let cli = user_layer_with_globals(globals)?; + let cli_settings = + user_config::load_user_settings_with_storage_dir(args.storage_dir.as_deref())?; + let cli = user_layer_with_storage_dir(args.storage_dir.as_deref())?; args.verbose = args.verbose || cli_settings.verbose_enabled(); let quiet = args.detach; diff --git a/lib/crates/fabro-cli/src/commands/run/cp.rs b/lib/crates/fabro-cli/src/commands/run/cp.rs index fe6db44e1..3ac0a7f01 100644 --- a/lib/crates/fabro-cli/src/commands/run/cp.rs +++ b/lib/crates/fabro-cli/src/commands/run/cp.rs @@ -9,7 +9,7 @@ use tracing::{debug, info}; use crate::args::{CpArgs, GlobalArgs}; use crate::server_runs::ServerRunLookup; use crate::shared::{print_json_pretty, split_run_path}; -use crate::user_config::load_user_settings_with_globals; +use crate::user_config::load_user_settings_with_storage_dir; enum CopyDirection { Download { @@ -26,7 +26,7 @@ enum CopyDirection { pub(crate) async fn cp_command(args: CpArgs, globals: &GlobalArgs) -> Result<()> { let direction = parse_direction(&args.src, &args.dst)?; - let cli_settings = load_user_settings_with_globals(globals)?; + let cli_settings = load_user_settings_with_storage_dir(args.storage_dir.as_deref())?; match direction { CopyDirection::Download { diff --git a/lib/crates/fabro-cli/src/commands/run/diff.rs b/lib/crates/fabro-cli/src/commands/run/diff.rs index acb148259..04d346c83 100644 --- a/lib/crates/fabro-cli/src/commands/run/diff.rs +++ b/lib/crates/fabro-cli/src/commands/run/diff.rs @@ -10,11 +10,11 @@ use crate::args::{DiffArgs, GlobalArgs}; use crate::server_client::RunProjection; use crate::server_runs::ServerRunLookup; use crate::shared::print_json_pretty; -use crate::user_config::load_user_settings_with_globals; +use crate::user_config::load_user_settings_with_storage_dir; pub(crate) async fn run(args: DiffArgs, globals: &GlobalArgs) -> Result<()> { info!(run_id = %args.run, "Showing diff"); - let cli_settings = load_user_settings_with_globals(globals)?; + let cli_settings = load_user_settings_with_storage_dir(args.storage_dir.as_deref())?; let lookup = ServerRunLookup::connect(&cli_settings.storage_dir()).await?; let run = lookup.resolve(&args.run)?; let run_id = run.run_id(); diff --git a/lib/crates/fabro-cli/src/commands/run/fork.rs b/lib/crates/fabro-cli/src/commands/run/fork.rs index 2c9a3023a..6a9bc0f71 100644 --- a/lib/crates/fabro-cli/src/commands/run/fork.rs +++ b/lib/crates/fabro-cli/src/commands/run/fork.rs @@ -9,11 +9,11 @@ use crate::args::{ForkArgs, GlobalArgs}; use crate::commands::store::rebuild::rebuild_run_store; use crate::server_runs::ServerRunLookup; use crate::shared::print_json_pretty; -use crate::user_config::load_user_settings_with_globals; +use crate::user_config::load_user_settings_with_storage_dir; pub(crate) async fn run(args: &ForkArgs, styles: &Styles, globals: &GlobalArgs) -> Result<()> { let repo = Repository::discover(".").context("not in a git repository")?; - let cli_settings = load_user_settings_with_globals(globals)?; + let cli_settings = load_user_settings_with_storage_dir(args.storage_dir.as_deref())?; let lookup = ServerRunLookup::connect(&cli_settings.storage_dir()).await?; let run = lookup.resolve(&args.run_id)?; let run_id = run.run_id(); diff --git a/lib/crates/fabro-cli/src/commands/run/logs.rs b/lib/crates/fabro-cli/src/commands/run/logs.rs index 43b0c045b..c7f7d000b 100644 --- a/lib/crates/fabro-cli/src/commands/run/logs.rs +++ b/lib/crates/fabro-cli/src/commands/run/logs.rs @@ -13,10 +13,10 @@ use tracing::{debug, info}; use crate::args::{GlobalArgs, LogsArgs}; use crate::server_client; use crate::server_runs::ServerRunLookup; -use crate::user_config::load_user_settings_with_globals; +use crate::user_config::load_user_settings_with_storage_dir; pub(crate) async fn run(args: &LogsArgs, styles: &Styles, globals: &GlobalArgs) -> Result<()> { - let cli_settings = load_user_settings_with_globals(globals)?; + let cli_settings = load_user_settings_with_storage_dir(args.storage_dir.as_deref())?; let lookup = ServerRunLookup::connect(&cli_settings.storage_dir()).await?; let run = lookup.resolve(&args.run)?; let client = lookup.client(); diff --git a/lib/crates/fabro-cli/src/commands/run/mod.rs b/lib/crates/fabro-cli/src/commands/run/mod.rs index 817aae37b..9446c32c2 100644 --- a/lib/crates/fabro-cli/src/commands/run/mod.rs +++ b/lib/crates/fabro-cli/src/commands/run/mod.rs @@ -1,10 +1,10 @@ use anyhow::Result; use fabro_util::terminal::Styles; -use crate::args::{GlobalArgs, RunArgs, RunCommands}; +use crate::args::{AttachArgs, GlobalArgs, RunArgs, RunCommands, RunnerArgs, StartArgs}; use crate::server_runs::ServerRunLookup; use crate::shared::print_json_pretty; -use crate::user_config::{load_user_settings_with_globals, user_layer_with_globals}; +use crate::user_config::{load_user_settings_with_storage_dir, user_layer_with_storage_dir}; pub(crate) mod attach; pub(crate) mod command; @@ -39,7 +39,7 @@ pub(crate) async fn dispatch(cmd: RunCommands, globals: &GlobalArgs) -> Result<( RunCommands::Create(mut args) => { apply_json_defaults(&mut args, globals); let styles: &'static Styles = Box::leak(Box::new(Styles::detect_stderr())); - let cli = user_layer_with_globals(globals)?; + let cli = user_layer_with_storage_dir(args.storage_dir.as_deref())?; let (run_id, _run_dir) = Box::pin(create::create_run(&args, cli, styles, true)).await?; if globals.json { print_json_pretty(&serde_json::json!({ "run_id": run_id }))?; @@ -48,8 +48,8 @@ pub(crate) async fn dispatch(cmd: RunCommands, globals: &GlobalArgs) -> Result<( } Ok(()) } - RunCommands::Start { run } => { - let cli_settings = load_user_settings_with_globals(globals)?; + RunCommands::Start(StartArgs { storage_dir, run }) => { + let cli_settings = load_user_settings_with_storage_dir(storage_dir.as_deref())?; let lookup = ServerRunLookup::connect(&cli_settings.storage_dir()).await?; let run_info = lookup.resolve(&run)?; let run_id = run_info.run_id(); @@ -59,9 +59,9 @@ pub(crate) async fn dispatch(cmd: RunCommands, globals: &GlobalArgs) -> Result<( } Ok(()) } - RunCommands::Attach { run } => { + RunCommands::Attach(AttachArgs { storage_dir, run }) => { let styles: &'static Styles = Box::leak(Box::new(Styles::detect_stderr())); - let cli_settings = load_user_settings_with_globals(globals)?; + let cli_settings = load_user_settings_with_storage_dir(storage_dir.as_deref())?; let lookup = ServerRunLookup::connect(&cli_settings.storage_dir()).await?; let run_info = lookup.resolve(&run)?; let run_id = run_info.run_id(); @@ -79,9 +79,11 @@ pub(crate) async fn dispatch(cmd: RunCommands, globals: &GlobalArgs) -> Result<( } Ok(()) } - RunCommands::Runner { run_id, resume } => { - runner::execute(run_id, globals.storage_dir.clone(), resume).await - } + RunCommands::Runner(RunnerArgs { + storage_dir, + run_id, + resume, + }) => runner::execute(run_id, storage_dir.clone_path(), resume).await, RunCommands::Diff(args) => diff::run(args, globals).await, RunCommands::Logs(args) => { let styles = Styles::detect_stdout(); @@ -91,7 +93,8 @@ pub(crate) async fn dispatch(cmd: RunCommands, globals: &GlobalArgs) -> Result<( let styles: &'static Styles = Box::leak(Box::new(Styles::detect_stderr())); #[cfg(feature = "sleep_inhibitor")] let _sleep_guard = { - let cli_settings = load_user_settings_with_globals(globals)?; + let cli_settings = + load_user_settings_with_storage_dir(args.storage_dir.as_deref())?; crate::sleep_inhibitor::guard(cli_settings.prevent_idle_sleep_enabled()) }; resume::resume_command(args, styles, globals).await diff --git a/lib/crates/fabro-cli/src/commands/run/preview.rs b/lib/crates/fabro-cli/src/commands/run/preview.rs index 702198a66..0e7ce1a3f 100644 --- a/lib/crates/fabro-cli/src/commands/run/preview.rs +++ b/lib/crates/fabro-cli/src/commands/run/preview.rs @@ -5,10 +5,10 @@ use tracing::info; use crate::args::{GlobalArgs, PreviewArgs}; use crate::server_runs::ServerRunLookup; use crate::shared::{print_json_pretty, validate_daytona_provider}; -use crate::user_config::load_user_settings_with_globals; +use crate::user_config::load_user_settings_with_storage_dir; pub(crate) async fn run(args: PreviewArgs, globals: &GlobalArgs) -> Result<()> { - let cli_settings = load_user_settings_with_globals(globals)?; + let cli_settings = load_user_settings_with_storage_dir(args.storage_dir.as_deref())?; let lookup = ServerRunLookup::connect(&cli_settings.storage_dir()).await?; let run = lookup.resolve(&args.run)?; let record = lookup diff --git a/lib/crates/fabro-cli/src/commands/run/resume.rs b/lib/crates/fabro-cli/src/commands/run/resume.rs index bc339e833..1990a6e4b 100644 --- a/lib/crates/fabro-cli/src/commands/run/resume.rs +++ b/lib/crates/fabro-cli/src/commands/run/resume.rs @@ -3,7 +3,7 @@ use fabro_util::terminal::Styles; use crate::args::{GlobalArgs, ResumeArgs}; use crate::server_runs::ServerRunLookup; use crate::shared::print_json_pretty; -use crate::user_config::load_user_settings_with_globals; +use crate::user_config::load_user_settings_with_storage_dir; /// Resume an interrupted workflow run. /// @@ -15,7 +15,7 @@ pub(crate) async fn resume_command( styles: &'static Styles, globals: &GlobalArgs, ) -> anyhow::Result<()> { - let cli_settings = load_user_settings_with_globals(globals)?; + let cli_settings = load_user_settings_with_storage_dir(args.storage_dir.as_deref())?; let lookup = ServerRunLookup::connect(&cli_settings.storage_dir()).await?; let run = lookup.resolve(&args.run)?; let run_id = run.run_id(); diff --git a/lib/crates/fabro-cli/src/commands/run/rewind.rs b/lib/crates/fabro-cli/src/commands/run/rewind.rs index 3e4d7d0dc..25719b913 100644 --- a/lib/crates/fabro-cli/src/commands/run/rewind.rs +++ b/lib/crates/fabro-cli/src/commands/run/rewind.rs @@ -18,7 +18,7 @@ use crate::commands::store::rebuild::rebuild_run_store; use crate::server_client::ServerStoreClient; use crate::server_runs::ServerRunLookup; use crate::shared::{color_if, print_json_pretty}; -use crate::user_config::load_user_settings_with_globals; +use crate::user_config::load_user_settings_with_storage_dir; #[derive(Serialize)] pub(crate) struct TimelineEntryJson { @@ -30,7 +30,7 @@ pub(crate) struct TimelineEntryJson { pub(crate) async fn run(args: &RewindArgs, styles: &Styles, globals: &GlobalArgs) -> Result<()> { let repo = Repository::discover(".").context("not in a git repository")?; - let cli_settings = load_user_settings_with_globals(globals)?; + let cli_settings = load_user_settings_with_storage_dir(args.storage_dir.as_deref())?; let lookup = ServerRunLookup::connect(&cli_settings.storage_dir()).await?; let run = lookup.resolve(&args.run_id)?; let run_id = run.run_id(); diff --git a/lib/crates/fabro-cli/src/commands/run/ssh.rs b/lib/crates/fabro-cli/src/commands/run/ssh.rs index 772931f51..ba7114b0a 100644 --- a/lib/crates/fabro-cli/src/commands/run/ssh.rs +++ b/lib/crates/fabro-cli/src/commands/run/ssh.rs @@ -5,14 +5,14 @@ use tracing::info; use crate::args::{GlobalArgs, SshArgs}; use crate::server_runs::ServerRunLookup; use crate::shared::{print_json_pretty, validate_daytona_provider}; -use crate::user_config::load_user_settings_with_globals; +use crate::user_config::load_user_settings_with_storage_dir; pub(crate) async fn run(args: SshArgs, globals: &GlobalArgs) -> Result<()> { if globals.json && !args.print { globals.require_no_json()?; } - let cli_settings = load_user_settings_with_globals(globals)?; + let cli_settings = load_user_settings_with_storage_dir(args.storage_dir.as_deref())?; let lookup = ServerRunLookup::connect(&cli_settings.storage_dir()).await?; let run = lookup.resolve(&args.run)?; let run_id = run.run_id(); diff --git a/lib/crates/fabro-cli/src/commands/run/wait.rs b/lib/crates/fabro-cli/src/commands/run/wait.rs index 7cd327ce4..f1a546a70 100644 --- a/lib/crates/fabro-cli/src/commands/run/wait.rs +++ b/lib/crates/fabro-cli/src/commands/run/wait.rs @@ -10,7 +10,7 @@ use tracing::info; use crate::args::{GlobalArgs, WaitArgs}; use crate::server_runs::ServerRunLookup; use crate::shared::format_duration_ms; -use crate::user_config::load_user_settings_with_globals; +use crate::user_config::load_user_settings_with_storage_dir; #[cfg(test)] const WAIT_STARTUP_GRACE: std::time::Duration = std::time::Duration::from_millis(500); @@ -18,7 +18,7 @@ const WAIT_STARTUP_GRACE: std::time::Duration = std::time::Duration::from_millis const WAIT_STARTUP_GRACE: std::time::Duration = std::time::Duration::from_secs(3); pub(crate) async fn run(args: &WaitArgs, styles: &Styles, globals: &GlobalArgs) -> Result<()> { - let cli_settings = load_user_settings_with_globals(globals)?; + let cli_settings = load_user_settings_with_storage_dir(args.storage_dir.as_deref())?; let lookup = ServerRunLookup::connect(&cli_settings.storage_dir()).await?; let run_info = lookup.resolve(&args.run)?; let client = lookup.client(); diff --git a/lib/crates/fabro-cli/src/commands/runs/inspect.rs b/lib/crates/fabro-cli/src/commands/runs/inspect.rs index c132e1b52..83b6da4fc 100644 --- a/lib/crates/fabro-cli/src/commands/runs/inspect.rs +++ b/lib/crates/fabro-cli/src/commands/runs/inspect.rs @@ -9,7 +9,7 @@ use fabro_workflow::run_status::RunStatus; use crate::args::{GlobalArgs, InspectArgs}; use crate::server_client::RunProjection; use crate::server_runs::ServerRunLookup; -use crate::user_config::load_user_settings_with_globals; +use crate::user_config::load_user_settings_with_storage_dir; #[derive(Debug, Serialize)] pub(crate) struct InspectOutput { @@ -23,8 +23,8 @@ pub(crate) struct InspectOutput { pub sandbox: Option, } -pub(crate) async fn run(args: &InspectArgs, globals: &GlobalArgs) -> Result<()> { - let cli_settings = load_user_settings_with_globals(globals)?; +pub(crate) async fn run(args: &InspectArgs, _globals: &GlobalArgs) -> Result<()> { + let cli_settings = load_user_settings_with_storage_dir(args.storage_dir.as_deref())?; let lookup = ServerRunLookup::connect(&cli_settings.storage_dir()).await?; let run = lookup.resolve(&args.run)?; let run_id = run.run_id(); diff --git a/lib/crates/fabro-cli/src/commands/runs/list.rs b/lib/crates/fabro-cli/src/commands/runs/list.rs index 7e8eb73a6..a4e642b3b 100644 --- a/lib/crates/fabro-cli/src/commands/runs/list.rs +++ b/lib/crates/fabro-cli/src/commands/runs/list.rs @@ -13,7 +13,7 @@ use fabro_workflow::run_status::RunStatus; use crate::args::{GlobalArgs, RunsListArgs}; use crate::server_runs::ServerRunLookup; use crate::shared::{color_if, format_duration_ms, tilde_path}; -use crate::user_config::load_user_settings_with_globals; +use crate::user_config::load_user_settings_with_storage_dir; use super::short_run_id; @@ -23,7 +23,7 @@ pub(crate) async fn list_command( styles: &Styles, globals: &GlobalArgs, ) -> Result<()> { - let cli_settings = load_user_settings_with_globals(globals)?; + let cli_settings = load_user_settings_with_storage_dir(args.storage_dir.as_deref())?; let base = runs_base(&cli_settings.storage_dir()); let lookup = ServerRunLookup::connect(&cli_settings.storage_dir()).await?; let runs = scan_runs_with_summaries(lookup.summaries(), &base)?; diff --git a/lib/crates/fabro-cli/src/commands/runs/rm.rs b/lib/crates/fabro-cli/src/commands/runs/rm.rs index 214c8b0c3..2bac1db31 100644 --- a/lib/crates/fabro-cli/src/commands/runs/rm.rs +++ b/lib/crates/fabro-cli/src/commands/runs/rm.rs @@ -12,12 +12,12 @@ use crate::server_client; use crate::server_client::RunProjection; use crate::server_runs::ServerRunLookup; use crate::shared::print_json_pretty; -use crate::user_config::load_user_settings_with_globals; +use crate::user_config::load_user_settings_with_storage_dir; use super::short_run_id; pub(crate) async fn remove_command(args: &RunsRemoveArgs, globals: &GlobalArgs) -> Result<()> { - let cli_settings = load_user_settings_with_globals(globals)?; + let cli_settings = load_user_settings_with_storage_dir(args.storage_dir.as_deref())?; let lookup = ServerRunLookup::connect(&cli_settings.storage_dir()).await?; remove_from( args, diff --git a/lib/crates/fabro-cli/src/commands/server/mod.rs b/lib/crates/fabro-cli/src/commands/server/mod.rs index 1eb3b2e8d..8c866efea 100644 --- a/lib/crates/fabro-cli/src/commands/server/mod.rs +++ b/lib/crates/fabro-cli/src/commands/server/mod.rs @@ -11,16 +11,20 @@ use fabro_server::bind; use fabro_server::bind::Bind; use fabro_util::terminal::Styles; -use crate::args::{GlobalArgs, ServerCommand}; +use crate::args::{ + GlobalArgs, ServerCommand, ServerServeArgs, ServerStartArgs, ServerStatusArgs, ServerStopArgs, +}; use crate::user_config; -pub(crate) async fn dispatch(command: ServerCommand, globals: &GlobalArgs) -> Result<()> { +pub(crate) async fn dispatch(command: ServerCommand, _globals: &GlobalArgs) -> Result<()> { match command { - ServerCommand::Start { + ServerCommand::Start(ServerStartArgs { + storage_dir, foreground, serve_args, - } => { - let settings = user_config::load_user_settings_with_globals(globals)?; + }) => { + let settings = + user_config::load_user_settings_with_storage_dir(storage_dir.as_deref())?; let storage_dir = settings.storage_dir(); let bind_addr = match serve_args.bind.as_deref() { Some(s) => bind::parse_bind(s)?, @@ -29,27 +33,34 @@ pub(crate) async fn dispatch(command: ServerCommand, globals: &GlobalArgs) -> Re let styles: &'static Styles = Box::leak(Box::new(Styles::detect_stderr())); start::execute(bind_addr, foreground, serve_args, storage_dir, styles).await } - ServerCommand::Stop { timeout } => { - let settings = user_config::load_user_settings_with_globals(globals)?; + ServerCommand::Stop(ServerStopArgs { + storage_dir, + timeout, + }) => { + let settings = + user_config::load_user_settings_with_storage_dir(storage_dir.as_deref())?; let storage_dir = settings.storage_dir(); stop::execute(&storage_dir, Duration::from_secs(timeout)); Ok(()) } - ServerCommand::Status { json } => { - let settings = user_config::load_user_settings_with_globals(globals)?; + ServerCommand::Status(ServerStatusArgs { storage_dir, json }) => { + let settings = + user_config::load_user_settings_with_storage_dir(storage_dir.as_deref())?; let storage_dir = settings.storage_dir(); status::execute(&storage_dir, json) } - ServerCommand::Serve { + ServerCommand::Serve(ServerServeArgs { + storage_dir, record_path, serve_args, - } => { + }) => { let bind_addr = if let Some(s) = serve_args.bind.as_deref() { bind::parse_bind(s)? } else { // __serve should always receive an explicit --bind from the parent, // but fall back to the storage dir default if missing. - let settings = user_config::load_user_settings_with_globals(globals)?; + let settings = + user_config::load_user_settings_with_storage_dir(storage_dir.as_deref())?; Bind::Unix(settings.storage_dir().join("fabro.sock")) }; let styles: &'static Styles = Box::leak(Box::new(Styles::detect_stderr())); @@ -57,7 +68,7 @@ pub(crate) async fn dispatch(command: ServerCommand, globals: &GlobalArgs) -> Re record_path, serve_args, bind_addr, - globals.storage_dir.clone(), + storage_dir.clone_path(), styles, ) .await diff --git a/lib/crates/fabro-cli/src/commands/store/dump.rs b/lib/crates/fabro-cli/src/commands/store/dump.rs index 8f02a67a1..6fde721da 100644 --- a/lib/crates/fabro-cli/src/commands/store/dump.rs +++ b/lib/crates/fabro-cli/src/commands/store/dump.rs @@ -12,10 +12,10 @@ use crate::args::{GlobalArgs, StoreDumpArgs}; use crate::commands::store::rebuild::rebuild_run_store; use crate::server_runs::ServerRunLookup; use crate::shared::{absolute_or_current, print_json_pretty}; -use crate::user_config::load_user_settings_with_globals; +use crate::user_config::load_user_settings_with_storage_dir; pub(crate) async fn dump_command(args: &StoreDumpArgs, globals: &GlobalArgs) -> Result<()> { - let cli_settings = load_user_settings_with_globals(globals)?; + let cli_settings = load_user_settings_with_storage_dir(args.storage_dir.as_deref())?; let lookup = ServerRunLookup::connect(&cli_settings.storage_dir()).await?; let run = lookup.resolve(&args.run)?; let run_id = run.run_id(); diff --git a/lib/crates/fabro-cli/src/commands/system/df.rs b/lib/crates/fabro-cli/src/commands/system/df.rs index 8b5038b46..d377b85f8 100644 --- a/lib/crates/fabro-cli/src/commands/system/df.rs +++ b/lib/crates/fabro-cli/src/commands/system/df.rs @@ -12,7 +12,7 @@ use fabro_workflow::run_status::RunStatus; use crate::args::{DfArgs, GlobalArgs}; use crate::server_runs::ServerRunLookup; use crate::shared::{format_size, print_json_pretty}; -use crate::user_config::load_user_settings_with_globals; +use crate::user_config::load_user_settings_with_storage_dir; #[derive(Serialize)] struct SummaryRow { @@ -45,7 +45,7 @@ struct DfOutput { } pub(super) async fn df_command(args: &DfArgs, globals: &GlobalArgs) -> Result<()> { - let cli_settings = load_user_settings_with_globals(globals)?; + let cli_settings = load_user_settings_with_storage_dir(args.storage_dir.as_deref())?; let data_dir = cli_settings.storage_dir(); let runs_base_dir = runs_base(&data_dir); let logs_base_dir = logs_base(&data_dir); diff --git a/lib/crates/fabro-cli/src/commands/system/prune.rs b/lib/crates/fabro-cli/src/commands/system/prune.rs index df14820ce..75710c3df 100644 --- a/lib/crates/fabro-cli/src/commands/system/prune.rs +++ b/lib/crates/fabro-cli/src/commands/system/prune.rs @@ -12,7 +12,7 @@ use crate::commands::runs::rm::remove_run_with_cleanup; use crate::server_client; use crate::server_runs::ServerRunLookup; use crate::shared::{format_size, print_json_pretty}; -use crate::user_config::load_user_settings_with_globals; +use crate::user_config::load_user_settings_with_storage_dir; #[derive(Serialize)] struct PruneRunRow { @@ -23,7 +23,7 @@ struct PruneRunRow { } pub(super) async fn prune_command(args: &RunsPruneArgs, globals: &GlobalArgs) -> Result<()> { - let cli_settings = load_user_settings_with_globals(globals)?; + let cli_settings = load_user_settings_with_storage_dir(args.storage_dir.as_deref())?; let base = runs_base(&cli_settings.storage_dir()); let lookup = ServerRunLookup::connect(&cli_settings.storage_dir()).await?; prune_from(args, lookup.client(), lookup.summaries(), &base, globals).await diff --git a/lib/crates/fabro-cli/src/main.rs b/lib/crates/fabro-cli/src/main.rs index 965231b80..8264da3eb 100644 --- a/lib/crates/fabro-cli/src/main.rs +++ b/lib/crates/fabro-cli/src/main.rs @@ -108,12 +108,12 @@ async fn main_inner() -> (String, Result<()>) { let (config_log_level, upgrade_check_enabled) = { if let Commands::Server(ServerNamespace { command: - ServerCommand::Start { + ServerCommand::Start(args::ServerStartArgs { serve_args: args, .. - } - | ServerCommand::Serve { + }) + | ServerCommand::Serve(args::ServerServeArgs { serve_args: args, .. - }, + }), }) = command.as_ref() { match load_server_settings(args.config.as_deref()) { @@ -275,7 +275,9 @@ async fn main_inner() -> (String, Result<()>) { #[cfg(test)] mod tests { use super::*; - use args::{ProviderCommand, ProviderNamespace, StoreCommand, StoreNamespace}; + use args::{ + Commands, ModelsCommand, ProviderCommand, ProviderNamespace, StoreCommand, StoreNamespace, + }; use clap::Parser; #[test] @@ -335,7 +337,7 @@ mod tests { } #[test] - fn parse_global_storage_dir_after_subcommand() { + fn parse_run_storage_dir_after_subcommand() { let cli = Cli::try_parse_from([ "fabro", "run", @@ -344,12 +346,12 @@ mod tests { "/tmp/fabro", ]) .expect("should parse"); - assert_eq!( - cli.globals.storage_dir.as_deref(), - Some(std::path::Path::new("/tmp/fabro")) - ); match *cli.command { Commands::RunCmd(RunCommands::Run(args)) => { + assert_eq!( + args.storage_dir.as_deref(), + Some(std::path::Path::new("/tmp/fabro")) + ); assert_eq!( args.workflow.as_deref(), Some(std::path::Path::new("test/simple.fabro")) @@ -360,17 +362,84 @@ mod tests { } #[test] - fn parse_server_url_conflicts_with_storage_dir() { + fn parse_model_list_server_url_after_subcommand() { + let cli = Cli::try_parse_from([ + "fabro", + "model", + "list", + "--server-url", + "http://localhost:3000/api/v1", + ]) + .expect("should parse"); + match *cli.command { + Commands::Model { + command: Some(ModelsCommand::List(args)), + } => assert_eq!( + args.target.server_url(), + Some("http://localhost:3000/api/v1") + ), + _ => panic!("unexpected command variant"), + } + } + + #[test] + fn parse_exec_server_url_after_subcommand() { + let cli = Cli::try_parse_from([ + "fabro", + "exec", + "--server-url", + "http://localhost:3000/api/v1", + "fix the bug", + ]) + .expect("should parse"); + match *cli.command { + Commands::Exec(args) => assert_eq!( + args.server_url.as_deref(), + Some("http://localhost:3000/api/v1") + ), + _ => panic!("unexpected command variant"), + } + } + + #[test] + fn parse_model_server_url_conflicts_with_storage_dir() { let result = Cli::try_parse_from([ "fabro", + "model", + "list", "--storage-dir", "/tmp/fabro", "--server-url", "http://localhost:3000", + ]); + assert!( + result.is_err(), + "should fail with conflicting model target flags" + ); + } + + #[test] + fn parse_global_server_url_before_subcommand_is_rejected() { + let result = Cli::try_parse_from([ + "fabro", + "--server-url", + "http://localhost:3000/api/v1", "model", "list", ]); - assert!(result.is_err(), "should fail with conflicting global flags"); + assert!(result.is_err(), "should reject top-level --server-url"); + } + + #[test] + fn parse_global_storage_dir_before_subcommand_is_rejected() { + let result = Cli::try_parse_from([ + "fabro", + "--storage-dir", + "/tmp/fabro", + "run", + "test/simple.fabro", + ]); + assert!(result.is_err(), "should reject top-level --storage-dir"); } #[test] @@ -392,8 +461,8 @@ mod tests { fn parse_start_command() { let cli = Cli::try_parse_from(["fabro", "start", "ABC123"]).expect("should parse"); match *cli.command { - Commands::RunCmd(RunCommands::Start { run }) => { - assert_eq!(run, "ABC123"); + Commands::RunCmd(RunCommands::Start(args)) => { + assert_eq!(args.run, "ABC123"); } _ => panic!("unexpected command variant"), } @@ -403,8 +472,8 @@ mod tests { fn parse_attach_command() { let cli = Cli::try_parse_from(["fabro", "attach", "ABC123"]).expect("should parse"); match *cli.command { - Commands::RunCmd(RunCommands::Attach { run }) => { - assert_eq!(run, "ABC123"); + Commands::RunCmd(RunCommands::Attach(args)) => { + assert_eq!(args.run, "ABC123"); } _ => panic!("unexpected command variant"), } @@ -436,9 +505,9 @@ mod tests { ]) .expect("should parse"); match *cli.command { - Commands::RunCmd(RunCommands::Runner { run_id, resume }) => { - assert_eq!(run_id, "01ARZ3NDEKTSV4RRFFQ69G5FAV".parse().unwrap()); - assert!(!resume); + Commands::RunCmd(RunCommands::Runner(args)) => { + assert_eq!(args.run_id, "01ARZ3NDEKTSV4RRFFQ69G5FAV".parse().unwrap()); + assert!(!args.resume); } _ => panic!("unexpected command variant"), } @@ -455,9 +524,9 @@ mod tests { ]) .expect("should parse"); match *cli.command { - Commands::RunCmd(RunCommands::Runner { run_id, resume }) => { - assert_eq!(run_id, "01ARZ3NDEKTSV4RRFFQ69G5FAV".parse().unwrap()); - assert!(resume); + Commands::RunCmd(RunCommands::Runner(args)) => { + assert_eq!(args.run_id, "01ARZ3NDEKTSV4RRFFQ69G5FAV".parse().unwrap()); + assert!(args.resume); } _ => panic!("unexpected command variant"), } diff --git a/lib/crates/fabro-cli/src/user_config.rs b/lib/crates/fabro-cli/src/user_config.rs index bee3b7d1c..0b745a618 100644 --- a/lib/crates/fabro-cli/src/user_config.rs +++ b/lib/crates/fabro-cli/src/user_config.rs @@ -1,31 +1,36 @@ +use std::path::Path; + pub(crate) use fabro_config::user::*; use fabro_config::ConfigLayer; use fabro_types::Settings; use tracing::debug; -use crate::args::GlobalArgs; +use crate::args::{ModelTargetArgs, ServerUrlArgs}; pub(crate) fn load_user_settings() -> anyhow::Result { ConfigLayer::user()?.resolve() } -pub(crate) fn user_layer_with_globals(globals: &GlobalArgs) -> anyhow::Result { +pub(crate) fn user_layer_with_storage_dir( + storage_dir: Option<&Path>, +) -> anyhow::Result { let layer = ConfigLayer::user()?; - Ok(apply_global_overrides(layer, globals)) + Ok(apply_storage_dir_override(layer, storage_dir)) } -pub(crate) fn load_user_settings_with_globals(globals: &GlobalArgs) -> anyhow::Result { - user_layer_with_globals(globals)?.resolve() +pub(crate) fn load_user_settings_with_storage_dir( + storage_dir: Option<&Path>, +) -> anyhow::Result { + user_layer_with_storage_dir(storage_dir)?.resolve() } -pub(crate) fn apply_global_overrides(mut layer: ConfigLayer, globals: &GlobalArgs) -> ConfigLayer { - if let Some(dir) = &globals.storage_dir { - layer.storage_dir = Some(dir.clone()); - } - - if let Some(url) = &globals.server_url { - layer.server.get_or_insert_with(Default::default).base_url = Some(url.clone()); +pub(crate) fn apply_storage_dir_override( + mut layer: ConfigLayer, + storage_dir: Option<&Path>, +) -> ConfigLayer { + if let Some(dir) = storage_dir { + layer.storage_dir = Some(dir.to_path_buf()); } layer @@ -47,36 +52,33 @@ fn configured_server_target(settings: &Settings) -> Option { } pub(crate) fn exec_server_target( - globals: &GlobalArgs, + args: &ServerUrlArgs, settings: &Settings, ) -> Option { - let target = globals - .server_url - .as_ref() - .map(|server_base_url| ServerTarget { - server_base_url: server_base_url.clone(), - tls: settings - .server - .as_ref() - .and_then(|server| server.tls.clone()), - }); + let target = args.as_deref().map(|server_base_url| ServerTarget { + server_base_url: server_base_url.to_string(), + tls: settings + .server + .as_ref() + .and_then(|server| server.tls.clone()), + }); debug!(has_target = target.is_some(), "Resolved exec server target"); target } pub(crate) fn model_server_target( - globals: &GlobalArgs, + args: &ModelTargetArgs, settings: &Settings, ) -> Option { - let target = if let Some(server_base_url) = globals.server_url.as_ref() { + let target = if let Some(server_base_url) = args.server_url() { Some(ServerTarget { - server_base_url: server_base_url.clone(), + server_base_url: server_base_url.to_string(), tls: settings .server .as_ref() .and_then(|server| server.tls.clone()), }) - } else if globals.storage_dir.is_some() { + } else if args.storage_dir().is_some() { None } else { configured_server_target(settings) @@ -124,32 +126,32 @@ mod tests { use std::path::PathBuf; use super::*; + use crate::args::{ModelTargetArgs, ServerUrlArgs}; - fn globals() -> GlobalArgs { - GlobalArgs { - json: false, - debug: false, - no_upgrade_check: false, - quiet: false, - verbose: false, - storage_dir: None, - server_url: None, + fn server_url_args(url: Option<&str>) -> ServerUrlArgs { + ServerUrlArgs { + server_url: url.map(str::to_string), + } + } + + fn model_target_args(storage_dir: Option<&str>, server_url: Option<&str>) -> ModelTargetArgs { + ModelTargetArgs { + storage_dir: storage_dir.map(std::path::PathBuf::from), + server_url: server_url.map(str::to_string), } } #[test] fn exec_has_no_server_target_by_default() { let settings = Settings::default(); - assert_eq!(exec_server_target(&globals(), &settings), None); + assert_eq!(exec_server_target(&server_url_args(None), &settings), None); } #[test] fn exec_uses_cli_server_url() { let settings = Settings::default(); - let mut globals = globals(); - globals.server_url = Some("https://cli.example.com".to_string()); assert_eq!( - exec_server_target(&globals, &settings), + exec_server_target(&server_url_args(Some("https://cli.example.com")), &settings), Some(ServerTarget { server_base_url: "https://cli.example.com".to_string(), tls: None, @@ -166,7 +168,7 @@ mod tests { }), ..Settings::default() }; - assert_eq!(exec_server_target(&globals(), &settings), None); + assert_eq!(exec_server_target(&server_url_args(None), &settings), None); } #[test] @@ -179,7 +181,7 @@ mod tests { ..Settings::default() }; assert_eq!( - model_server_target(&globals(), &settings), + model_server_target(&model_target_args(None, None), &settings), Some(ServerTarget { server_base_url: "https://config.example.com".to_string(), tls: None, @@ -196,10 +198,11 @@ mod tests { }), ..Settings::default() }; - let mut globals = globals(); - globals.server_url = Some("https://cli.example.com".to_string()); assert_eq!( - model_server_target(&globals, &settings), + model_server_target( + &model_target_args(None, Some("https://cli.example.com")), + &settings + ), Some(ServerTarget { server_base_url: "https://cli.example.com".to_string(), tls: None, @@ -216,9 +219,10 @@ mod tests { }), ..Settings::default() }; - let mut globals = globals(); - globals.storage_dir = Some(PathBuf::from("/tmp/fabro")); - assert_eq!(model_server_target(&globals, &settings), None); + assert_eq!( + model_server_target(&model_target_args(Some("/tmp/fabro"), None), &settings), + None + ); } #[test] @@ -235,10 +239,8 @@ mod tests { }), ..Settings::default() }; - let mut globals = globals(); - globals.server_url = Some("https://cli.example.com".to_string()); assert_eq!( - exec_server_target(&globals, &settings), + exec_server_target(&server_url_args(Some("https://cli.example.com")), &settings), Some(ServerTarget { server_base_url: "https://cli.example.com".to_string(), tls: Some(tls), diff --git a/lib/crates/fabro-cli/tests/it/cmd/artifact.rs b/lib/crates/fabro-cli/tests/it/cmd/artifact.rs index 108f44e11..dacf1a833 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/artifact.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/artifact.rs @@ -19,14 +19,12 @@ fn help() { help Print this message or the help of the given subcommand(s) Options: - --json Output as JSON [env: FABRO_JSON=] - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] - -h, --help Print help + --json Output as JSON [env: FABRO_JSON=] + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --verbose Enable verbose output [env: FABRO_VERBOSE=] + -h, --help Print help ----- stderr ----- "); } diff --git a/lib/crates/fabro-cli/tests/it/cmd/artifact_cp.rs b/lib/crates/fabro-cli/tests/it/cmd/artifact_cp.rs index 6a810b056..a163f798e 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/artifact_cp.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/artifact_cp.rs @@ -21,15 +21,14 @@ fn help() { Options: --json Output as JSON [env: FABRO_JSON=] - --node Filter to artifacts from a specific node - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --retry Filter to artifacts from a specific retry attempt - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --tree Preserve {node_slug}/retry_{N}/ directory structure - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --node Filter to artifacts from a specific node + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --retry Filter to artifacts from a specific retry attempt + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --tree Preserve {node_slug}/retry_{N}/ directory structure + --verbose Enable verbose output [env: FABRO_VERBOSE=] -h, --help Print help ----- stderr ----- "); diff --git a/lib/crates/fabro-cli/tests/it/cmd/artifact_list.rs b/lib/crates/fabro-cli/tests/it/cmd/artifact_list.rs index 5648dd4cc..4c50e5b53 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/artifact_list.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/artifact_list.rs @@ -20,14 +20,13 @@ fn help() { Options: --json Output as JSON [env: FABRO_JSON=] - --node Filter to artifacts from a specific node + --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --retry Filter to artifacts from a specific retry attempt + --node Filter to artifacts from a specific node --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --retry Filter to artifacts from a specific retry attempt --quiet Suppress non-essential output [env: FABRO_QUIET=] --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] -h, --help Print help ----- stderr ----- "); diff --git a/lib/crates/fabro-cli/tests/it/cmd/attach.rs b/lib/crates/fabro-cli/tests/it/cmd/attach.rs index 7c6cdf365..fcc2e6693 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/attach.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/attach.rs @@ -27,12 +27,11 @@ fn help() { Options: --json Output as JSON [env: FABRO_JSON=] + --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] --quiet Suppress non-essential output [env: FABRO_QUIET=] --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] -h, --help Print help ----- stderr ----- "); @@ -51,7 +50,7 @@ fn attach_requires_run_arg() { error: the following required arguments were not provided: - Usage: fabro attach --no-upgrade-check --storage-dir + Usage: fabro attach --storage-dir --no-upgrade-check For more information, try '--help'. "); diff --git a/lib/crates/fabro-cli/tests/it/cmd/completion.rs b/lib/crates/fabro-cli/tests/it/cmd/completion.rs index 758193c3f..0940c9bb5 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/completion.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/completion.rs @@ -17,14 +17,12 @@ fn help() { Shell to generate completions for [possible values: bash, elvish, fish, powershell, zsh] Options: - --json Output as JSON [env: FABRO_JSON=] - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] - -h, --help Print help + --json Output as JSON [env: FABRO_JSON=] + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --verbose Enable verbose output [env: FABRO_VERBOSE=] + -h, --help Print help ----- stderr ----- "); } diff --git a/lib/crates/fabro-cli/tests/it/cmd/config.rs b/lib/crates/fabro-cli/tests/it/cmd/config.rs index 445196a43..07069eeb5 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/config.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/config.rs @@ -26,12 +26,11 @@ fn help() { Options: --json Output as JSON [env: FABRO_JSON=] + --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] --quiet Suppress non-essential output [env: FABRO_QUIET=] --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] -h, --help Print help ----- stderr ----- "); @@ -577,32 +576,14 @@ shared = "legacy" } #[test] -fn settings_server_url_overrides_cli_defaults() { +fn settings_rejects_server_url_flag() { let context = test_context!(); - let project = setup_settings_fixture(&context); - let user_toml_path = context.home_dir.join(".fabro/user.toml"); - let existing = std::fs::read_to_string(&user_toml_path).unwrap(); - context.write_home( - ".fabro/user.toml", - format!("{existing}\n[server]\nbase_url = \"https://config.example.com\"\n"), - ); - - let output = context + context .command() - .env_remove("FABRO_STORAGE_DIR") - .current_dir(project.path()) .args(["--server-url", "https://cli.example.com", "settings"]) .assert() - .success() - .get_output() - .stdout - .clone(); - - let cfg = parse_settings(&output); - assert_eq!( - cfg.server - .as_ref() - .and_then(|server| server.base_url.as_deref()), - Some("https://cli.example.com") - ); + .failure() + .stderr(predicate::str::contains( + "unexpected argument '--server-url' found", + )); } diff --git a/lib/crates/fabro-cli/tests/it/cmd/create.rs b/lib/crates/fabro-cli/tests/it/cmd/create.rs index 3b07c3cb9..ae52a6017 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/create.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/create.rs @@ -24,18 +24,17 @@ fn help() { Path to a .fabro workflow file or .toml task config Options: - --dry-run Execute with simulated LLM backend --json Output as JSON [env: FABRO_JSON=] - --auto-approve Auto-approve all human gates + --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --goal Override the workflow goal (exposed as $goal in prompts) + --dry-run Execute with simulated LLM backend + --auto-approve Auto-approve all human gates --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --goal-file Read the workflow goal from a file + --goal Override the workflow goal (exposed as $goal in prompts) --quiet Suppress non-essential output [env: FABRO_QUIET=] + --goal-file Read the workflow goal from a file --model Override default LLM model --provider Override default LLM provider - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] -v, --verbose Enable verbose output --sandbox Sandbox for agent tools [possible values: local, docker, daytona] --label Attach a label to this run (repeatable, format: KEY=VALUE) diff --git a/lib/crates/fabro-cli/tests/it/cmd/diff.rs b/lib/crates/fabro-cli/tests/it/cmd/diff.rs index 5cd808dff..2775a33b0 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/diff.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/diff.rs @@ -20,15 +20,14 @@ fn help() { Options: --json Output as JSON [env: FABRO_JSON=] - --node Show diff for a specific node - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --stat Show diffstat instead of full patch (live diffs only) - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --shortstat Show only files-changed/insertions/deletions summary (live diffs only) - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --node Show diff for a specific node + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --stat Show diffstat instead of full patch (live diffs only) + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --shortstat Show only files-changed/insertions/deletions summary (live diffs only) + --verbose Enable verbose output [env: FABRO_VERBOSE=] -h, --help Print help ----- stderr ----- "); diff --git a/lib/crates/fabro-cli/tests/it/cmd/discord.rs b/lib/crates/fabro-cli/tests/it/cmd/discord.rs index 349b519bf..b2315cf6a 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/discord.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/discord.rs @@ -14,14 +14,12 @@ fn help() { Usage: fabro discord [OPTIONS] Options: - --json Output as JSON [env: FABRO_JSON=] - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] - -h, --help Print help + --json Output as JSON [env: FABRO_JSON=] + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --verbose Enable verbose output [env: FABRO_VERBOSE=] + -h, --help Print help ----- stderr ----- "); } diff --git a/lib/crates/fabro-cli/tests/it/cmd/docs.rs b/lib/crates/fabro-cli/tests/it/cmd/docs.rs index 51f042a19..b21695665 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/docs.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/docs.rs @@ -14,14 +14,12 @@ fn help() { Usage: fabro docs [OPTIONS] Options: - --json Output as JSON [env: FABRO_JSON=] - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] - -h, --help Print help + --json Output as JSON [env: FABRO_JSON=] + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --verbose Enable verbose output [env: FABRO_VERBOSE=] + -h, --help Print help ----- stderr ----- "); } diff --git a/lib/crates/fabro-cli/tests/it/cmd/doctor.rs b/lib/crates/fabro-cli/tests/it/cmd/doctor.rs index 1855ed683..a1158017c 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/doctor.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/doctor.rs @@ -25,15 +25,13 @@ fn help() { Usage: fabro doctor [OPTIONS] Options: - --json Output as JSON [env: FABRO_JSON=] - -v, --verbose Show detailed information for each check - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --dry-run Skip live service probes (LLM, sandbox, API, web, Brave Search) - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] - -h, --help Print help + --json Output as JSON [env: FABRO_JSON=] + -v, --verbose Show detailed information for each check + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --dry-run Skip live service probes (LLM, sandbox, API, web, Brave Search) + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --quiet Suppress non-essential output [env: FABRO_QUIET=] + -h, --help Print help ----- stderr ----- "); } diff --git a/lib/crates/fabro-cli/tests/it/cmd/exec.rs b/lib/crates/fabro-cli/tests/it/cmd/exec.rs index d85af8968..129ed55ab 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/exec.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/exec.rs @@ -29,16 +29,15 @@ fn help() { Options: --json Output as JSON [env: FABRO_JSON=] + --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] --provider LLM provider (anthropic, openai, gemini, kimi, zai, minimax, inception) --model Model name (defaults per provider) --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] --permissions Permission level for tool execution [possible values: read-only, read-write, full] - --auto-approve Skip interactive prompts; deny tools outside permission level --quiet Suppress non-essential output [env: FABRO_QUIET=] + --auto-approve Skip interactive prompts; deny tools outside permission level --debug Print LLM request/response debug info to stderr - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] --verbose Print full LLM request/response JSON to stderr - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] --skills-dir Directory containing skill files (overrides default discovery) --output-format Output format (text for human-readable, json for NDJSON event stream) [possible values: text, json] -h, --help Print help @@ -74,7 +73,7 @@ fn no_prompt() { error: the following required arguments were not provided: - Usage: fabro exec --no-upgrade-check --storage-dir + Usage: fabro exec --no-upgrade-check For more information, try '--help'. "); diff --git a/lib/crates/fabro-cli/tests/it/cmd/fabro.rs b/lib/crates/fabro-cli/tests/it/cmd/fabro.rs index 3a8834c89..c3fb02d40 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/fabro.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/fabro.rs @@ -47,15 +47,13 @@ fn help() { help Print this message or the help of the given subcommand(s) Options: - --json Output as JSON [env: FABRO_JSON=] - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] - -h, --help Print help - -V, --version Print version + --json Output as JSON [env: FABRO_JSON=] + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --verbose Enable verbose output [env: FABRO_VERBOSE=] + -h, --help Print help + -V, --version Print version ----- stderr ----- "); } diff --git a/lib/crates/fabro-cli/tests/it/cmd/fork.rs b/lib/crates/fabro-cli/tests/it/cmd/fork.rs index 168e78991..3a8f44c54 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/fork.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/fork.rs @@ -26,14 +26,13 @@ fn help() { Options: --json Output as JSON [env: FABRO_JSON=] - --list Show the checkpoint timeline instead of forking + --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --list Show the checkpoint timeline instead of forking --no-push Skip pushing new branches to the remote --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] --quiet Suppress non-essential output [env: FABRO_QUIET=] --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] -h, --help Print help ----- stderr ----- "); diff --git a/lib/crates/fabro-cli/tests/it/cmd/graph.rs b/lib/crates/fabro-cli/tests/it/cmd/graph.rs index 092450182..eced85a3c 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/graph.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/graph.rs @@ -61,16 +61,6 @@ fn help() { [env: FABRO_VERBOSE=] - --storage-dir - Local storage directory (default: ~/.fabro) - - [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - - --server-url - Fabro API server URL (overrides server.base_url from user.toml when supported) - - [env: FABRO_SERVER_URL=] - -h, --help Print help (see a summary with '-h') ----- stderr ----- diff --git a/lib/crates/fabro-cli/tests/it/cmd/inspect.rs b/lib/crates/fabro-cli/tests/it/cmd/inspect.rs index c810e4e00..fe149195c 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/inspect.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/inspect.rs @@ -25,12 +25,11 @@ fn help() { Options: --json Output as JSON [env: FABRO_JSON=] + --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] --quiet Suppress non-essential output [env: FABRO_QUIET=] --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] -h, --help Print help ----- stderr ----- "); diff --git a/lib/crates/fabro-cli/tests/it/cmd/install.rs b/lib/crates/fabro-cli/tests/it/cmd/install.rs index 1fecd1416..7ea68f5b3 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/install.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/install.rs @@ -14,15 +14,13 @@ fn help() { Usage: fabro install [OPTIONS] Options: - --json Output as JSON [env: FABRO_JSON=] - --web-url Base URL for the web UI (used for OAuth callback URLs) [default: http://localhost:3000] - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] - -h, --help Print help + --json Output as JSON [env: FABRO_JSON=] + --web-url Base URL for the web UI (used for OAuth callback URLs) [default: http://localhost:3000] + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --verbose Enable verbose output [env: FABRO_VERBOSE=] + -h, --help Print help ----- stderr ----- "); } diff --git a/lib/crates/fabro-cli/tests/it/cmd/logs.rs b/lib/crates/fabro-cli/tests/it/cmd/logs.rs index 101de1f8b..77b6bfac3 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/logs.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/logs.rs @@ -60,17 +60,16 @@ fn help() { Run ID prefix or workflow name (most recent run) Options: - -f, --follow Follow log output --json Output as JSON [env: FABRO_JSON=] + --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + -f, --follow Follow log output + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] --since Logs since timestamp or relative (e.g. "42m", "2h", "2026-01-02T13:00:00Z") -n, --tail Lines from end (default: all) - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - -p, --pretty Formatted colored output with rendered assistant text --quiet Suppress non-essential output [env: FABRO_QUIET=] + -p, --pretty Formatted colored output with rendered assistant text --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] -h, --help Print help ----- stderr ----- "#); diff --git a/lib/crates/fabro-cli/tests/it/cmd/model.rs b/lib/crates/fabro-cli/tests/it/cmd/model.rs index 64f694977..6598ce0f6 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/model.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/model.rs @@ -20,14 +20,12 @@ fn help() { help Print this message or the help of the given subcommand(s) Options: - --json Output as JSON [env: FABRO_JSON=] - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] - -h, --help Print help + --json Output as JSON [env: FABRO_JSON=] + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --verbose Enable verbose output [env: FABRO_VERBOSE=] + -h, --help Print help ----- stderr ----- "); } diff --git a/lib/crates/fabro-cli/tests/it/cmd/model_list.rs b/lib/crates/fabro-cli/tests/it/cmd/model_list.rs index ad6aa05df..9e6190b2b 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/model_list.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/model_list.rs @@ -15,14 +15,14 @@ fn help() { Options: --json Output as JSON [env: FABRO_JSON=] - -p, --provider Filter by provider + --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - -q, --query Search for models matching this string + --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + -p, --provider Filter by provider + -q, --query Search for models matching this string --quiet Suppress non-essential output [env: FABRO_QUIET=] --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] -h, --help Print help ----- stderr ----- "); diff --git a/lib/crates/fabro-cli/tests/it/cmd/model_test.rs b/lib/crates/fabro-cli/tests/it/cmd/model_test.rs index 7e9b898c3..6b0861c4c 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/model_test.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/model_test.rs @@ -15,15 +15,15 @@ fn help() { Options: --json Output as JSON [env: FABRO_JSON=] - -p, --provider Filter by provider - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - -m, --model Test a specific model - --deep Run a multi-turn tool-use test (catches reasoning round-trip bugs) - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + -p, --provider Filter by provider + -m, --model Test a specific model + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --deep Run a multi-turn tool-use test (catches reasoning round-trip bugs) + --verbose Enable verbose output [env: FABRO_VERBOSE=] -h, --help Print help ----- stderr ----- "); diff --git a/lib/crates/fabro-cli/tests/it/cmd/parse.rs b/lib/crates/fabro-cli/tests/it/cmd/parse.rs index 3c40dbe6f..7cc0fdaa8 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/parse.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/parse.rs @@ -17,14 +17,12 @@ fn help() { Path to the .fabro workflow file Options: - --json Output as JSON [env: FABRO_JSON=] - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] - -h, --help Print help + --json Output as JSON [env: FABRO_JSON=] + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --verbose Enable verbose output [env: FABRO_VERBOSE=] + -h, --help Print help ----- stderr ----- "); } diff --git a/lib/crates/fabro-cli/tests/it/cmd/pr.rs b/lib/crates/fabro-cli/tests/it/cmd/pr.rs index fa5908036..5721a8ca7 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/pr.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/pr.rs @@ -22,14 +22,12 @@ fn help() { help Print this message or the help of the given subcommand(s) Options: - --json Output as JSON [env: FABRO_JSON=] - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] - -h, --help Print help + --json Output as JSON [env: FABRO_JSON=] + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --verbose Enable verbose output [env: FABRO_VERBOSE=] + -h, --help Print help ----- stderr ----- "); } diff --git a/lib/crates/fabro-cli/tests/it/cmd/pr_close.rs b/lib/crates/fabro-cli/tests/it/cmd/pr_close.rs index 4aada8c16..a0a5ff24c 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/pr_close.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/pr_close.rs @@ -18,12 +18,11 @@ fn help() { Options: --json Output as JSON [env: FABRO_JSON=] + --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] --quiet Suppress non-essential output [env: FABRO_QUIET=] --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] -h, --help Print help ----- stderr ----- "); diff --git a/lib/crates/fabro-cli/tests/it/cmd/pr_create.rs b/lib/crates/fabro-cli/tests/it/cmd/pr_create.rs index bd035ce18..8fec4e0e3 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/pr_create.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/pr_create.rs @@ -20,13 +20,12 @@ fn help() { Options: --json Output as JSON [env: FABRO_JSON=] - --model LLM model for generating PR description + --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --model LLM model for generating PR description --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] --quiet Suppress non-essential output [env: FABRO_QUIET=] --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] -h, --help Print help ----- stderr ----- "); diff --git a/lib/crates/fabro-cli/tests/it/cmd/pr_list.rs b/lib/crates/fabro-cli/tests/it/cmd/pr_list.rs index cc9829531..fa031a6ca 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/pr_list.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/pr_list.rs @@ -14,14 +14,13 @@ fn help() { Usage: fabro pr list [OPTIONS] Options: - --all Show all PRs (including closed/merged), not just open --json Output as JSON [env: FABRO_JSON=] + --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] + --all Show all PRs (including closed/merged), not just open --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] --quiet Suppress non-essential output [env: FABRO_QUIET=] --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] -h, --help Print help ----- stderr ----- "); diff --git a/lib/crates/fabro-cli/tests/it/cmd/pr_merge.rs b/lib/crates/fabro-cli/tests/it/cmd/pr_merge.rs index 000e84b35..7f5a5ffc5 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/pr_merge.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/pr_merge.rs @@ -18,13 +18,12 @@ fn help() { Options: --json Output as JSON [env: FABRO_JSON=] - --method Merge method: merge, squash, or rebase [default: squash] + --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --method Merge method: merge, squash, or rebase [default: squash] --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] --quiet Suppress non-essential output [env: FABRO_QUIET=] --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] -h, --help Print help ----- stderr ----- "); diff --git a/lib/crates/fabro-cli/tests/it/cmd/pr_view.rs b/lib/crates/fabro-cli/tests/it/cmd/pr_view.rs index 7b88c09f9..e8bee7e48 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/pr_view.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/pr_view.rs @@ -24,12 +24,11 @@ fn help() { Options: --json Output as JSON [env: FABRO_JSON=] + --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] --quiet Suppress non-essential output [env: FABRO_QUIET=] --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] -h, --help Print help ----- stderr ----- "); diff --git a/lib/crates/fabro-cli/tests/it/cmd/preflight.rs b/lib/crates/fabro-cli/tests/it/cmd/preflight.rs index 85a8b4b60..a4d8f85d7 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/preflight.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/preflight.rs @@ -20,18 +20,17 @@ fn help() { Path to a .fabro workflow file or .toml task config Options: - --goal Override the workflow goal (exposed as $goal in prompts) --json Output as JSON [env: FABRO_JSON=] + --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --goal Override the workflow goal (exposed as $goal in prompts) --goal-file Read the workflow goal from a file - --model Override default LLM model --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --provider Override default LLM provider + --model Override default LLM model --quiet Suppress non-essential output [env: FABRO_QUIET=] + --provider Override default LLM provider -v, --verbose Enable verbose output --sandbox Sandbox for agent tools [possible values: local, docker, daytona] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] -h, --help Print help ----- stderr ----- "); diff --git a/lib/crates/fabro-cli/tests/it/cmd/provider.rs b/lib/crates/fabro-cli/tests/it/cmd/provider.rs index 552e4206e..725f9f7f6 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/provider.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/provider.rs @@ -18,14 +18,12 @@ fn help() { help Print this message or the help of the given subcommand(s) Options: - --json Output as JSON [env: FABRO_JSON=] - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] - -h, --help Print help + --json Output as JSON [env: FABRO_JSON=] + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --verbose Enable verbose output [env: FABRO_VERBOSE=] + -h, --help Print help ----- stderr ----- "); } diff --git a/lib/crates/fabro-cli/tests/it/cmd/provider_login.rs b/lib/crates/fabro-cli/tests/it/cmd/provider_login.rs index 75aef5c53..ab1195951 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/provider_login.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/provider_login.rs @@ -14,15 +14,13 @@ fn help() { Usage: fabro provider login [OPTIONS] --provider Options: - --json Output as JSON [env: FABRO_JSON=] - --provider LLM provider to authenticate with - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] - -h, --help Print help + --json Output as JSON [env: FABRO_JSON=] + --provider LLM provider to authenticate with + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --verbose Enable verbose output [env: FABRO_VERBOSE=] + -h, --help Print help ----- stderr ----- "); } diff --git a/lib/crates/fabro-cli/tests/it/cmd/ps.rs b/lib/crates/fabro-cli/tests/it/cmd/ps.rs index b13d846a2..d9d343277 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/ps.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/ps.rs @@ -17,18 +17,17 @@ fn help() { Usage: fabro ps [OPTIONS] Options: - --before Only include runs started before this date (YYYY-MM-DD prefix match) --json Output as JSON [env: FABRO_JSON=] + --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] + --before Only include runs started before this date (YYYY-MM-DD prefix match) --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] --workflow Filter by workflow name (substring match) --label Filter by label (KEY=VALUE, repeatable, AND semantics) - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] --orphans Include orphan directories (no run.json) - -a, --all Show all runs, not just running (like docker ps -a) --verbose Enable verbose output [env: FABRO_VERBOSE=] + -a, --all Show all runs, not just running (like docker ps -a) -q, --quiet Only display run IDs - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] -h, --help Print help ----- stderr ----- "); diff --git a/lib/crates/fabro-cli/tests/it/cmd/repo.rs b/lib/crates/fabro-cli/tests/it/cmd/repo.rs index 619cbfb7b..4ad9f8a87 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/repo.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/repo.rs @@ -26,14 +26,12 @@ fn help() { help Print this message or the help of the given subcommand(s) Options: - --json Output as JSON [env: FABRO_JSON=] - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] - -h, --help Print help + --json Output as JSON [env: FABRO_JSON=] + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --verbose Enable verbose output [env: FABRO_VERBOSE=] + -h, --help Print help ----- stderr ----- "); } @@ -107,14 +105,12 @@ fn test_repo_init_help_does_not_show_skill() { Usage: fabro repo init [OPTIONS] Options: - --json Output as JSON [env: FABRO_JSON=] - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] - -h, --help Print help + --json Output as JSON [env: FABRO_JSON=] + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --verbose Enable verbose output [env: FABRO_VERBOSE=] + -h, --help Print help ----- stderr ----- "); } diff --git a/lib/crates/fabro-cli/tests/it/cmd/repo_deinit.rs b/lib/crates/fabro-cli/tests/it/cmd/repo_deinit.rs index 7489e4f01..586a29e66 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/repo_deinit.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/repo_deinit.rs @@ -14,14 +14,12 @@ fn help() { Usage: fabro repo deinit [OPTIONS] Options: - --json Output as JSON [env: FABRO_JSON=] - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] - -h, --help Print help + --json Output as JSON [env: FABRO_JSON=] + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --verbose Enable verbose output [env: FABRO_VERBOSE=] + -h, --help Print help ----- stderr ----- "); } diff --git a/lib/crates/fabro-cli/tests/it/cmd/repo_init.rs b/lib/crates/fabro-cli/tests/it/cmd/repo_init.rs index 49f5edaef..657f8393e 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/repo_init.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/repo_init.rs @@ -16,14 +16,12 @@ fn help() { Usage: fabro repo init [OPTIONS] Options: - --json Output as JSON [env: FABRO_JSON=] - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] - -h, --help Print help + --json Output as JSON [env: FABRO_JSON=] + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --verbose Enable verbose output [env: FABRO_VERBOSE=] + -h, --help Print help ----- stderr ----- "); } diff --git a/lib/crates/fabro-cli/tests/it/cmd/resume.rs b/lib/crates/fabro-cli/tests/it/cmd/resume.rs index 7fc78b6ec..01a5d7969 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/resume.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/resume.rs @@ -21,14 +21,13 @@ fn help() { Run ID or unambiguous prefix Options: - -d, --detach Run in the background and print the run ID --json Output as JSON [env: FABRO_JSON=] + --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] + -d, --detach Run in the background and print the run ID --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] --quiet Suppress non-essential output [env: FABRO_QUIET=] --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] -h, --help Print help ----- stderr ----- "); @@ -47,7 +46,7 @@ fn resume_requires_run_arg() { error: the following required arguments were not provided: - Usage: fabro resume --no-upgrade-check --storage-dir + Usage: fabro resume --storage-dir --no-upgrade-check For more information, try '--help'. "); diff --git a/lib/crates/fabro-cli/tests/it/cmd/rewind.rs b/lib/crates/fabro-cli/tests/it/cmd/rewind.rs index 839f03792..c0fce603c 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/rewind.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/rewind.rs @@ -26,14 +26,13 @@ fn help() { Options: --json Output as JSON [env: FABRO_JSON=] - --list Show the checkpoint timeline instead of rewinding + --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --list Show the checkpoint timeline instead of rewinding --no-push Skip force-pushing rewound refs to the remote --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] --quiet Suppress non-essential output [env: FABRO_QUIET=] --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] -h, --help Print help ----- stderr ----- "); diff --git a/lib/crates/fabro-cli/tests/it/cmd/rm.rs b/lib/crates/fabro-cli/tests/it/cmd/rm.rs index 06eccaa92..089b799ce 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/rm.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/rm.rs @@ -22,14 +22,13 @@ fn help() { ... Run IDs or workflow names to remove Options: - -f, --force Force removal of active runs --json Output as JSON [env: FABRO_JSON=] + --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + -f, --force Force removal of active runs --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] --quiet Suppress non-essential output [env: FABRO_QUIET=] --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] -h, --help Print help ----- stderr ----- "); diff --git a/lib/crates/fabro-cli/tests/it/cmd/run.rs b/lib/crates/fabro-cli/tests/it/cmd/run.rs index 4ecc150f3..c19d451b0 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/run.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/run.rs @@ -27,18 +27,17 @@ fn help() { Path to a .fabro workflow file or .toml task config Options: - --dry-run Execute with simulated LLM backend --json Output as JSON [env: FABRO_JSON=] - --auto-approve Auto-approve all human gates + --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --goal Override the workflow goal (exposed as $goal in prompts) + --dry-run Execute with simulated LLM backend + --auto-approve Auto-approve all human gates --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --goal-file Read the workflow goal from a file + --goal Override the workflow goal (exposed as $goal in prompts) --quiet Suppress non-essential output [env: FABRO_QUIET=] + --goal-file Read the workflow goal from a file --model Override default LLM model --provider Override default LLM provider - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] -v, --verbose Enable verbose output --sandbox Sandbox for agent tools [possible values: local, docker, daytona] --label Attach a label to this run (repeatable, format: KEY=VALUE) diff --git a/lib/crates/fabro-cli/tests/it/cmd/runner.rs b/lib/crates/fabro-cli/tests/it/cmd/runner.rs index fa5b26b66..fac8dd8c5 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/runner.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/runner.rs @@ -20,14 +20,13 @@ fn help() { Options: --json Output as JSON [env: FABRO_JSON=] - --run-id Run ID + --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --resume Resume from checkpoint instead of fresh start + --run-id Run ID --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --resume Resume from checkpoint instead of fresh start --quiet Suppress non-essential output [env: FABRO_QUIET=] --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] -h, --help Print help ----- stderr ----- "); diff --git a/lib/crates/fabro-cli/tests/it/cmd/sandbox_cp.rs b/lib/crates/fabro-cli/tests/it/cmd/sandbox_cp.rs index 4e12ee813..af4446ae5 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/sandbox_cp.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/sandbox_cp.rs @@ -21,13 +21,12 @@ fn help() { Options: --json Output as JSON [env: FABRO_JSON=] - -r, --recursive Recurse into directories + --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + -r, --recursive Recurse into directories --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] --quiet Suppress non-essential output [env: FABRO_QUIET=] --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] -h, --help Print help ----- stderr ----- "); diff --git a/lib/crates/fabro-cli/tests/it/cmd/sandbox_preview.rs b/lib/crates/fabro-cli/tests/it/cmd/sandbox_preview.rs index dc40b8be8..c56e9548e 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/sandbox_preview.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/sandbox_preview.rs @@ -21,15 +21,14 @@ fn help() { Options: --json Output as JSON [env: FABRO_JSON=] - --signed Generate a signed URL (embeds auth token, no headers needed) + --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --ttl Signed URL expiry in seconds (default 3600, requires --signed) [default: 3600] + --signed Generate a signed URL (embeds auth token, no headers needed) --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --ttl Signed URL expiry in seconds (default 3600, requires --signed) [default: 3600] --open Open URL in browser (implies --signed) --quiet Suppress non-essential output [env: FABRO_QUIET=] --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] -h, --help Print help ----- stderr ----- "); diff --git a/lib/crates/fabro-cli/tests/it/cmd/sandbox_ssh.rs b/lib/crates/fabro-cli/tests/it/cmd/sandbox_ssh.rs index 4b6c1b90a..bf8890bc4 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/sandbox_ssh.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/sandbox_ssh.rs @@ -20,14 +20,13 @@ fn help() { Options: --json Output as JSON [env: FABRO_JSON=] - --ttl SSH access expiry in minutes (default 60) [default: 60] + --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --print Print the SSH command instead of connecting + --ttl SSH access expiry in minutes (default 60) [default: 60] --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --print Print the SSH command instead of connecting --quiet Suppress non-essential output [env: FABRO_QUIET=] --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] -h, --help Print help ----- stderr ----- "); diff --git a/lib/crates/fabro-cli/tests/it/cmd/secret.rs b/lib/crates/fabro-cli/tests/it/cmd/secret.rs index e02216e25..cb2f5b9fe 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/secret.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/secret.rs @@ -23,14 +23,12 @@ fn help() { help Print this message or the help of the given subcommand(s) Options: - --json Output as JSON [env: FABRO_JSON=] - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] - -h, --help Print help + --json Output as JSON [env: FABRO_JSON=] + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --verbose Enable verbose output [env: FABRO_VERBOSE=] + -h, --help Print help ----- stderr ----- "); } diff --git a/lib/crates/fabro-cli/tests/it/cmd/secret_get.rs b/lib/crates/fabro-cli/tests/it/cmd/secret_get.rs index 38fe583f4..8c6b3cd6a 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/secret_get.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/secret_get.rs @@ -17,14 +17,12 @@ fn help() { Name of the secret Options: - --json Output as JSON [env: FABRO_JSON=] - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] - -h, --help Print help + --json Output as JSON [env: FABRO_JSON=] + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --verbose Enable verbose output [env: FABRO_VERBOSE=] + -h, --help Print help ----- stderr ----- "); } diff --git a/lib/crates/fabro-cli/tests/it/cmd/secret_list.rs b/lib/crates/fabro-cli/tests/it/cmd/secret_list.rs index 3561ff674..2c7403790 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/secret_list.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/secret_list.rs @@ -15,15 +15,13 @@ fn help() { Usage: fabro secret list [OPTIONS] Options: - --json Output as JSON [env: FABRO_JSON=] - --show-values Show values alongside keys - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] - -h, --help Print help + --json Output as JSON [env: FABRO_JSON=] + --show-values Show values alongside keys + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --verbose Enable verbose output [env: FABRO_VERBOSE=] + -h, --help Print help ----- stderr ----- "); } diff --git a/lib/crates/fabro-cli/tests/it/cmd/secret_rm.rs b/lib/crates/fabro-cli/tests/it/cmd/secret_rm.rs index 8e798c64e..cdfc307dc 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/secret_rm.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/secret_rm.rs @@ -17,14 +17,12 @@ fn help() { Name of the secret to remove Options: - --json Output as JSON [env: FABRO_JSON=] - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] - -h, --help Print help + --json Output as JSON [env: FABRO_JSON=] + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --verbose Enable verbose output [env: FABRO_VERBOSE=] + -h, --help Print help ----- stderr ----- "); } diff --git a/lib/crates/fabro-cli/tests/it/cmd/secret_set.rs b/lib/crates/fabro-cli/tests/it/cmd/secret_set.rs index fb33f09ff..3d1a49c6a 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/secret_set.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/secret_set.rs @@ -18,14 +18,12 @@ fn help() { Value to store Options: - --json Output as JSON [env: FABRO_JSON=] - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] - -h, --help Print help + --json Output as JSON [env: FABRO_JSON=] + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --verbose Enable verbose output [env: FABRO_VERBOSE=] + -h, --help Print help ----- stderr ----- "); } diff --git a/lib/crates/fabro-cli/tests/it/cmd/send_analytics.rs b/lib/crates/fabro-cli/tests/it/cmd/send_analytics.rs index c4ce5160c..e49d27aec 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/send_analytics.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/send_analytics.rs @@ -17,14 +17,12 @@ fn help() { Path to the JSON event file Options: - --json Output as JSON [env: FABRO_JSON=] - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] - -h, --help Print help + --json Output as JSON [env: FABRO_JSON=] + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --verbose Enable verbose output [env: FABRO_VERBOSE=] + -h, --help Print help ----- stderr ----- "); } diff --git a/lib/crates/fabro-cli/tests/it/cmd/send_panic.rs b/lib/crates/fabro-cli/tests/it/cmd/send_panic.rs index cda1725ad..7d9cc3a69 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/send_panic.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/send_panic.rs @@ -17,14 +17,12 @@ fn help() { Path to the JSON event file Options: - --json Output as JSON [env: FABRO_JSON=] - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] - -h, --help Print help + --json Output as JSON [env: FABRO_JSON=] + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --verbose Enable verbose output [env: FABRO_VERBOSE=] + -h, --help Print help ----- stderr ----- "); } diff --git a/lib/crates/fabro-cli/tests/it/cmd/server_start.rs b/lib/crates/fabro-cli/tests/it/cmd/server_start.rs index 20ffa3a91..5614e4581 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/server_start.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/server_start.rs @@ -23,34 +23,32 @@ fn help() { Usage: fabro server start [OPTIONS] Options: - --foreground - Run in the foreground instead of daemonizing --json Output as JSON [env: FABRO_JSON=] - --bind - Address to bind to (host:port for TCP, or path containing / for Unix socket) - --debug - Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --model - Override default LLM model - --no-upgrade-check - Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --provider - Override default LLM provider - --quiet - Suppress non-essential output [env: FABRO_QUIET=] - --dry-run - Execute with simulated LLM backend - --verbose - Enable verbose output [env: FABRO_VERBOSE=] - --sandbox - Sandbox for agent tools --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] + --debug + Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --foreground + Run in the foreground instead of daemonizing + --bind + Address to bind to (host:port for TCP, or path containing / for Unix socket) + --no-upgrade-check + Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --model + Override default LLM model + --quiet + Suppress non-essential output [env: FABRO_QUIET=] + --provider + Override default LLM provider + --verbose + Enable verbose output [env: FABRO_VERBOSE=] + --dry-run + Execute with simulated LLM backend + --sandbox + Sandbox for agent tools --max-concurrent-runs Maximum number of concurrent run executions - --server-url - Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] --config Path to server config file (default: ~/.fabro/server.toml) -h, --help diff --git a/lib/crates/fabro-cli/tests/it/cmd/server_status.rs b/lib/crates/fabro-cli/tests/it/cmd/server_status.rs index e4394a113..a0ff93156 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/server_status.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/server_status.rs @@ -20,13 +20,12 @@ fn help() { Usage: fabro server status [OPTIONS] Options: - --json Output as JSON + --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --json Output as JSON --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] --quiet Suppress non-essential output [env: FABRO_QUIET=] --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] -h, --help Print help ----- stderr ----- "); diff --git a/lib/crates/fabro-cli/tests/it/cmd/server_stop.rs b/lib/crates/fabro-cli/tests/it/cmd/server_stop.rs index f40dd1b73..06764141a 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/server_stop.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/server_stop.rs @@ -21,13 +21,12 @@ fn help() { Options: --json Output as JSON [env: FABRO_JSON=] - --timeout Seconds to wait for graceful shutdown before SIGKILL [default: 10] + --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --timeout Seconds to wait for graceful shutdown before SIGKILL [default: 10] --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] --quiet Suppress non-essential output [env: FABRO_QUIET=] --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] -h, --help Print help ----- stderr ----- "); diff --git a/lib/crates/fabro-cli/tests/it/cmd/start.rs b/lib/crates/fabro-cli/tests/it/cmd/start.rs index ed268d305..22d556eca 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/start.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/start.rs @@ -24,12 +24,11 @@ fn help() { Options: --json Output as JSON [env: FABRO_JSON=] + --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] --quiet Suppress non-essential output [env: FABRO_QUIET=] --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] -h, --help Print help ----- stderr ----- "); diff --git a/lib/crates/fabro-cli/tests/it/cmd/store.rs b/lib/crates/fabro-cli/tests/it/cmd/store.rs index e04956b02..082ce6ba3 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/store.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/store.rs @@ -18,14 +18,12 @@ fn help() { help Print this message or the help of the given subcommand(s) Options: - --json Output as JSON [env: FABRO_JSON=] - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] - -h, --help Print help + --json Output as JSON [env: FABRO_JSON=] + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --verbose Enable verbose output [env: FABRO_VERBOSE=] + -h, --help Print help ----- stderr ----- "); } diff --git a/lib/crates/fabro-cli/tests/it/cmd/store_dump.rs b/lib/crates/fabro-cli/tests/it/cmd/store_dump.rs index 5004e83df..f31412840 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/store_dump.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/store_dump.rs @@ -22,13 +22,12 @@ fn help() { Options: --json Output as JSON [env: FABRO_JSON=] - -o, --output Output directory (must not exist or be empty) + --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + -o, --output Output directory (must not exist or be empty) --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] --quiet Suppress non-essential output [env: FABRO_QUIET=] --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] -h, --help Print help ----- stderr ----- "); diff --git a/lib/crates/fabro-cli/tests/it/cmd/system.rs b/lib/crates/fabro-cli/tests/it/cmd/system.rs index 8c1048d52..808b3a839 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/system.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/system.rs @@ -19,14 +19,12 @@ fn help() { help Print this message or the help of the given subcommand(s) Options: - --json Output as JSON [env: FABRO_JSON=] - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] - -h, --help Print help + --json Output as JSON [env: FABRO_JSON=] + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --verbose Enable verbose output [env: FABRO_VERBOSE=] + -h, --help Print help ----- stderr ----- "); } diff --git a/lib/crates/fabro-cli/tests/it/cmd/system_df.rs b/lib/crates/fabro-cli/tests/it/cmd/system_df.rs index c487516e4..e0d7f54e0 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/system_df.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/system_df.rs @@ -18,12 +18,11 @@ fn help() { Options: --json Output as JSON [env: FABRO_JSON=] - -v, --verbose Show per-run breakdown + --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + -v, --verbose Show per-run breakdown --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] --quiet Suppress non-essential output [env: FABRO_QUIET=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] -h, --help Print help ----- stderr ----- "); diff --git a/lib/crates/fabro-cli/tests/it/cmd/system_prune.rs b/lib/crates/fabro-cli/tests/it/cmd/system_prune.rs index 1b9e284d5..0534eb3d4 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/system_prune.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/system_prune.rs @@ -16,19 +16,18 @@ fn help() { Usage: fabro system prune [OPTIONS] Options: - --before Only include runs started before this date (YYYY-MM-DD prefix match) --json Output as JSON [env: FABRO_JSON=] + --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] + --before Only include runs started before this date (YYYY-MM-DD prefix match) --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] --workflow Filter by workflow name (substring match) --label Filter by label (KEY=VALUE, repeatable, AND semantics) - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --orphans Include orphan directories (no run.json) --quiet Suppress non-essential output [env: FABRO_QUIET=] - --older-than Only prune runs older than this duration (e.g. 24h, 7d). Default: 24h when no explicit filters are set + --orphans Include orphan directories (no run.json) --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] + --older-than Only prune runs older than this duration (e.g. 24h, 7d). Default: 24h when no explicit filters are set --yes Actually delete (default is dry-run) - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] -h, --help Print help ----- stderr ----- "); diff --git a/lib/crates/fabro-cli/tests/it/cmd/upgrade.rs b/lib/crates/fabro-cli/tests/it/cmd/upgrade.rs index 5af2e17c0..d71b60d18 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/upgrade.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/upgrade.rs @@ -14,17 +14,15 @@ fn help() { Usage: fabro upgrade [OPTIONS] Options: - --json Output as JSON [env: FABRO_JSON=] - --version Target version (e.g. "0.5.0" or "v0.5.0") - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --force Upgrade even if already on the target version - --dry-run Preview what would happen without making changes - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] - -h, --help Print help + --json Output as JSON [env: FABRO_JSON=] + --version Target version (e.g. "0.5.0" or "v0.5.0") + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --force Upgrade even if already on the target version + --dry-run Preview what would happen without making changes + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --verbose Enable verbose output [env: FABRO_VERBOSE=] + -h, --help Print help ----- stderr ----- "#); } diff --git a/lib/crates/fabro-cli/tests/it/cmd/validate.rs b/lib/crates/fabro-cli/tests/it/cmd/validate.rs index aa5ef3868..fecd63ab9 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/validate.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/validate.rs @@ -24,14 +24,12 @@ fn help() { Path to the .fabro workflow file Options: - --json Output as JSON [env: FABRO_JSON=] - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] - -h, --help Print help + --json Output as JSON [env: FABRO_JSON=] + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --verbose Enable verbose output [env: FABRO_VERBOSE=] + -h, --help Print help ----- stderr ----- "); } diff --git a/lib/crates/fabro-cli/tests/it/cmd/wait.rs b/lib/crates/fabro-cli/tests/it/cmd/wait.rs index 3b5605265..5c9fa2b27 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/wait.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/wait.rs @@ -20,14 +20,13 @@ fn help() { Options: --json Output as JSON [env: FABRO_JSON=] - --timeout Maximum time to wait in seconds + --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --timeout Maximum time to wait in seconds --interval Poll interval in milliseconds [default: 1000] --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] --quiet Suppress non-essential output [env: FABRO_QUIET=] --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] -h, --help Print help ----- stderr ----- "); diff --git a/lib/crates/fabro-cli/tests/it/cmd/workflow.rs b/lib/crates/fabro-cli/tests/it/cmd/workflow.rs index 9a7e661ed..3c81517fd 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/workflow.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/workflow.rs @@ -19,14 +19,12 @@ fn help() { help Print this message or the help of the given subcommand(s) Options: - --json Output as JSON [env: FABRO_JSON=] - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] - -h, --help Print help + --json Output as JSON [env: FABRO_JSON=] + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --verbose Enable verbose output [env: FABRO_VERBOSE=] + -h, --help Print help ----- stderr ----- "); } diff --git a/lib/crates/fabro-cli/tests/it/cmd/workflow_create.rs b/lib/crates/fabro-cli/tests/it/cmd/workflow_create.rs index e64125f51..c737206c8 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/workflow_create.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/workflow_create.rs @@ -24,15 +24,13 @@ fn help() { Name of the workflow Options: - -g, --goal Goal description for the workflow - --json Output as JSON [env: FABRO_JSON=] - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] - -h, --help Print help + -g, --goal Goal description for the workflow + --json Output as JSON [env: FABRO_JSON=] + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --verbose Enable verbose output [env: FABRO_VERBOSE=] + -h, --help Print help ----- stderr ----- "); } diff --git a/lib/crates/fabro-cli/tests/it/cmd/workflow_list.rs b/lib/crates/fabro-cli/tests/it/cmd/workflow_list.rs index 97f3af010..795080785 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/workflow_list.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/workflow_list.rs @@ -16,14 +16,12 @@ fn help() { Usage: fabro workflow list [OPTIONS] Options: - --json Output as JSON [env: FABRO_JSON=] - --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] - --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] - --quiet Suppress non-essential output [env: FABRO_QUIET=] - --verbose Enable verbose output [env: FABRO_VERBOSE=] - --storage-dir Local storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]] - --server-url Fabro API server URL (overrides server.base_url from user.toml when supported) [env: FABRO_SERVER_URL=] - -h, --help Print help + --json Output as JSON [env: FABRO_JSON=] + --debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=] + --no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true] + --quiet Suppress non-essential output [env: FABRO_QUIET=] + --verbose Enable verbose output [env: FABRO_VERBOSE=] + -h, --help Print help ----- stderr ----- "); }