@sirou/cli
v1.1.3
Published
Official CLI for Sirou — scaffold, validate, export, and generate route documentation
Maintainers
Readme
@sirou/cli
The official command-line tool for the Sirou ecosystem. Scaffold projects, validate schemas, export route definitions for cross-platform use, and generate interactive documentation portals.
Installation
# Install globally
npm install -g @sirou/cli
# Or use with npx
npx @sirou/cli <command>Commands
sirou init
Scaffolds a new routes.ts file with a starter configuration in the current directory.
sirou initOutput: Creates routes.ts with a home, profile, and settings route template.
sirou validate
Validates your route schema file for common errors.
sirou validate
sirou validate --file src/routes.tsOptions:
| Flag | Default | Description |
| ------------------- | ----------- | ------------------------ |
| -f, --file <path> | routes.ts | Path to your routes file |
Checks performed:
- Duplicate path definitions
- Param name mismatches
- Invalid guard references
sirou export
Exports your route schema to a JSON file. Used by the Flutter bridge and other native integrations.
sirou export
sirou export --output assets/routes.json
sirou export --file src/routes.ts --output dist/routes.jsonOptions:
| Flag | Default | Description |
| --------------------- | ------------- | ------------------------ |
| -f, --file <path> | routes.ts | Path to your routes file |
| -o, --output <file> | routes.json | Output JSON file path |
Tip: Run sirou export first, then sirou docs to generate a portal from real data.
sirou docs
Generates a beautiful, standalone HTML documentation portal for your route architecture. Open the output file in any browser — no server required.
sirou docs
sirou docs --output my-route-docs.htmlOptions:
| Flag | Default | Description |
| --------------------- | ----------------- | ------------------------ |
| -f, --file <path> | routes.ts | Path to your routes file |
| -o, --output <file> | sirou-docs.html | Output HTML file path |
What the portal shows:
- All route names (flat and nested with dotted keys)
- Route paths with param highlighting
- Guard badges
- Param badges
- Route metadata (JSON)
Workflow:
# 1. Export your schema
sirou export --output routes.json
# 2. Generate the portal
sirou docs --output docs/routes.html
# 3. Open in browser
open docs/routes.htmlLicense
MIT
