Docs

All commands

The main proa subcommands, and where each one is explained.

Open Markdown

The Proa CLI is developer tooling for Proa templates and opinionated Proa sites. It scaffolds projects, generates typed Rust modules, formats template macro bodies, runs Proa-specific lints, inspects site structure, and reports how html! or html_sync! bodies consolidate into static byte runs.

Install

The one-line installer downloads a checksum-verified release build. See Install Proa.

To build from the source repository instead (needs GitHub access while the repository is private):

CARGO_NET_GIT_FETCH_WITH_CLI=true \
  cargo install --git https://github.com/proa-labs/proa --locked proa-cli

No private Cargo registry or Cargo token is required. The Git CLI option uses your existing Git credential helpers and proxy settings. You can omit it when your Cargo configuration already enables git-fetch-with-cli. proa-cli is distributed through GitHub and the release installer; it is not currently published on crates.io.

Then confirm the binary is on your path:

proa --help

Cargo installs both proa and cargo-proa. Pin audited source with a full commit SHA:

CARGO_NET_GIT_FETCH_WITH_CLI=true \
  cargo install --git https://github.com/proa-labs/proa --rev <full-commit-sha> --locked --force proa-cli

Project builds fetch Proa crates as git dependencies of the same repository; the generated .cargo/config.toml enables the git-CLI fetch. Follow Installation if Cargo cannot download dependencies. When working from this repository, use:

cargo run -p proa-cli --bin proa -- <command>

Invocation

The installed binary is proa:

proa dev

The package also ships cargo-proa, so Cargo can invoke the same command as a subcommand:

cargo proa fmt --check --verify src

Commands

CommandPurpose
proa initAdd proa.config.json and proa.lock.json to an existing project.
proa config validateCheck proa.config.json for unknown keys, empty commands, and invalid asset definitions.
proa config showPrint the effective configuration with defaults filled in.
proa new siteCreate an opinionated Proa site, including optional deployment presets such as --deploy coolify.
proa devBuild configured assets, run the app, restart on project changes, and reload open browser tabs. See Live reload.
proa buildRun Proa checks, build configured assets, and compile the app for deployment.
proa runCompile and run one exact Proa binary through the linked RSJS pipeline.
proa testCompile and execute one exact test target through the linked RSJS pipeline.
proa generate componentGenerate reusable render components under src/components.
proa generate layoutGenerate shared page layouts under src/layouts.
proa generate dataGenerate typed data modules under src/static_data.
proa registry listPrint configured component registry aliases.
proa ui addInstall a source component or block from the Proa UI registries.
proa rsjs explainExplain why an rsjs impl emitted browser JS or stayed server-only.
proa rsjs crossingsPrint redacted public data crossing records from rsjs strategy sidecars.
proa site checkValidate the expected site structure.
proa site routesPrint page routes discovered from src/pages.
proa site doctorAlias of site check with the same diagnostics.
proa fmtFormat HTML, XML, and raw md! / md_sync! template bodies.
proa lintRun accessibility, format, composition, and render-path lints.
proa checkRun verified format and lint checks and, for a whole project, the linked RSJS Cargo check.
proa chunksInspect static runs, dynamic slots, and consolidation size estimates.
proa font syncVendor and lock every font declared in code, or verify with --offline.
proa font listList fonts recorded in proa-fonts.lock.
proa completionsGenerate shell completions for the proa binary.

Project Config

Generated sites include proa.config.json and proa.lock.json. The config drives lifecycle commands and records component registry aliases:

{
  "$schema": "https://proa.so/schema/proa.config.json",
  "paths": {
    "components": "src/components",
    "assets": "public/proa"
  },
  "registries": {
    "@proa": "https://ui.proa.so/r/{name}.json",
    "@proa-pro": "https://console.proa.so/r/{name}.json"
  },
  "dev": {
    "command": ["cargo", "run"],
    "host": "127.0.0.1",
    "port": 3000,
    "watch": ["src", "styles", "Cargo.toml", "build.rs", "proa.config.json"]
  },
  "build": {
    "command": ["cargo", "build", "--release"],
    "assets": [
      {
        "kind": "tailwind",
        "input": "styles/input.css",
        "output": "public/styles.css"
      }
    ]
  }
}

proa.lock.json records components installed by proa ui add: version, registry, installed files, source hashes, and dependencies.

Use the command override when a project needs a custom server binary:

proa dev -- cargo run --bin my_app
proa build -- cargo build --release --bin my_app

Output Modes

Several commands support machine-readable output:

CommandMachine Output
init, registry list--json
config validate, ui add--json
rsjs explain, rsjs crossings, font list--json
new site--dry-run --json
generate *--dry-run json
site check, site routes--json
lint--json or --github
chunks--json

File Selection

fmt, lint, check, and chunks can operate on explicit paths or Git-selected paths:

proa lint src/pages/home.rs
proa lint --changed --base origin/main
proa check --staged
proa chunks --changed --json

Do not combine explicit paths with --changed, --staged, or --base.

Reference Pages

Search

Type at least 2 characters