wazum / composer-fanfare
Display a colored ASCII banner after composer install/update.
Package info
github.com/wazum/composer-fanfare
Type:composer-plugin
pkg:composer/wazum/composer-fanfare
Requires
- php: >=8.2
- composer-plugin-api: ^2.0
- ext-mbstring: *
Requires (Dev)
- composer/composer: ^2.6
- ergebnis/composer-normalize: ^2.45
- friendsofphp/php-cs-fixer: ^3.65
- infection/infection: ^0.29
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^11.0
This package is auto-updated.
Last update: 2026-05-11 09:38:18 UTC
README
Display a colored ASCII banner after composer install / composer update.
Every composer install ends the same boring way: autoload files generated, then silence.
composer-fanfare replaces that with a project-specific full-stop — a colored ASCII banner that confirms which project just finished and lets you convey your own message: "Made with ❤️ by the maintainers".
Useful when you're proud of your work, juggle multiple repos, or just want a little fun after the thousandth composer install.
Stays respectful: silent in CI, plain in non-TTY shells, suppressed under --quiet.
Install
composer require wazum/composer-fanfare
Important
Composer 2.2+ asks for plugin approval on first run. Interactive shells prompt you; in CI or non-interactive setups, allow it explicitly:
composer config allow-plugins.wazum/composer-fanfare true
Configure
Drop a plain-text template anywhere in your project (e.g. art/banner.txt) and reference it from composer.json:
{
"extra": {
"fanfare": {
"template": "art/banner.txt",
"colors": "sunset"
}
}
}
template— path to the template, relative to the project root.colors— one of:- a hex string (
"#ff6ec7") - an array of hex stops (
["#ff6ec7", "#7873f5"]) — colors interpolate smoothly between stops - a preset name:
aurora,catppuccin,doom,dracula,fire,gruvbox,iceberg,matrix,monokai,nord,ocean,pride,solarized,sunset,synthwave "random"— picks a random preset on each install/update- omit for plain output
- a hex string (
direction— controls how the gradient flows:"vertical"(default) — one color per line, top to bottom"horizontal"— color per character, left to right (whitespace stays uncolored)"diagonal"— flows top-left to bottom-right across the whole banner
transform— optional palette transform applied after color resolution:"reverse"— reverses the stop order (e.g.sunsetreversed → sunrise)
animation— optional reveal animation:"typewriter"— types each visible character with a small per-character delay"shimmer"— slides the gradient across the banner; vertical/horizontal rotate the static colors, diagonal does a smooth phase shift across the whole plane"drip"— reveals cells in random order in small bursts, like raindrops landing on the banner- omit for an instant render. Skipped automatically in non-TTY / non-decorated terminals.
footer—true(default) prints a dim line below the banner with project name + version, PHP version, and locked package count. Set tofalseto hide.
Note
The banner falls back to plain text when NO_COLOR is set or output isn't a TTY. Composer's --quiet mode suppresses it entirely via the IO layer. If any banner line is wider than the current terminal, the banner is skipped silently to avoid wrapping artefacts.
Disabling
Skip the banner for a single run by setting COMPOSER_FANFARE=0 inline:
COMPOSER_FANFARE=0 composer install
Or disable it globally for the current shell or CI environment:
export COMPOSER_FANFARE=0
Setting values from the CLI
If you'd rather not hand-edit composer.json, every key can be set with composer config:
composer config extra.fanfare.template art/banner.txt composer config extra.fanfare.colors synthwave composer config extra.fanfare.direction diagonal composer config extra.fanfare.transform reverse
Booleans and arrays need --json so the value is stored with the right type:
composer config --json extra.fanfare.colors '["#ff6ec7","#7873f5"]' composer config --json extra.fanfare.footer false
Remove a key with --unset:
composer config --unset extra.fanfare.transform
Color depth
Truecolor escapes are emitted by default. The renderer downgrades automatically based on COLORTERM and TERM:
| Detected support | Trigger | Output |
|---|---|---|
| 24-bit | COLORTERM=truecolor / 24bit, or any modern terminal |
\033[38;2;R;G;Bm |
| 256-color | TERM matching *-256color |
\033[38;5;Nm (xterm 6×6×6 cube + 24-step grayscale ramp) |
| 16-color | TERM=ansi / vt100 / linux |
nearest-neighbor mapping to the standard ANSI palette |
| Plain | NO_COLOR=1, TERM=dumb, or non-TTY |
banner content rendered without escapes |
Preset gallery
plain![]() |
aurora![]() |
catppuccin![]() |
doom![]() |
dracula![]() |
fire![]() |
gruvbox![]() |
iceberg![]() |
matrix![]() |
monokai![]() |
nord![]() |
ocean![]() |
pride![]() |
solarized![]() |
sunset![]() |
synthwave![]() |
Preview
Pick a preset without running an install:
composer fanfare:preview --gallery # render every preset composer fanfare:preview --preset=fire # render just one composer fanfare:preview --preset # list preset names composer fanfare:preview --gallery --direction=diagonal --transform=reverse # combine
--direction and --transform accept the same values as the matching extra.fanfare keys. The preview uses your project's configured extra.fanfare.template if there is one, otherwise it falls back to a small built-in banner.
Creating a template
The template is any plain-text file. For large ASCII letters from a word, the classic tool is figlet:
brew install figlet # macOS sudo apt-get install -y figlet # Debian / Ubuntu figlet -f standard "your project" > art/banner.txt
Try other fonts with -f slant, -f big, -f small, etc.; figlist lists what's installed. Prefer a browser? patorjk.com/software/taag is a popular generator with the same fonts.
Another option is toilet, which offers its own font set and can be useful for compact banner styles:
brew install toilet # macOS sudo apt-get install -y toilet # Debian / Ubuntu toilet -f pagga "composer-fanfare" > art/banner.txt
Note
Banner output relies on the font your terminal renders monospaced text in. Block-shading glyphs (█▀▄░ from pagga/smblock/block) and box-drawing glyphs (┏━┓┃ from future/emboss) are covered by every modern terminal font (JetBrains Mono, Fira Code, Cascadia, Hack, Menlo). Sparser ranges like braille (⡠⢀⣀ from smbraille) are not — if a glyph shows up as □, switch to a font with wider Unicode coverage (DejaVu Sans Mono, Cascadia Code, Iosevka).
License
MIT.
Footnotes
-
The company names, project names, and email addresses shown in the demo (Atelier Prime, harbor sync, Neon District, meridian labs, lumen forge, etc.) are fictional — invented to illustrate the kind of personal banner you might write for your own project. ↩
















