@sigx/cli
v0.10.0
Published
Unified CLI for SignalX — create, dev, build, and run projects
Maintainers
Readme
@sigx/cli
The unified sigx command-line tool — daily-driver CLI for SignalX projects (web and Lynx).
npm i -D @sigx/cli
# then:
npx sigx <command>After scaffolding with npm create @sigx@latest, the generated project depends on @sigx/cli directly. The sigx binary is the single entry point for everything: scaffolding, dev servers, builds, previews, and platform-specific commands provided by plugins. Any package can extend sigx with new commands via a sigx-cli.plugin field in its package.json.
📚 Documentation
Full command reference, headless create flags, the plugin API and live examples → https://sigx.dev/cli/
sigx create my-app # scaffold a project (interactive)
sigx dev # start the dev server
sigx build # production buildRun sigx --help for the full live list (varies by what plugins are installed in your project).
Writing a plugin
Declare a top-level sigx-cli field in your package.json pointing at your plugin module:
{
"sigx-cli": { "plugin": "./dist/plugin.js", "requires": ">=0.4.0" }
}…and default-export a plugin from that module. Args declared with the a builders type ctx.args automatically — no casts:
import { a, definePlugin } from '@sigx/cli/plugin';
export default definePlugin({
name: 'my-tool',
detect: (cwd) => true,
commands: {
dev: {
description: 'Start the dev server',
aliases: ['d'], // optional alternate names
args: {
port: a.number().alias('p').default(8788),
open: a.boolean(),
},
run: async (ctx) => {
ctx.args.port; // number — inferred from the builders
ctx.args.open; // boolean | undefined
},
},
},
});Commands can also set hidden: true (dispatchable but not listed in --help) and allowUnknownFlags: true (unrecognized flags land in ctx.unknownFlags instead of erroring). For a command authored in its own file, wrap it in defineCommand({...}) to keep the same ctx.args inference. Full plugin API → https://sigx.dev/cli/
License
MIT — © Andreas Ekdahl
