Default to run when no subcommand given
Bare "ramekin" or "ramekin /path" now invokes run without requiring
the subcommand. Explicit "ramekin run" and "ramekin config" still work.
Assisted-by: Claude Opus 4.6 via pi
diff --git a/src/main.rs b/src/main.rs
index 57cd9a1..a4a8a26 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -16,7 +16,11 @@ const RAMEKIN_EXTENSION: &str = include_str!("../assets/ramekin.ts");
#[command(about = "Run a pi coding agent in a containerized environment")]
struct Cli {
#[command(subcommand)]
- command: Cmd,
+ command: Option<Cmd>,
+
+ /// Workspace directory to mount (defaults to current directory)
+ #[arg(default_value = ".")]
+ workspace: PathBuf,
}
#[derive(Subcommand)]
@@ -44,8 +48,9 @@ fn main() -> ExitCode {
let cli = Cli::parse();
let result = match cli.command {
- Cmd::Run { workspace } => cmd_run(workspace),
- Cmd::Config { workspace } => cmd_config(workspace),
+ Some(Cmd::Run { workspace }) => cmd_run(workspace),
+ Some(Cmd::Config { workspace }) => cmd_config(workspace),
+ None => cmd_run(cli.workspace),
};
if let Err(e) = result {