Skip to content

Releases: box-cli-maker/box-cli-maker

v3.0.0

09 Feb 11:02
4291f90

Choose a tag to compare

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/v3

Resources

Acknowledgements

This release wouldn't have been possible without @meowgorithm, @nedpals, @dipankardas011, @Taz03 and @Gaurav-Gosain's help and guidance

v2.4.0

09 Feb 10:38

Choose a tag to compare

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/v3

See 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

30 Oct 10:48
56c819b

Choose a tag to compare

Changelog

  • Addition of TitleColor and ContentColor
  • ANSI Codes for Title and Content Enabled (Thanks to @tkanos for partial code)
  • Tabbable Title Lines
  • Add the ability to manually wrap Content via AllowWrapping and WrappingLimit
  • Several simplifications and fixes in README.md (Thanks to @JalonSolov)
  • Fix ANSICON detection 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

24 Aug 05:36

Choose a tag to compare

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

27 Dec 10:10

Choose a tag to compare

Changelog:

  • Added detection support for ConEmu and ANSICON.
  • Bump gookit/color to the latest version for color rounding off logic and Windows fixes.
  • README.md changes for more clarification.
  • Added badge and link for godocs.io.

v2.2.0

05 Dec 11:05
02f7563

Choose a tag to compare

This release adds:

  • 256 Color and True Color support and enabler for Windows Console 🎨
  • White and HiWhite as 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.Output for Windows 😄
  • Major Code Cleanup 🤯
  • More comments for better understanding of the CodeBase 😋
  • Doc improvements 🙂

v2.1.1

11 Nov 05:26

Choose a tag to compare

  • Fix doc.go

v2.1.0

10 Nov 08:14

Choose a tag to compare

  • Fix #16
  • Fix redundant warning for Inside as TitlePos
  • doc.go support on pkg.go.dev
  • Simplify README.md
  • Remove extra lines from source code

v2.0.1

09 Nov 06:54

Choose a tag to compare

This is bump release for it to update on pkg.go.dev. It's not mandatory to update your module to this version.

v2.0.0

09 Nov 06:33
71cdd12

Choose a tag to compare

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 TitlePos provided then use the default position i.e. Inside
  • Fix vertical alignment for multi line strings (#13)
  • Make Single Style as Default if Style isn't provided
  • Added support for tab lines
  • doc.go for documentation on pkg.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.mod file to v2