Configuration
Customize the @robojs/cli plugin's build behavior.
Configuration
The @robojs/cli plugin works with zero configuration out of the box. For advanced use cases, you can customize the plugin's behavior through its config file.
Plugin config
Create a plugin configuration file at config/plugins/robojs/cli.ts:
export default {
// Plugin options go here
}export default {
// Plugin options go here
}How it works
The @robojs/cli plugin is a build-time only plugin. It has no runtime lifecycle hooks — it only runs during robo build:
- Route discovery — Robo scans
src/cli/for command files - Manifest generation — Commands are indexed with metadata (description, options, parent-child relationships)
- Code generation — The
build/completehook generates.robo/build/cli.js - Executable output — The generated file is marked as executable (chmod 755)
Route config
The plugin's route definition controls how files are scanned and processed:
Prop
Type
Generated entry point
After robo build, the plugin generates .robo/build/cli.js. This file:
- Has a
#!/usr/bin/env nodeshebang for direct execution - Imports all command handlers from the build output
- Registers each command with the
Commandclass fromrobo.js/cli.js - Reads
name,version, anddescriptionfrom yourpackage.json - Includes auto-generated help via the
-h/--helpflag
