Rolo is a modern CLI tool designed to streamline your web development workflow. It provides fast project initialization, hot module reloading (HMR), and quick build capabilities for efficient development.
- Project Initialization (
init): Instantly scaffold new projects with best practices and ready-to-go templates. - Hot Module Reloading (HMR): Experience lightning-fast updates in your development environment without full page reloads.
- Quick Builds: Build your projects rapidly with optimized configurations for both development and production.
- Template Support: Choose from React and Vanilla JS templates to kickstart your project.
- Easy CLI Commands: Simple and intuitive commands for all major actions.
- Easy Configuration: Manage extension settings and permissions easily with
rolo configfor robust, safe, and interactive project configuration.
-
Install Rolo (if published to npm):
npm install -g rolo-cli
-
Initialize a New Project:
rolo init
-
Start Development Server with HMR:
rolo dev
-
Build Your Project:
rolo build
To run and test the Rolo CLI locally, use Node.js 20. Follow these steps:
-
Install dependencies (from the project root):
cd packages/cli npm install -
Build the CLI package:
cd packages/cli npm run build --workspace=cli -
Link the CLI globally (so you can use
rolofrom anywhere):cd packages/cli npm link -
Verify Node.js version (should be 20):
node -v # v20.x.x -
rolo config []Command
The rolo config command lets you safely update, merge, append, or remove keys in your rolo.config.json for your extension project. It supports both interactive and non-interactive usage, robust value parsing, and safe merging for arrays and objects.
Usage:
rolo config [options]Options:
-k, --key <key>: Config key to set or remove-v, --value <value>: Value to set for the key (supports JSON, arrays, or strings)-a, --add: Append/merge value to existing array/object (deduplicates arrays)-r, --remove: Remove a key fromrolo.config.json
Examples:
- Set a string value:
rolo config -k name -v "My Extension" - Set an array (e.g., permissions):
rolo config -k permissions -v '["storage","tabs"]' - Append to an array (deduplicates):
rolo config -k permissions -v '["notifications"]' --add - Merge an object:
rolo config -k options -v '{"foo":1}' --add - Remove a key:
rolo config -r -k permissions
Best Practices:
- Use JSON for complex values (arrays/objects).
- Use
--addto merge/append instead of replacing arrays/objects. - All config changes are safely merged and written to
rolo.config.json. - You can also manually edit
rolo.config.jsonin your project root if you prefer direct control.
You can now use the rolo command globally for local development and testing.
rolo init– Scaffold a new projectrolo dev– Start development server with HMRrolo build– Build the project for productionrolo config [options]– Update and manage your extension's configuration (see below)
- React: Modern React setup with Vite
- Vanilla JS: Lightweight vanilla JavaScript template
We welcome contributions! To get started:
- Fork the repository on GitHub and clone your fork locally.
- Create a new branch for your feature or fix.
- Write documentation for your changes. You can use the
rolo-generate-docscommand to help generate or update documentation. - Commit your changes and push your branch to your fork.
- Open a Pull Request (PR) to the main repository. Please ensure your code is well-documented and tested.
- Your PR will be reviewed by a maintainer. Once approved, it will be merged.
Thank you for helping improve Rolo!