From 2224eceb3dfb101290b336105672d28e05e8334a Mon Sep 17 00:00:00 2001 From: Rob Fox Date: Fri, 16 Jan 2026 20:25:21 +0000 Subject: [PATCH 1/2] Change `build` command to `init` Update CLI, tests and README --- README.md | 4 ++-- src/dash_builder/cli.py | 6 +++--- tests/test_cli.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2d6f036..4eef0cf 100644 --- a/README.md +++ b/README.md @@ -9,12 +9,12 @@ A tool and framework to simplify construction of Python Dash applications. * Create a project in the current working directory ```bash -> dash build +> dash init ``` * Create project called `testproject` in specified directory ```bash -> dash build testproject --location ~/projects +> dash init testproject --location ~/projects ``` * Add new page to current dash project in pages/ directory diff --git a/src/dash_builder/cli.py b/src/dash_builder/cli.py index abc372a..40a58ea 100644 --- a/src/dash_builder/cli.py +++ b/src/dash_builder/cli.py @@ -16,7 +16,7 @@ from .templates import PageTemplate, ViewTemplate app: typer.Typer = typer.Typer() -"""The `typer.Typer` applicaiton object.""" +"""The `typer.Typer` application object.""" class Project: @@ -229,8 +229,8 @@ def add_page(self, page_name: str, url_path: str | None = None): ) -@app.command("build") -def build( +@app.command("init") +def init( project_name: Annotated[str, typer.Argument(help="The name of the project.")] = "", template: Annotated[ str, typer.Argument(help="The template to use for the project.") diff --git a/tests/test_cli.py b/tests/test_cli.py index 2a4dbc7..39daaf4 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -9,7 +9,7 @@ "project_name", ["test-project-1", "test_project_2", "testproject"] ) def test_init_project_cli(runner, tmp_path, project_name): - app_params = ["build", project_name, "--location", str(tmp_path)] + app_params = ["init", project_name, "--location", str(tmp_path)] result = runner.invoke(app, app_params) project = tmp_path / project_name app_file = project / "app.py" From 388def5b137844e16e386027657260d5e0f83307 Mon Sep 17 00:00:00 2001 From: Rob Fox Date: Fri, 16 Jan 2026 20:25:38 +0000 Subject: [PATCH 2/2] Remove dashb from CLI commands --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c5a6948..32a2d54 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,6 @@ dependencies = [ ] [project.scripts] -dashb = "dash_builder.cli:app" dash = "dash_builder.cli:app" [build-system]