← Retour aux projets
Banners Cli
#Banners CLI
CLI tool to generate banner images using the beyondcode/banners service. Configure default parameters and generate banners with a single command.
#Requirements
- PHP >= 8.2
#Installation
#Download PHAR (recommended)
Download the latest banners.phar from the Releases page:
# Download and make executable curl -sL https://github.com/jeffersongoncalves/banners-cli/releases/latest/download/banners.phar -o banners chmod +x banners sudo mv banners /usr/local/bin/banners
#Via Composer (global)
composer global require jeffersongoncalves/banners-cli
#Usage
#Generate a banner
banners banner:generate "My Project" ./banner.png
#With options
banners banner:generate "My Project" ./banner.png \ --theme=dark \ --style=style_2 \ --pattern=texture \ --fontSize=72px \ --packageManager="composer require" \ --packageName="vendor/package" \ --description="A great PHP package" \ --md \ --showWatermark \ --fileType=png
#Available options
| Option | Values | Default |
|---|---|---|
--theme |
light, dark |
light |
--style |
style_1, style_2 |
style_1 |
--pattern |
90+ hero-patterns (e.g. texture, topography, circuitBoard) |
circuitBoard |
--fontSize |
CSS size (e.g. 96px, 72px) |
96px |
--packageManager |
Any text | (empty) |
--packageName |
Any text | (empty) |
--description |
Any text | (empty) |
--md |
Flag (enable markdown) | false |
--showWatermark |
Flag | false |
--images |
Image URL or heroicon name | (empty) |
--fileType |
png, jpeg |
png |
#Configuration
Save default values so you don't have to pass them every time.
#Interactive wizard
banners config:init
The wizard configures: theme, style, pattern, fontSize, markdown rendering, watermark, and file type.
#Set individual values
banners config:set theme dark banners config:set pattern texture banners config:set fontSize 72px banners config:set md true banners config:set showWatermark true
#View current config
banners config:show
Configuration is stored in ~/.banners-cli/config.json. Command-line options always override config values.
#Development
# Clone git clone git@github.com:jeffersongoncalves/banners-cli.git cd banners-cli # Install dependencies composer install # Run tests composer test # Run code formatting composer lint # Build PHAR composer build
#License
Banners CLI is open-source software licensed under the MIT license.