Getting Started with the CLI#

@sigx/cli is the command-line tool for SignalX projects. It does three things:

  • Scaffolds new projects with sigx create — a wizard (or headless flags) that composes a project from the kind, rendering, deploy target, styling and extras you pick.
  • Reports environment & project info with sigx info, including the Lynx native toolchain when a Lynx config is detected.
  • Discovers plugins at runtime so packages like @sigx/vite, @sigx/ssg, and @sigx/lynx-cli can contribute commands such as dev, build, preview, and the platform commands.

The CLI ships a single binary, sigx, and is ESM-only.

Quick start#

The fastest way to a new project is sigx create. You can run it without installing anything:

Terminal
pnpm create @sigx@latest

This walks you through the wizard — a name, then Quick start (a Tailwind SPA with routing and tests) or Customize (kind → rendering and deploy target → styling → extras), then your package manager and whether to install dependencies and initialize git. It writes the project into ./<name> and prints the next steps.

To skip the prompts and scaffold headlessly, pass flags:

Terminal
pnpm dlx sigx create my-app --kind ssr --styling tailwind --install -y

Headless runs never install dependencies or initialize git unless --install / --git ask for it, which keeps them safe in CI — drop --install and run the install yourself.

--kind takes spa, ssr, ssg, terminal or lynx. See Creating a Project for the full flag surface, the deploy targets and render modes for SSR, and what each kind generates.

Installing into a project#

Generated projects depend on @sigx/cli directly, so most commands are available via npx sigx <command>. To add it to an existing project:

Terminal
pnpm add -D @sigx/cli

Then run any command through your package runner:

Terminal
pnpm dlx sigx info

See Installation for peer-dependency details and which plugin packages enable which commands.

A minimal end-to-end example#

Scaffold a web app, install dependencies, and start it — in one command:

Terminal
pnpm create @sigx@latest my-app -- --kind spa --install -y
cd my-app
pnpm run dev

--install is what makes the dependencies land; headless runs never install (or touch git) unless you ask. Drop it and run the install yourself:

Terminal
pnpm dlx sigx create my-app --kind spa -y
cd my-app
pnpm install
pnpm run dev

Scripts differ by kind:

  • spa uses Vite directly — vite, vite build, vite preview.
  • ssr runs node server.mjs for dev and builds with vite build --app; start runs the production server. Every deploy target shares that dev workflow.
  • ssg maps dev, build and preview to sigx dev / sigx build / sigx preview.
  • terminal runs sigx-terminal-dev src/main.tsx for dev (HMR) and tsx src/main.tsx for start.
  • lynx maps dev and build to sigx dev / sigx build, plus sigx doctor and sigx prebuild, and has no preview.

Where a project uses sigx commands, those resolve to commands contributed by the corresponding plugin packages.

Where to go next#

  • Creating a Project — the wizard, every create flag, and what each kind generates.
  • Installation — install, peer dependencies, and the plugin packages behind each command.
  • Commands — every command with its usage and flags.
  • Authoring Plugins — extend the CLI with your own commands.
  • API ReferencedefinePlugin, runCreate, and the plugin type contract.