Skip to content

sugarcraft/candy-kit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

candy-kit

CandyKit

CI codecov Packagist Version License PHP

demo

PHP port of charmbracelet/fang β€” opinionated CLI presentation helpers that turn ordinary command- line output into something that matches the rest of the CandyCore stack. CandyKit is library-only β€” drop it into any Composer project, no Symfony Console requirement.

use CandyCore\Kit\StatusLine;
use CandyCore\Kit\Banner;
use CandyCore\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 of Sprinkles\Style objects 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 / info static 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 / --version output.

Test

cd candy-kit && composer install && vendor/bin/phpunit

About

🎁 PHP port of πŸŽͺ fang β€” CLI presentation helpers: StatusLine βœ“βœ—βš β„Ή, Banner, Section, Stage step, HelpText & 6 stock themes.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages