Rolo
Framework for modern browser extensions
Features
- Project Initialization (init): Instantly scaffold new projects with best practices and ready-to-go templates.
- Hot Module Reloading (HMR): Lightning-fast updates in your development environment without full page reloads.
- Quick Builds: Rapid builds 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.
Getting Started
- 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 - Update configurations and permissions:
rolo config [options]
CLI Commands
rolo init– Scaffold a new projectrolo dev– Start development server with HMRrolo build– Build the project for productionrolo config [options]– Update configurations and permissions
Templates
- React: Modern React setup with Vite
- Vanilla JS: Lightweight vanilla JavaScript template
Development
- Install dependencies:
cd packages/cli npm install - Build the CLI package:
cd packages/cli npm run build --workspace=cli - Link the CLI globally:
cd packages/cli npm link - Verify Node.js version (should be 20):
node -v # v20.x.x
You can now use the rolo command globally for local development and testing.
rolo.config.json Options
- name: The name of your extension.
- description: A short description of your extension.
- templateType:
reactorvanilla(template used for the project). - permissions: Array of Chrome extension permissions (e.g.
["storage", "tabs"]). - version: The version of your extension.
- author: The author of the extension.
- manifest: Object for custom manifest fields (merged into manifest.json).
rolo config Command
The rolo config command lets you view, add, update, or remove keys in your rolo.config.json file from the CLI. It supports merging values into arrays/objects, and will prompt for missing keys/values if not provided via CLI options. You can also edit rolo.config.json manually for advanced or bulk changes.
- Set a config value:
rolo config --key name --value "My Extension" - Set a JSON array value:
rolo config --key permissions --value '["storage","tabs"]' - Add a value to an existing array property:
rolo config --key permissions --value 'cookies' --add - Remove a config key:
rolo config --key permissions --remove - If you omit
--keyor--value, the CLI will prompt you interactively.
Quick Scaffolding
Instantly scaffold new browser extension projects with best-practice templates for React and Vanilla JS. Get started in seconds with a single command.
Hot Module Reloading (HMR)
Experience lightning-fast updates in your development environment. See your changes instantly—no manual refreshes required.
Optimized Production Builds
Build your extension for production with a single command. Rolo provides optimized configurations for both development and production workflows.