(static webapp generator) ~ website development for the agentic era
SWAG is a toolkit for creating web applications by using high-quality templates with design systems and agent-ready knowledge bases.
An example of the design system used by SWAG's default Templates can be found here
- Lightweight: SWAG is a Rust library+CLI, with a desktop app in development.
- High-quality: All templates are audited and managed by human developers.
- Ready: Templates ship with libraries, design systems, utility functions.
- Native: SWAG ships PWA for browser applications and uses Tauri for desktop applications.
- Expandable: All code and UIs shipped by the templates are well documented, allowing for simple edits.
- Deployable: SWAG has integrations for Github Pages and for Vercel.
- Updatable: All templates ship with incremental versioning, allowing for simple updates.
You can download the SWAG CLI from:
-
Github Releases
-
Cargo:
cargo install swag-cli
A Project can be created with swag new; use swag init <dir> to scaffold into an existing directory instead of creating a new one. Both prompt for a missing name/template, and you can manage user-level Projects with swag projects.
swag init <dir> accepts directories that only contain files from a fresh GitHub repo (.git, .gitignore, README.md, LICENSE) without --force: .git, README.md and LICENSE are preserved, while the template's .gitignore replaces the existing one. swag update never overwrites the preserved README.md or LICENSE.
Commands are template-aware: fullstack and desktop projects mix Bun and Cargo, so swag drives every component a template provides.
| command | frontend | fullstack | desktop |
|---|---|---|---|
swag install |
bun install |
Bun (frontend/) + cargo fetch (backend/) |
Bun (/) + cargo fetch (src-tauri/) |
swag dev |
bun run dev |
frontend dev server + backend cargo run |
bun run desktop:dev (Tauri + Vite) |
swag build |
bun run build |
frontend build + cargo build --release |
bun run desktop:build (Tauri bundle) |
swag check |
bun run check |
Svelte check + Rust fmt/clippy | same web check + Rust fmt/clippy |
swag test |
bun run test |
Bun tests + cargo test |
Bun tests + cargo test |
swag run |
bun run preview |
production preview + cargo run --release |
cargo run --release (Tauri app) |
swag preview |
bun run preview |
frontend production preview | frontend production preview |
Use --web or --rust to restrict a command to one component. Combined fullstack commands run concurrently for dev/run and sequentially for setup, checks, tests and builds. swag run is the production runtime: run swag build first. Extra arguments after -- are forwarded when the command resolves to a single process; pass --web/--rust to disambiguate.
Deploy to Vercel with swag vc.
All projects derived from Templates; the default templates are:
| id | description | repo |
|---|---|---|
svelte-clean-template (alias clean) |
Static PWA: Svelte 5 + Vite + TailwindCSS 4, GitHub Pages deploy | Github |
svelte-tauri-template (alias tauri) |
Desktop app: Svelte 5 + Tauri 2, Rust core in src-tauri/ |
Github |
svelte-fullstack-template (alias fullstack) |
Fullstack: Rust + Axum backend, TypeScript + Svelte frontend | Github |
You can manage custom Templates with swag templates and you can update the Template used by a project using swag update.