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 — interactive prompts (or headless flags) that copy a bundled template into a new directory.
  • 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 dlx sigx create

This walks you through interactive prompts — a name, a project type, and a styling option — then writes the project into ./<name>. To skip the prompts and scaffold headlessly, pass flags:

Terminal
pnpm dlx sigx create my-app --type ssr --styling tailwind

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 basic web app, install dependencies, and start it:

Terminal
pnpm dlx sigx create my-app --type basic
cd my-app
pnpm install
pnpm run dev

The basic web template uses Vite scripts directly (vite, vite build, vite preview). The other templates wire npm scripts differently:

  • ssg maps dev, build, and preview to sigx dev / sigx build / sigx preview.
  • lynx maps dev and build to sigx dev / sigx build (plus sigx doctor and sigx prebuild), but has no preview script.
  • ssr does not use sigx scripts at all: it runs a custom Express server via node server.js for dev, start, and preview, and builds with vite build.

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

Where to go next#

  • 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.