Comprehensive reference for all ForSure CLI command options.
These options can be used with any ForSure CLI command:
| Option | Short | Description |
|---|---|---|
| --help | -h | Show help information for the command |
| --verbose | -v | Show detailed output and logging |
| --config | -c | Specify path to configuration file |
| --version | -V | Show CLI version information |
Options specific to the generate command:
| Option | Short | Description |
|---|---|---|
| --output | -o | Specify the output directory |
| --force | -f | Overwrite existing files |
| --dry-run | -d | Show what would be generated without creating files |
| --template | -t | Use specific template for generation |
| --ignore | -i | Ignore files matching pattern |
forsure generate project.forsure --output ./my-project --force
forsure generate project.forsure --dry-run --verbose
forsure generate project.forsure --template react --ignore "*.test.js"Options for code generation commands (gen component, gen hook, etc.):
| Option | Short | Description |
|---|---|---|
| --name | -n | Specify the name for the generated item |
| --template | -t | Template type (basic, form, layout, data, api) |
| --typescript | -ts | Generate TypeScript files |
| --test | Generate test files | |
| --storybook | -sb | Generate Storybook stories |
| --path | -p | Output path for generated files |
forsure gen component -n button --template basic --typescript --test --storybook
forsure gen hook -n use-api --template api --typescript --test
forsure gen page -n dashboard --template admin --typescript --path ./pages/adminOptions for design system commands:
| Option | Short | Description |
|---|---|---|
| --format | -f | Output format (css, scss, typescript, json) |
| --watch | -w | Watch for changes and auto-generate |
| --theme | Generate specific theme | |
| --output | -o | Output directory for generated files |
forsure design tokens --format css --watch
forsure design tokens --format scss --theme dark --output ./themes/
forsure design tokens --format typescript --output ./types/Options for build and test commands:
| Option | Short | Description |
|---|---|---|
| --production | -p | Build for production environment |
| --coverage | -c | Generate test coverage report |
| --watch | -w | Watch mode for tests |
| --minify | Minify output files | |
| --sourcemap | -s | Generate source maps |
Options for the publish command:
| Option | Short | Description |
|---|---|---|
| --registry | -r | Package registry (npm, yarn, private) |
| --tag | -t | Release tag (latest, beta, alpha) |
| --dry-run | -d | Simulate publish without actually publishing |
| --access | -a | Access level (public, private) |
ForSure CLI can be configured using environment variables:
| Variable | Description |
|---|---|
| FORSURE_CONFIG | Path to configuration file |
| FORSURE_OUTPUT_DIR | Default output directory |
| FORSURE_TEMPLATE_DIR | Custom templates directory |
| FORSURE_LOG_LEVEL | Logging level (error, warn, info, debug) |
| FORSURE_REGISTRY | Default package registry |
export FORSURE_CONFIG="./custom-config.json"
export FORSURE_OUTPUT_DIR="./dist"
export FORSURE_LOG_LEVEL="debug"
forsure generate project.forsureLearn more about configuring the ForSure CLI: