Releases: box-cli-maker/box-cli-maker
v3.0.0
Box CLI Maker v3.0.0
Box CLI Maker v3 introduces a modern, fluent API and moves to the box-cli-maker organisation!
What's New
Module path: github.com/box-cli-maker/box-cli-maker/v3
Fluent, Chainable API
b := box.NewBox().
Style(box.Single).
Padding(2, 1).
TitlePosition(box.Top).
ContentAlign(box.Center).
Color(box.Cyan).
TitleColor(box.BrightYellow)
fmt.Println(b.MustRender("Box CLI Maker", "Render highly customizable boxes\n in the terminal"))Key Highlights
- Fluent API - Clean method chaining replaces struct-based configuration
- Type safety - Compile-time constants (
box.Single,box.Center) instead of strings - New Block style - 9 built-in styles including solid block characters
- Better error handling -
Render()returns errors,MustRender()panics on error - Box copying -
.Copy()method for creating derived configurations - Enhanced colors - Support for ANSI names,
#RGB,#RRGGBB, and XParseColor formats - Custom glyphs - Individual setters for each border element
- Active maintenance - Ongoing development under new organization
Breaking Changes
This is a major version with breaking changes from v2:
| v2 | v3 |
|---|---|
box.New(box.Config{...}) |
box.NewBox().Style(...).Padding(...) |
Type: "Single" |
.Style(box.Single) |
b.String("Title", "Content") |
b.MustRender("Title", "Content") |
b.Print(), b.Println() |
fmt.Println(b.MustRender(...)) |
See the Migration Guide for complete upgrade instructions.
Installation
go get github.com/box-cli-maker/box-cli-maker/v3Resources
- Migration Guide - Step-by-step upgrade instructions
- API Documentation
- Examples - Sample code for all features and usages
Acknowledgements
This release wouldn't have been possible without @meowgorithm, @nedpals, @dipankardas011, @Taz03 and @Gaurav-Gosain's help and guidance
v2.4.0
v2.4.0 - Deprecation Notice
This is the final v2 release. v2 is now deprecated in favor of v3.
Changed
- Deprecated v2 module - Added official deprecation notice pointing to v3
- Updated README - Added deprecation warning with migration information
Migration
v2 will continue to work, but will receive no further updates. Please migrate to v3:
New module path: github.com/box-cli-maker/box-cli-maker/v3
go get github.com/box-cli-maker/box-cli-maker/v3See the v3 Migration Guide for upgrade instructions.
Why Migrate to v3?
- Modern, fluent API with method chaining
- Type-safe constants instead of strings
- Better error handling
- New features and active development
- New organization:
github.com/box-cli-maker/box-cli-maker
v2.3.0
Changelog
- Addition of
TitleColorandContentColor - ANSI Codes for Title and Content Enabled (Thanks to @tkanos for partial code)
- Tabbable Title Lines
- Add the ability to manually wrap
ContentviaAllowWrappingandWrappingLimit - Several simplifications and fixes in
README.md(Thanks to @JalonSolov) - Fix
ANSICONdetection check (Thanks to @muesli) - Add examples in the
examples/folder - Add new screenshots of Boxes and badges in
README.md - More documentation of code
- Add logo (Made by @KunalRaghav)
v2.2.2
Changelog
- Add additional checks for Mac OS as it doesn't have
/proc/folder. Thanks to @sharifelgamal for the fix! - Update vocabulary in almost all files
- Optimization of WSL check
v2.2.1
v2.2.0
This release adds:
- 256 Color and True Color support and enabler for Windows Console 🎨
WhiteandHiWhiteas inbuilt colors 🎨- Terminal detection for Unix and Windows System and also for rounding off True Color into 4 bit or 8 bit as max supported by the terminal. 💻
- Deprecates
box.Outputfor Windows 😄 - Major Code Cleanup 🤯
- More comments for better understanding of the CodeBase 😋
- Doc improvements 🙂
v2.1.1
v2.1.0
v2.0.1
v2.0.0
This is a major rewrite release, It is recommended to update the pre-existing versions to ^v2.0.0.
- Use struct embedding to make the code cleaner
- Custom Color support via RGB (
[]uint) and Hex (uint) - Added support for Windows Console
- Optimized code
- Optimized
toString()method - Added a warning for invalid
TitlePosprovided then use the default position i.e.Inside - Fix vertical alignment for multi line strings (#13)
- Make
SingleStyle as Default if Style isn't provided - Added support for tab lines
doc.gofor documentation onpkg.go.dev- Added tests
- Fixed a bug when the alignment was given empty but still the error was reported
- Added more comments for making the code more readable
- Updated
go.modfile tov2
