candycore / candy-kit
PHP port of charmbracelet/fang — opinionated CLI presentation helpers: StatusLine (✓/✗/⚠/ℹ), Banner, Section header, Stage step, HelpText page, and 6 stock themes (ansi/plain/charm/dracula/nord/catppuccin).
v0.2.0
2026-05-07 02:01 UTC
Requires
- php: ^8.1
- sugarcraft/candy-core: @dev
- sugarcraft/candy-sprinkles: @dev
Requires (Dev)
- phpunit/phpunit: ^10.5
This package is not auto-updated.
Last update: 2026-05-08 01:43:30 UTC
README
CandyKit
composer require sugarcraft/candy-kit
PHP port of charmbracelet/fang — opinionated CLI presentation helpers that turn ordinary command- line output into something that matches the rest of the SugarCraft stack. CandyKit is library-only — drop it into any Composer project, no Symfony Console requirement.
use SugarCraft\Kit\StatusLine; use SugarCraft\Kit\Banner; use SugarCraft\Kit\Theme; echo Banner::title('CandyApp', 'v0.1.0'), "\n\n"; echo StatusLine::info('connecting to https://example.com'), "\n"; echo StatusLine::success('done in 0.4s'), "\n"; echo StatusLine::warn('disk almost full'), "\n"; echo StatusLine::error('connection refused'), "\n";
Components
Theme— palette ofSprinkles\Styleobjects keyed by status level (success / error / warn / info / prompt / accent / muted).Theme::ansi()ships a sensible default; bring your own theme by passing styles to the constructor.StatusLine—success/error/warn/infostatic helpers returning a glyph + message string styled per the active theme.Banner— render a bordered title block with optional subtitle, rounded by default. Useful for app intros /--versionoutput.
Test
cd candy-kit && composer install && vendor/bin/phpunit
