Smithable websitedocsGitHubTry it
Menu

Commands

Every smithable command, from the command line's own help (44 of them): smithable --help lists the same, and smithable <command> --help shows one. This page is generated from the command line itself, so it matches the Smithable it was built with. Changes to an app go through operations, run with smithable op.

read-page

smithable read-page [file.html] --url <address>

Print the description new --from would draft from: the page fetched, or one saved elsewhere;
fails when the page shows too little without JavaScript; --facts prints structured facts
and a facts-only description as JSON, including a tooLittle result for pages needing input;
--bundle reads a bounded JSON bundle of pages fetched by a host

Options: --url, --facts, --bundle, --help.

website-input

smithable website-input [dir] --generation <id> --sha256 <digest>

Install a private, validated website input from stdin for one generation.

Options: --generation, --sha256, --help.

review-assets

smithable review-assets [dir] [--approve <digest>]

Show the current image review as JSON; --approve records your review of that exact digest.

Options: --approve, --json, --help.

new

smithable new <dir>

Create a project from a starter (--starter crm|booking|invoicing|marketplace|records|status|api|support|kiosk|barbers|restaurant|builder|painter, default crm),
or --describe "a booking site for a yoga studio": a model may ask up to three questions,
picks the starter to adapt, drafts the app, and you confirm the result. --answers "a; b"
answers the questions in order; --yes asks nothing and creates the app directly;
--no-sample-data starts with an empty database (no samples/ folder, nothing seeded).
--from <url> reads bounded pages on one site and drafts from their facts (needs a model);
--content sample uses rewritten sample copy (default); --content full keeps the site's own copy and requires --from;
--with-pictures imports authorized originals after asking;
--interpret-site-images optionally interprets image descriptions with a text model, without pixels;
--name "Pulse API Status" names the app, over the starter's or the draft's own name
--admin you@your-domain makes that address the app's administrator (default: the Git user's),
--timezone Europe/Mariehamn sets its time zone (default: the starter's, else this machine's),

Options: --starter, --describe, --answers, --yes, --no-sample-data, --from, --content, --with-pictures, --interpret-site-images, --admin, --name, --timezone, --help.

clarify

smithable clarify "<description>"

The questions a model would ask about a description before drafting an app, and the
starter it picks (--json for programs; no model, or a failed answer, means no questions)

Options: --json, --help.

starters

smithable starters

The starters, each with the description that makes it: smithable new --describe with
that text, or a small edit of it, builds with no model (--json for programs)

Options: --json, --help.

run

smithable run [dir]

Generate if needed, start the app and open it in the browser (--no-open)

Options: --no-open, --help.

preview

smithable preview [dir]

Start the app with its development door open to this command; --live lets the project's
sample users (samples/people.yml) use it, their moves printed (--fast: without a model;
--everything: every move with the values the rules allow and forbid, to find faults;
--for <minutes>, an hour unless said; --port, 3000 unless said)

Options: --live, --fast, --everything, --for, --port, --help.

generate

smithable generate [dir]

Regenerate the app from smithable.yml (--force overwrites hand-edited files)

Options: --force, --help.

validate

smithable validate [path]

Check smithable.yml in a directory (default: current) or a given file
(--plugin <name> also loads a plugin that is not declared yet;
--json prints every finding with its code, file and place, for programs;
--explain says what the spec leaves to the rules: each model's title field, where its
unique values are unique, what a conversation reads, and who may run each action;
--write writes what the rules settled into smithable.yml, so it says it all)

Options: --plugin, --json, --explain, --write, --help.

affected

smithable affected <fix-id> [--json] [--dir <dir>]

Say whether a fix this engine carries (fixes/<id>.yml) affects the project: yes, no or
unknown, with a one-line reason, from its spec files and package.json alone

Options: --json, --dir, --help.

fixes

smithable fixes [--json]

List the fixes this engine carries, each with its severity and what it affects

Options: --json, --help.

card

smithable card [dir] [--format md|html|json] [--language <code>] [--out <file>]

Print the app card: one page that says what the app is, written from its spec files by
fixed rules (what it stores, about people too, who may see or change what, what it talks
to outside, what is custom, what whoever runs it is responsible for), with the project's
commit and custom files; Markdown by default, --format html for one printable file,
--format json for its facts; --language <code> for another of the app's languages;
--out <file> writes it there

Options: --format, --language, --out, --help.

theme

smithable theme --from <url> | theme lab | theme revision

A theme from a site: its colors, corners and font, read in a browser (needs Playwright),
made readable and added as themes/<name>.yml; --name names it, --use makes it the app's.
theme lab: make a theme on a real app's pages in the browser, one page at a time at the
width chosen; --starter (booking) makes a preview, or --app <dir> previews an existing app.
--project <dir> chooses the save destination independently; --project alone previews a starter.
Save adds it through addTheme to --project, or to the current folder when it is a
project; elsewhere it writes themes/<name>.yml, never over a file there; --port (4330).
Save adds a new theme without selecting it; setTheme selects it. Low contrast warns; invalid data blocks saving.
theme revision --dir <app> prints the working-source revision for an atomic applyTheme request.

Options: --from, --name, --use, --app, --project, --port, --starter, --help.

themes

smithable themes [dir]

List the themes the ux file may name: the built-in ones and the project's themes/*.yml

static

smithable static [dir]

Save the app's pages as static files, for a look at them with nothing running: each page
without its scripts, the kit's CSS, its pictures and fonts, and an index page that shows
them in light and dark at common widths; signed in --as a role (admin; visitor for the
public pages); --states adds a list with nothing found, a form with its errors and a delete
dialog; --out names the folder (data/static). Needs Playwright, as the app's smoke test does.

Options: --out, --as, --states, --help.

build

smithable build [dir]

Build the app's container image with Docker

security

smithable security [dir]

Check the app: --level fast (type check, tests), normal (+ dependencies,
secrets, code; the default) or release (+ the image and the running app).
Uses installed scanners, or their pinned images in Docker

Options: --level, --help.

deploy

smithable deploy [dir]

Release checks, then run the app: --target docker (default), ssh://user@host
(a remote Docker host) or compose (writes compose.yaml); --port, --url

Options: --target, --port, --url, --help.

backup

smithable backup [dir]

Back up the database and uploads --to a folder or s3://bucket/prefix, into <app>/<time>/ there (S3
credentials in AWS_* variables); --container <name> for a deployed app.
--continuous streams every change with Litestream (installed separately),
so restore --at can reach any second of the last 30 days; --data <dir>

Options: --to, --container, --continuous, --data, --help.

restore

smithable restore [dir]

Restore the newest backup (or --backup <time>) --from a folder or s3://…,
into the project or --container <name>. With --at <time> and a continuous
backup: what is new, changed and removed since; --bring-back and
--undo-changes <Model,…> --yes write those records back (stop the app first)

Options: --from, --backup, --container, --at, --data, --bring-back, --undo-changes, --yes, --help.

upgrade

smithable upgrade [dir]

Move the app to this Smithable's spec version and stack profile; kept only
when the type check and tests pass, and reported where custom code breaks

update

smithable update --security [dir]

Bring in this Smithable's security fixes; kept only when the checks pass

Options: --security, --help.

ask

smithable ask "<request>"

A model proposes the change in plain language; it is applied after you
confirm (--yes applies it directly). Setting up models: docs/ai.md

Options: --yes, --dir, --help.

code

smithable code <concept> "<what>"

Have a model write the custom code of a query, action, custom page or the hooks,
e.g. code query:churnRisk "rank by days since the last order" or code hooks
"email the customer when an order ships"; only src/custom/ may change, and the
type check and tests must pass

Options: --dir, --help.

teach

smithable teach <section>

Have a model write a project plugin for a section of smithable.yml Smithable
does not know (e.g. newsletter:); afterwards it is generated without AI

Options: --dir, --help.

translate

smithable translate <language>

Have a model draft the texts still empty in one of the app's other languages,
e.g. translate sv after op addLanguage sv; one change, which undo takes back

Options: --dir, --help.

import

smithable import <model> <file.csv>

Add records from a CSV file to the app's own data: the first line names the columns, matched
to fields by name or label; --dry-run shows what would go in and every problem first
(the importRecords operation; "smithable op importRecords --help" for --map).

op

smithable op <name> …

Change the app with an operation, e.g. op addField Customer phone phone
(run "smithable op" for the list, "smithable op <name> --help" for its arguments;
a list is written with commas, --pages home,items, or the option given again;
a word @path gives a file's text, e.g. op addTheme forest --text @forest.yml;
--yes confirms changes that lose data; --setup marks a change made for the owner
when a project is set up, which the history does not show and undo passes over;
--verify tests also runs the app's type check and tests; --json prints the result:
what the change did and which checks passed, failed or did not run)

Options: --yes, --setup, --verify, --json, --dir, --help.

undo

smithable undo [<number> | <from>..<to> | --change <id>] [--check] [--yes]

Undo the last operation, including the dev database
<number> undoes change #12 by the same rule (the newest with its records, an earlier one
as a new change); 12..14 undoes each in place, newest first, stopping at a refusal
--change <id> undoes that change (an id from the history) as a new change, unless a later
change depends on it or edited the same part; --check only says whether it is safe

Options: --change, --check, --yes, --dir, --help.

redo

smithable redo [--yes --plan <digest>]

Make again the last change undone, until another change is made; a version applied is
planned again and asks again when it would lose values or leave people without a role

Options: --yes, --plan, --dir, --help.

apply-version

smithable apply-version <change> [--check] [--yes --plan <digest>]

Apply an earlier version: the app's definition as it was after that change (a number or
an id from the history), as a new change; sign-in, admins and the API stay as today.
--check says what it would do (access first) and changes nothing; --yes accepts values
deleted or a role taken from people; --plan <digest> (named by --check) applies it only
if it is still the plan that was seen

Options: --check, --yes, --plan, --dir, --help.

report

smithable report [--send] [--never | --ask]

Show the report of the last failure: the operation, the error, the log and the spec
files (never records, uploads or custom code); --send sends it, --never is
remembered for you, --ask asks again

Options: --send, --never, --ask, --dir, --help.

test

smithable test [dir]

Run the app's tests and remember the results for rule status

verify

smithable verify [--depth change|tests|browser] [--json] [--record <report>] [--out <dir>]

Say what was verified for the current revision: the checks its last change ran, and,
with --depth tests, the app's type check and tests; --record takes a sampleusers report
for this revision as the browser check; nothing is verified with uncommitted edits;
--out writes the result and the test report to another folder

Options: --depth, --json, --record, --out, --dir, --help.

timers

smithable timers [run <name>]

List the app's timers, each in a sentence; run <name> runs one as if its time had come
(--at <time> for another time than now), in the app's own code

Options: --at, --dir, --help.

inspect

smithable inspect [c]

Show rules and their status, or one concept: its meaning, rules, files,
symbols, routes, tables and tests, e.g. inspect action:mergeCustomers (--json)

Options: --json, --dir, --help.

media

smithable media in-use --json [<dir>]

The stored pictures <dir>'s smithable.content.yml uses (no other file is read), with the
renditions each needs,
as JSON: [{"asset": "m_…", "variants": ["w480.webp", …]}], sorted

Options: --json, --dir, --help.

customize

smithable customize page:<p>

Give a page its own component in src/custom/pages/, starting from the generated
one (or moving a hand edit of its route there); the route stays generated

Options: --dir, --help.

context

smithable context "<req>"

The smallest context an AI model needs for a request, with its size in tokens
(--implementation adds the custom code involved; --json)

Options: --implementation, --json, --dir, --help.

studio

smithable studio [dir]

Open Smithable Studio for the project: Builder and Studio modes, with the
app's preview (--port, default 4321). Behind a proxy (the hosted service):
--host 0.0.0.0, --preview-url (the preview's public address) and --home
(a link back to the service's page for the project); with --host it needs
SMITHABLE_STUDIO_TOKEN, or --insecure to run open to the network.
--secrets-stdin: the token and the model key come as JSON on standard input
({ "studioToken": …, "modelKey": … }) instead of the environment.
--replaceable: the project may be replaced by another app, once (a hosted
workspace that waits for whoever claims it); never for your own project

Options: --port, --host, --preview-url, --home, --insecure, --replaceable, --help.

mcp

smithable mcp [dir]

Serve the project to AI agents (Claude Code, Cursor, …) over MCP on stdin/stdout

detach

smithable detach [dir]

Turn the project into an ordinary one that no longer uses Smithable

completion

smithable completion bash|zsh|fish

Print the shell's completion script for smithable: commands, options, operations
and their arguments (model, field and page names from the project). E.g.
eval "$(smithable completion bash)" in .bashrc

Options for every command