static_

CLI reference

static <command> [project] [flags]

Inside a project folder the project name is optional on every command. Projects are listed in ~/.static/projects.json; if a folder is not registered (for example a fresh CI checkout) the current folder is used when it looks like a project (it has pages/ and data/site.json).

Creating and developing

command description
static new [name] [--template=default|blog|business] [--url=<origin>] [--yes] Create a project in a new folder under the current directory. Prompts for anything missing in a terminal; use --yes in scripts.
static dev [project] [--port=<n>] [--open] Dev server with live reload and an error overlay. Alias: serve. Loads .env.development, shows drafts, and picks the next free port if 3000 is taken. Absolute URLs (canonical, og:image, share links) point at the dev server's own address, so you don't need SITE_URL in .env.development.
static add page|component|layout <name> Scaffold a .vue file. static add component price-card creates components/PriceCard.vue.
static post [project] "Title" [--collection=posts] Scaffold a Markdown post as a draft.
static webui [project] [flags] Open a local web app to write, edit and delete notes and posts, and to deploy.
static remote [project] [--path=post] [--force] Add a static page (public/post/index.html) that posts notes to your GitHub repository from any browser. See Microblogging.
static note [project] "text" [flags] Write a microblog note. See Microblogging.

static webui flags: --port=<n> (default 4321) and --no-open. See Web UI. It runs on your own machine only (127.0.0.1), edits the Markdown files in content/ and the site settings in data/site.json, and its Deploy button runs static deploy.

static note flags: --image=<file> and --alt="..." (repeatable, matched in order), --tags=a,b, --collection=<name> (default notes), --push (commit and push).

Building and checking

command description
static build [project] [--strict] Production build into .build/. --strict turns warnings into failures.
static check [project] A strict production build: reports SEO problems, missing alt text, heading structure and broken internal links. Exits non-zero on any warning.

Deploying

command description
static deploy [project] [--prod] [--strict] [--target=netlify|cloudflare] Build, then deploy. A preview unless --prod.
static ci [project] [--cli=<install spec>] Write a GitHub Actions workflow that builds and deploys on push.

See Deploying & CI.

Housekeeping

command description
static list List registered projects and their locations.
static open [project] Open the project folder in your file manager.
static cd <project> Print the project path. Use cd "$(static cd my-site)" to change directory.
static clear Remove the .build folder of every registered project.
static config Show the CLI's configuration.
static delete <project> Delete the project folder from disk and unregister it. This cannot be undone.
static help List commands.

Exit codes

Commands exit with 0 on success and non-zero on failure, including failed builds and checks, so they are safe to use in scripts and CI.

Templates

static new --template=... copies a starter from the CLI's templates/ folder:

  • default: a minimal Tailwind 4 site with a layout, a page and dark mode
  • blog: home, posts, notes (microblog), tags, about page and RSS
  • business: services, FAQ, contact page and LocalBusiness structured data