diff --git a/src/readme2demo/cli.py b/src/readme2demo/cli.py index 4800c46..c522081 100644 --- a/src/readme2demo/cli.py +++ b/src/readme2demo/cli.py @@ -305,7 +305,7 @@ def run( ), engine: Optional[str] = typer.Option(None, help="Agent engine: claude-code | openhands"), model: Optional[str] = typer.Option(None, help="Model for planner/distiller/tutorial passes"), - output_dir: Optional[Path] = typer.Option(None, "--output-dir", help="Runs directory"), + output_dir: Optional[Path] = typer.Option(None, "-o", "--output-dir", help="Runs directory"), timeout: Optional[int] = typer.Option(None, help="Agent wall-clock timeout (s)"), budget_usd: Optional[float] = typer.Option(None, help="Abort if agent cost exceeds this"), max_turns: Optional[int] = typer.Option(None, help="Agent max turns"), diff --git a/tests/test_cli.py b/tests/test_cli.py index 27e7a62..ce463f1 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -331,6 +331,12 @@ def test_version_flag(): assert result.output.strip() != "" +def test_run_output_dir_has_short_alias(): + cmd = typer.main.get_command(app) + opts = {o for p in cmd.commands["run"].params for o in p.opts + p.secondary_opts} + assert "-o" in opts and "--output-dir" in opts + + def test_resume_rejects_missing_run_dir(tmp_path): missing = tmp_path / "missing-run" result = runner.invoke(app, ["resume", str(missing)])