smeltery new asks a few questions. Every question is also a flag, and at the end it prints the equivalent one-line command.
terminal
cargo install smeltery
smeltery new my-app
cd my-app && smeltery serve
Tailwind is installed by smeltery new as a standalone binary (no Node, about 110 MB, checked against its SHA-256); the app also ships a prebuilt app.css, so its pages look right even when that download is skipped or fails (smeltery tailwind:install retries).
With the optional Alpine.js question, the app gets Alpine.js 3.17.4 from a copy embedded in the CLI: nothing is downloaded and no Node is needed; the layout loads it after the Sparks script.
smeltery new my-app — zsh
$smeltery new my-app────────────────────────────────────────────────────────────────────Batteries-included full-stack Rust · v0.1.0◆Project↑↓ move · enter confirm✓What are you building?Web app────────────────────────────────────────────────────────◆Database↑↓ move · enter confirm✓DatabaseSQLite────────────────────────────────────────────────────────◆Starter kit↑↓ move · enter confirm✓Starter kitMold + Sparks────────────────────────────────────────────────────────◆Tailwindy / n · enter confirm✓Install Tailwind?Yes────────────────────────────────────────────────────────◆Alpine.jsy / n · enter confirm✓Alpine.js?No────────────────────────────────────────────────────────◆Building blocks↑↓ move · space toggle · enter confirm✓Which building blocks should we smelt into your stack?Watchfire, Temper────────────────────────────────────────────────────────◆Bellows↑↓ move · space toggle · enter confirm✓Bellows AI-agent support────────────────────────────────────────────────────────◆Migrationsy / n · enter confirm✓Run migrations?Yes────────────────────────────────────────────────────────◆Seedersy / n · enter confirm✓Run seeders?Yes────────────────────────────────────────────────────────◆Gity / n · enter confirm✓Initialize a git repository?Yes✓ Cargo.toml
✓ README.md
✓ CLAUDE.md
✓ AGENTS.md
✓ .gitignore
✓ .env
✓ .env.example
✓ bootstrap/ · 2 files
✓ app/ · 25 files
✓ config/ · 3 files
✓ routes/ · 3 files
✓ database/ · 13 files
✓ resources/ · 17 files
✓ public/ · 5 files
✓ storage/ · 4 files
✓ tests/ · 1 file
✓ Tailwind CSS v4.3.3 installed at /Users/you/Library/Application Support/smeltery/bin/tailwindcss-v4.3.3
✓ git repository
✓ migrate
✓ db:seed
Created my-appkind web
database sqlite
frontend Mold + Sparks
tailwind installed
alpine no
smelt watchfire,temper
bellows none
migrate done
seed done
git initialized
Same app without questions:smeltery new my-app --kind web --db sqlite --frontend mold \ --tailwind --no-alpine --smelt watchfire,temper --bellows none \ --migrate --seed --gitNext steps:› cd my-app && smeltery serve DONE my-app is ready
$
Click an answer to change it.
smeltery new my-app --kind web --db sqlite --frontend mold --tailwind --no-alpine --smelt watchfire,temper --bellows none --migrate --seed --git
storage/app/public app/private (the app's files) framework (Smeltery's) logs
tests/http.rs
.env.env.example.gitignore
README.mdCLAUDE.mdAGENTS.md
Cargo.toml
02 · The family
Raw ore in. A finished app out.
Smeltery melts Axum, Tokio, SeaORM, a template engine, auth, agents and a CLI into one tool. Follow the smith through the forge: every station is one part of the family.
Station 1 · smelt
Smeltery
One CLI creates the app and generates every piece of it.
cargo install smeltery and smeltery new my-app give you a complete, working application: routing, models and migrations, templates, live components, sessions and auth, a cache, mail, and supervised agents.
*.mold.html files with an @-directive syntax. Debug builds re-read a template when it changes; release builds compile it, so a missing variable is a compile error naming the file and line.
A Spark is a Rust struct with actions and a Mold view. The page renders it on the server; clicks and input go to the server, which answers the new HTML.
WebSockets and broadcasting, on the app's own port.
A WebSocket server inside the app that speaks the Pusher Channels protocol 7. Handlers, jobs and Watchfire agents send events; pusher-js and laravel-echo connect with a custom host, and Sparks listen without JavaScript.
routes/channels.rs
usesmeltery::anvil::{ChannelCtx,Channels};usesmeltery::prelude::*;/// `routes/channels.rs`: the public channels and who may join the private ones.pubfnchannels(c:&mutChannels){c.public("news");c.public("scores.{game}");c.private("orders.{order}",|ctx:ChannelCtx|asyncmove{letorder:i64=ctx.param("order")?;letSome(user_id)=ctx.user_id()else{returnOk(false)};// Look the order up and allow its owner only.letrows=ctx.db()?.query_with("SELECT user_id FROM orders WHERE id = ?",[order.into()]).await?;letowner:Option<i64>=rows.first().and_then(|row|row.try_get("","user_id").ok());Ok(owner==Some(user_id))});}pubfnbuild(app:AppBuilder)->AppBuilder{app.anvil(channels)}
The server side of the Inertia v3 protocol: a controller returns a page, Inertia's client renders it. smeltery new my-app --frontend react or vue; Node.js builds the assets, the server needs no Node.js. Mold + Sparks stays the default, zero-JavaScript starter kit.
Temper handles log-in out of the box. Quench tests it.
Temper is the authentication routes as a package: log-in, registration, password reset, e-mail verification and two-factor authentication, each switched on in one builder. Quench is the testing side: a test app with a migrated database, harnesses for agents and Sparks, fakes.
tests/http.rs
usesmeltery::testing::TestApp;asyncfnhome()->&'staticstr{"Hello"}// In tests/http.rs, inside a #[test] function:letapp=TestApp::new(|app|app.routes(|r|{r.get("/",home);}));letres=app.get("/");assert_eq!(res.status(),200);assert_eq!(res.text(),"Hello");
Mobile apps, desktop apps, command-line tools and other backends send Authorization: Bearer smt_…; each token carries abilities. The table stores only a hash of the token.
usesmeltery::watchfire::prelude::*;pubfnregister(w:&mutWatchfire){// Quick forms: closures, supervised like any agent.w.every(30.secs(),"heartbeat",|ctx|asyncmove{ctx.log().info("tick");Ok(())});w.run("scraper",|ctx|asyncmove{whilectx.sleep(5.secs()).await{letpage=ctx.http().get("https://example.com/").await?.text().await?;ctx.counter("bytes").add(page.len()asi64);}Ok(())}).restart(Restart::OnFailure).backoff(1.secs()..=30.secs()).group("scrapers");w.on_event("post.created","notify",|ctx,event|asyncmove{ctx.log().info(format!("new post: {}",event.payload));Ok(())});w.group("scrapers").limit(2);w.rate_limit("example.com",2.per_second());w.schedule().call("cleanup",|_ctx|asyncmove{Ok(())}).every(5.mins()).overlap(Overlap::Skip);w.schedule().agent("scraper").cron("0 3 * * *");}
app/agents/price_poller.rs
usesmeltery::watchfire::prelude::*;/// Polls prices.#[derive(Default)]pubstructPricePoller{last:Option<String>,}implAgentforPricePoller{fnname(&self)->String{"price_poller".into()}fnconfig(&self)->AgentConfig{AgentConfig::default().restart(Restart::OnFailure).backoff(1.secs()..=60.secs()).heartbeat_timeout(2.mins())}asyncfnrun(&mutself,ctx:AgentCtx)->Result<(),AgentError>{letmutticker=ctx.interval(30.secs());whileticker.tick().await{// `tick` heartbeats, and returns false once the agent is asked to stopself.last=Some("42".into());}Ok(())}}
04 · Batteries included
Everything you need, in the box.
Smeltery has an answer for routing, data, templates, auth, agents and more, so you and your agents spend time on your app, not on wiring.
Mold templates and Sparks live components, no JavaScript to write
Watchfire agents, queued jobs and the scheduler on one runtime
Ingot models and migrations for SQLite, PostgreSQL and MySQL
Bellows: an MCP server, skills and guidelines for coding agents
Designed log-in, register and dashboard pages, light and dark, with Tailwind CSS built without Node
React and Vue starter kits through Alloy (Inertia v3), no Node on the server
Secure by default: CSRF, encrypted sessions, argon2id with log-in budgets, security headers, sandboxed uploads, signed Sparks state, a gated Watchfire dashboard
Log-in that returns users to the page they asked for, and opt-in email verification
API tokens (Hallmark): smt_… bearer tokens with abilities
One release binary, and a deployment guide for systemd with Caddy, nginx or Plesk
usesmeltery::prelude::*;useserde::{Deserialize,Serialize};#[derive(Serialize, Deserialize, Default, Spark)]#[spark(name = "counter")]// view: resources/views/sparks/counter.mold.htmlpubstructCounter{pubcount:i64,// server-only: the page cannot set it#[spark(model)]pubstep:i64,// wire:model may set it}#[actions]implCounter{/// Runs on the first render, with the props of `@spark("counter", { start: 5 })`.pubasyncfnmount(&mutself,ctx:&mutSparkCtx)->Result<()>{self.count=ctx.prop("start").unwrap_or(0);self.step=1;Ok(())}pubasyncfnincrement(&mutself)->Result<()>{self.count+=self.step;Ok(())}pubasyncfnadd(&mutself,ctx:&mutSparkCtx,n:i64)->Result<()>{self.count+=n;ctx.dispatch("counted",json!({"count":self.count}));Ok(())}#[guard(auth)]// only for a signed-in userpubasyncfnreset(&mutself)->Result<()>{self.count=0;Ok(())}}
useserde::Serialize;usesmeltery::anvil::{Anvil,BroadcastEvent,SocketId};usesmeltery::prelude::*;#[derive(Serialize, BroadcastEvent)]#[broadcast(private = "orders.{order_id}")]pubstructOrderShipped{puborder_id:i64,pubtracking:String,#[serde(skip)]pubinternal_note:String,}asyncfnship(anvil:Anvil,socket:Option<SocketId>)->Result<&'staticstr>{// … mark order 7 shipped …anvil.send(&OrderShipped{order_id:7,tracking:"1Z999".into(),internal_note:String::new()}).except(socket).await?;Ok("shipped")}
app/agents/mod.rs
usesmeltery::watchfire::prelude::*;pubfnregister(w:&mutWatchfire){// Quick forms: closures, supervised like any agent.w.every(30.secs(),"heartbeat",|ctx|asyncmove{ctx.log().info("tick");Ok(())});w.run("scraper",|ctx|asyncmove{whilectx.sleep(5.secs()).await{letpage=ctx.http().get("https://example.com/").await?.text().await?;ctx.counter("bytes").add(page.len()asi64);}Ok(())}).restart(Restart::OnFailure).backoff(1.secs()..=30.secs()).group("scrapers");w.on_event("post.created","notify",|ctx,event|asyncmove{ctx.log().info(format!("new post: {}",event.payload));Ok(())});w.group("scrapers").limit(2);w.rate_limit("example.com",2.per_second());w.schedule().call("cleanup",|_ctx|asyncmove{Ok(())}).every(5.mins()).overlap(Overlap::Skip);w.schedule().agent("scraper").cron("0 3 * * *");}
app/controllers/dashboard.rs
usestd::time::Duration;usesmeltery::prelude::*;asyncfndashboard(cache:Cache)->Result<String>{lettotal:u64=cache.remember("posts.total",Duration::from_secs(300),||async{Ok(128)}).await?;cache.put("last.visit","now",Duration::from_secs(60)).await?;lethits=cache.increment("hits",1).await?;letfirst=cache.add("welcomed",&true,Duration::from_secs(3600)).await?;Ok(format!("{total} posts, {hits} hits, first visit: {first}"))}asyncfnimport(cache:Cache)->Result<&'staticstr>{letlock=cache.lock("import",Duration::from_secs(120));if!lock.block(Duration::from_secs(5)).await?{returnOk("an import is running");}// … the import …lock.release().await?;Ok("imported")}
tests/http.rs
usesmeltery::testing::TestApp;asyncfnhome()->&'staticstr{"Hello"}// In tests/http.rs, inside a #[test] function:letapp=TestApp::new(|app|app.routes(|r|{r.get("/",home);}));letres=app.get("/");assert_eq!(res.status(),200);assert_eq!(res.text(),"Hello");
05 · Watchfire
Agents that run for days. Supervised.
Scrapers, pollers, bots, request loops, LLM agents, webhook consumers: long-lived work gets a real home, next to your jobs and the scheduler.
01
Supervision
Restart policies, exponential backoff with jitter, restart limits, heartbeats with stall detection, supervision trees.
02
Politeness
Per-host rate limits, pools and group limits, an HTTP client with timeouts and retries.
03
Durability
Checkpoints, run history, dead letters for jobs that keep failing.
04
Several processes, one picture
serve --no-agents next to one or more work processes: each agent runs in one process at a time, each scheduled tick runs once, and one dashboard controls them all.
05
Closed by default
Outside APP_ENV=local the dashboard is open only to signed-in users that the app's dashboard gate admits.
WatchfireLIVE/_watchfire
Agents4
Running4
Restarts0
Runs128
Recent runs
An illustration with the agents of the README sample and the headless demo (a poller and a deliberately flaky worker).
06 · Deployment
One binary. Your server.
The release binary has the routes, migrations, seeders, Mold views, the Sparks runtime and the Watchfire dashboard compiled in. The server needs no Rust, no Cargo, no resources/, no smeltery CLI and no OpenSSL.
deploy — bash
# on the build machine$ smeltery build
# on the server, in /srv/myapp$ sudo -u myapp ./myapp migrate --force
$ sudo systemctl daemon-reload
$ sudo systemctl enable --now myapp
$ curl -s http://127.0.0.1:8000/up
OK
One process or two
One unit runs the web server and the agents together. Or serve --no-agents plus work as two units, so you can restart the web server without stopping long-running agents.
myapp-webserve --no-agents
myapp-workwork
one database · one dashboarda shared cache store with cross-process locks
systemd, locked down
Runs as an unprivileged user with a hardened unit (NoNewPrivileges, ProtectSystem=strict), starts on boot, restarts on crash, drains on SIGTERM.
HTTPS your way
Caddy or nginx with copy-paste configs in the guide, or Plesk with its nginx as the proxy.
Ready behind a proxy
GET /up for uptime monitors, TRUSTED_PROXIES for the real client IP, brotli and gzip compression.