CLI to scaffold Tauri desktop apps with shadcn/ui. Drives the upstream shadcn and create-tauri-app CLIs β no local template tree to maintain.
# bun
bun create tauri-ui my-app
bunx create-tauri-ui@latest my-app
# npm
npm create tauri-ui@latest my-app
npx create-tauri-ui@latest my-appcd my-app
bun install
bun run tauri devTo regenerate the Tauri icon set from the included source image:
bunx tauri icon app-icon.pngBun is required in generated projects.
Usage: create-tauri-ui [target-dir] [options]
Options:
-t, --template <name> vite | next | start | react-router | astro
--identifier <value> Tauri app identifier (e.g. com.example.myapp)
--preset <value> shadcn preset (default: b0)
--size-optimize optimize release binaries for size
--no-size-optimize skip size optimization
--starter include the starter dashboard
--no-starter skip the starter dashboard
--invoke-example include the Rust invoke example
--no-invoke-example skip the Rust invoke example
--workflow include the GitHub release workflow
--no-workflow skip the GitHub release workflow
-f, --force overwrite an existing target directory
-y, --yes accept all defaults
-v, --version display version
-h, --help display help
Vite app with all defaults:
npm create tauri-ui@latest my-app -- --template vite --yesNext.js app, no dashboard, no workflow:
npm create tauri-ui@latest my-app -- --template next --yes --no-starter --no-workflowAstro app with a custom bundle identifier:
bun create tauri-ui my-app --template astro --identifier com.example.astroapp --yesVite app with size-optimized release binary:
bun create tauri-ui my-app --template vite --size-optimize --yesEvery generated project gets:
src-taurinative layer (fromcreate-tauri-app)- shadcn frontend scaffold (from the upstream
shadcnCLI) - framework adapters for
vite,next,start,react-router,astro - Tauri config patches for desktop dev and build output
- centered
1400Γ918main window - startup flash prevention (window hidden until first paint)
- external link guard β internal links stay in-app, external links open in the system browser
- overscroll / rubber-band scroll disabled
- desktop selection defaults β global
select-none, intrinsic selectable allowlist,.ui-selectableutility class - dev-only debug panel with runtime info, tracked invokes, runtime events, and log stream
app-icon.pngsource asset
Optional (prompted during scaffolding, or passed as flags):
| Battery | Flag | Notes |
|---|---|---|
| Starter dashboard | --starter / --no-starter |
based on dashboard-01 |
| Rust invoke example | --invoke-example / --no-invoke-example |
|
| Size optimization | --size-optimize / --no-size-optimize |
~65% smaller release binary (9 MB β 3.1 MB) |
| GitHub release workflow | --workflow / --no-workflow |
| Template | Status |
|---|---|
vite |
smoke-tested end to end |
next |
stable |
react-router |
stable |
astro |
stable |
start (TanStack) |
experimental β validate carefully after changes |
Scaffolding into . (current directory) is not supported yet.
prompts β shadcn init β create-tauri-app (temp dir) β merge src-tauri β apply framework patches β add batteries
Local asset surface is intentionally small:
assets/app-icon.png
assets/release.yml.tmpl
No full frontend templates are shipped. The upstream CLIs do the heavy lifting; this package handles the merge, patching, and battery injection.
Run from the monorepo root:
bun run --cwd packages/create-tauri-ui check-types
bun run --cwd packages/create-tauri-ui buildRun the local build directly:
bun run --cwd packages/create-tauri-ui start -- --helpType check + build:
bun run --cwd packages/create-tauri-ui check-types
bun run --cwd packages/create-tauri-ui buildSingle template smoke test:
rm -rf /tmp/ctui-vite
node packages/create-tauri-ui/index.js /tmp/ctui-vite --template vite --yes --no-workflow
cd /tmp/ctui-vite && bun install && bun run buildAll templates:
for template in vite next start react-router astro; do
dir="/tmp/create-tauri-ui-$template"
rm -rf "$dir"
node packages/create-tauri-ui/index.js "$dir" --template "$template" --yes --no-workflow
(cd "$dir" && bun install && bun run build) || exit 1
doneMIT