chrome_extension_generator
A command-line tool to streamline the creation of Chrome extensions by automatically generating the required boilerplate files.
A command-line tool to streamline the creation of Chrome extensions by automatically generating the required boilerplate files.
Why?
Chrome extensions are powerful tools for customizing your browsing experience, but setting up the basic structure can be repetitive. This tool was created to eliminate the tedious part of:
- Creating the correct directory structure
- Writing a basic manifest.json with proper Chrome Extension v3 format
- Setting up initial content scripts
- Creating documentation
By automating these common tasks, developers can focus on what matters: implementing their extension’s actual functionality.
Installation
Install latest from the GitHub repository:
$ pip install git+https://github.com/radekosmulski/chrome_extension_generator.gitor from conda
$ conda install -c radekosmulski chrome_extension_generatoror from pypi
$ pip install chrome_extension_generatorUsage
Command Line Interface
After installation, you can use the command line tool directly:
chrome-extension-generate --name "My Extension" --desc "A cool extension" --url "https://example.com/*"
Python API
You can also use it programmatically in your Python code:
from chrome_extension_generator.core import main
Parameters
--name Name of your extension (required)
--desc Short description of what your extension does (optional)
--url URL pattern where your extension will run (optional)
--repo GitHub repository URL (optional)
Output Structure
your-extension-name/
├── README.md
├── manifest.json
└── content.js
Each file is pre-populated with the provided information and formatted for easy reading and editing.