Micro-generator framework that makes it easy for an entire team to create files with a level of uniformity
—
Quality
Pending
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Plop's CLI provides a comprehensive interface for running generators, managing plopfiles, and getting help information.
Run plop generators through simple command line interface.
# Show available generators and select one
plop
# Run specific generator by name
plop <generator-name>
# Run generator with bypass arguments
plop <generator-name> [arguments...]
# Run generator with named arguments
plop <generator-name> -- --arg1=value1 --arg2=value2Usage Examples:
# Interactive generator selection
plop
# Run component generator
plop component
# Run component generator with name bypass
plop component "MyComponent"
# Skip first prompt, provide second argument
plop component _ "react"
# Use named arguments
plop component -- --name "MyComponent" --type "react"Get help and version information.
# Show help screen
plop --help
plop -h
# Show version information
plop --version
plop -vCreate initial plopfile configurations.
# Generate basic plopfile.js
plop --init
plop -i
# Generate TypeScript plopfile.ts
plop --init-ts
# Force overwrite existing plopfile
plop --init --force
plop -i -fOptions that modify generator behavior.
# Show full type names instead of symbols
plop --show-type-names
plop -t
# Force overwrite existing files
plop --force
plop -f
# Disable progress bar
plop --no-progressAdvanced configuration options for specialized use cases.
# Specify custom plopfile path
plop --plopfile /path/to/plopfile.js
# Set working directory for plopfile discovery
plop --cwd /path/to/directory
# Preload modules before execution (comma-separated)
plop --preload module1,module2
# Override output destination directory
plop --dest /path/to/output
# Disable progress spinner
plop --no-progress
# Enable shell completion support
plop --completion/**
* Handles all basic argument flags
* @param env - Values parsed by Liftoff containing configuration paths
*/
function handleArgFlags(env);The CLI processes arguments in the following order:
/**
* Parses user input to identify generator and bypass data
* @param plop - The plop context with available generators
* @param passArgsBeforeDashes - Whether to pass args before '--' to generator
* @returns Object containing generator name, bypass array, and parsed arguments
*/
function getBypassAndGenerator(plop, passArgsBeforeDashes);The CLI handles various error scenarios:
Install with Tessl CLI
npx tessl i tessl/npm-plop