Documentation

DOC / 03 / START

CLI reference

Use new, check, build, dev, preview, inspect, templates, and machine-readable diagnostics.

In this guideCLI reference
Getting startedProject structureCLI referenceDeveloper loopRouting and pagesRust viewsEvents and foldsSchemas and snapshotsHyphae verified syncTyped contentBrowser runtimeDOM ownershipAdaptive assetsArtifact trustErrors and diagnosticsBuild and deployCrates and APILicensing and policy

Command surface

pliego new <path>

Create the default starter transactionally

pliego templates

List maintained starter IDs and capabilities

pliego check

Validate project and toolchain contracts

pliego build

Produce and verify production output

pliego dev

Build, watch, diagnose, and reload

pliego preview

Serve an existing verified build

pliego inspect

Report routes, files, bytes, and ledger validity

pliego why artifact <path|route>

Verify and explain the causal source-to-artifact chain

pliego why-rebuilt

Explain the latest bounded development rebuild

pliego version

Print the CLI version

Development servers

shell
pliego dev
pliego dev 4300
pliego dev 4300 --lan
pliego preview 4400 --host 127.0.0.1

dev rebuilds and injects a bounded EventSource reload hook that never enters production output. preview serves only an already verified build. Both bind to loopback unless --lan or --host is explicit.

Machine-readable diagnostics

shell
pliego build --diagnostic-format json
json
{
  "code": "PLG-BLD-001",
  "exit_code": 5,
  "category": "build",
  "message": "…",
  "help": "Correct the compiler error and run pliego build again."
}

Human and JSON diagnostics carry the same stable code, category, message, recovery action, and exit status.

Exit codes

2 / PLG-ARG
Invalid command or option
3 / PLG-PRJ, PLG-NEW
Project discovery or scaffold failure
4 / PLG-ENV
Toolchain or package contract failure
5 / PLG-BLD
Compilation or site build failure
6 / PLG-ART
Artifact or ledger verification failure
7 / PLG-SRV
Development or preview server failure