From 312c497b3edc4c28fc986a9130bc99efe9f75b64 Mon Sep 17 00:00:00 2001 From: Benedikt Schaber Date: Wed, 31 Dec 2025 10:57:08 +0100 Subject: [PATCH 1/4] docs(cli): add missing shortcuts to 'new' cmd help txt --- src/command/new.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/command/new.rs b/src/command/new.rs index 1f56bfa9..437f24a9 100644 --- a/src/command/new.rs +++ b/src/command/new.rs @@ -12,9 +12,9 @@ use crate::internal_prelude::*; #[clap(about)] pub struct NewCommand { /// Git repository to clone template from. Can be a full URL (like - /// `https://github.com/leptos-rs/start`), or a shortcut for one of our - /// built-in templates: `leptos-rs/start`, `leptos-rs/start-axum`, - /// `leptos-rs/start-axum-workspace`, or `leptos-rs/start-aws`. + /// `https://github.com/leptos-rs/start-actix`), or a shortcut for one of our + /// built-in templates: `leptos-rs/start-trunk`, `leptos-rs/start-actix`, `leptos-rs/start-axum`, + /// `leptos-rs/start-axum-workspace`, `leptos-rs/start-aws` or `leptos-rs/start-spin`. #[clap(short, long, group = "git-arg")] pub git: Option, From 6841855cdd5a0f10ec2eb310b349b48a7d8e4995 Mon Sep 17 00:00:00 2001 From: Benedikt Schaber Date: Wed, 31 Dec 2025 11:34:24 +0100 Subject: [PATCH 2/4] docs(README): mention templates in getting started --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6ee75b63..3d78439f 100644 --- a/README.md +++ b/README.md @@ -37,10 +37,7 @@ Build tool for [Leptos](https://crates.io/crates/leptos): - `test` command for running tests of the lib and bin packages that makes up the Leptos project. - `build` build the server and client. - `end-to-end` command for building, running the server and calling a bash shell hook. The hook would typically launch Playwright or similar. -- `new` command for creating a new project based on templates, using [cargo-generate](https://cargo-generate.github.io/cargo-generate/index.html). Current templates include - - [`https://github.com/leptos-rs/start`](https://github.com/leptos-rs/start): An Actix starter - - [`https://github.com/leptos-rs/start-axum`](https://github.com/leptos-rs/start-axum): An Axum starter - - [`https://github.com/leptos-rs/start-axum-workspace`](https://github.com/leptos-rs/start-axum-workspace): An Axum starter keeping client and server code in separate crates in a workspace +- `new` command for creating a new project based on templates, using [cargo-generate](https://cargo-generate.github.io/cargo-generate/index.html). - 'no_downloads' feature to allow user management of optional dependencies
@@ -63,7 +60,12 @@ Help: > `cargo leptos --help` -For setting up your project, have a look at the [examples](https://github.com/leptos-rs/cargo-leptos/tree/main/examples) +For setting up your project, have a look at one of the [templates](https://github.com/orgs/leptos-rs/repositories?q=start) or the [examples](https://github.com/leptos-rs/cargo-leptos/tree/main/examples). You can also use the `cargo leptos new` command to create a new project from a template, see `cargo leptos new --help` for more information. + +Current templates include but are not limited to: + - [`https://github.com/leptos-rs/start-actix`](https://github.com/leptos-rs/start-actix): An Actix starter + - [`https://github.com/leptos-rs/start-axum`](https://github.com/leptos-rs/start-axum): An Axum starter + - [`https://github.com/leptos-rs/start-axum-workspace`](https://github.com/leptos-rs/start-axum-workspace): An Axum starter keeping client and server code in separate crates in a workspace
From a528cad9dfbce56f55e13721c21129d013fe130a Mon Sep 17 00:00:00 2001 From: Benedikt Schaber Date: Wed, 31 Dec 2025 11:35:20 +0100 Subject: [PATCH 3/4] feat(cli): add new templates shortcuts to 'new' cmd --- src/command/new.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/command/new.rs b/src/command/new.rs index 437f24a9..eddfc7ea 100644 --- a/src/command/new.rs +++ b/src/command/new.rs @@ -13,8 +13,11 @@ use crate::internal_prelude::*; pub struct NewCommand { /// Git repository to clone template from. Can be a full URL (like /// `https://github.com/leptos-rs/start-actix`), or a shortcut for one of our - /// built-in templates: `leptos-rs/start-trunk`, `leptos-rs/start-actix`, `leptos-rs/start-axum`, - /// `leptos-rs/start-axum-workspace`, `leptos-rs/start-aws` or `leptos-rs/start-spin`. + /// built-in templates: + /// + /// `leptos-rs/start-trunk`, `leptos-rs/start-actix`, `leptos-rs/start-axum`, + /// `leptos-rs/start-axum-workspace`, `leptos-rs/start-aws`, `leptos-rs/start-spin`, + /// `leptos-rs/start-csr` or `leptos-rs/start-wasi`. #[clap(short, long, group = "git-arg")] pub git: Option, @@ -96,6 +99,8 @@ fn absolute_git_url(url: Option) -> Option { } "start-aws" | "leptos-rs/start-aws" => format_leptos_starter_url("start-aws"), "start-spin" | "leptos-rs/start-spin" => format_leptos_starter_url("start-spin"), + "start-csr" | "leptos-rs/start-csr" => format_leptos_starter_url("start-csr"), + "start-wasi" | "leptos-rs/start-wasi" => format_leptos_starter_url("start-wasi"), _ => url, }) } From d06064652345c0da8e2eb85d6f0e2dd8eef33176 Mon Sep 17 00:00:00 2001 From: Benedikt Schaber Date: Thu, 8 Jan 2026 13:14:27 +0100 Subject: [PATCH 4/4] docs(cli): only list recommended templates in new cmd --- src/command/new.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/command/new.rs b/src/command/new.rs index eddfc7ea..0b157142 100644 --- a/src/command/new.rs +++ b/src/command/new.rs @@ -13,11 +13,10 @@ use crate::internal_prelude::*; pub struct NewCommand { /// Git repository to clone template from. Can be a full URL (like /// `https://github.com/leptos-rs/start-actix`), or a shortcut for one of our - /// built-in templates: + /// built-in templates. Recommended shortcuts are: /// - /// `leptos-rs/start-trunk`, `leptos-rs/start-actix`, `leptos-rs/start-axum`, - /// `leptos-rs/start-axum-workspace`, `leptos-rs/start-aws`, `leptos-rs/start-spin`, - /// `leptos-rs/start-csr` or `leptos-rs/start-wasi`. + /// `leptos-rs/start-actix`, `leptos-rs/start-axum`, + /// `leptos-rs/start-axum-workspace`, `leptos-rs/start-csr`. #[clap(short, long, group = "git-arg")] pub git: Option,