DEV Community

Swastik Baranwal
Swastik Baranwal

Posted on • Updated on

Box CLI Maker

Box CLI Maker

Make Highly Customized Boxes for your CLI

Features

  • Make terminal box in 8๏ธโƒฃ inbuilt different style
  • Custom Title Positions
  • Make your own Box style ๐Ÿ“ฆ
  • Unicode and Emoji Support ๐Ÿ˜‹
  • Color Support ๐ŸŽจ
  • Align the text according to the need
  • Written in ๐Ÿ‡ฌ ๐Ÿ‡ด

Demo Link

It's a library so you can install it via Go

go get github.com/Delta456/box-cli-maker
Enter fullscreen mode Exit fullscreen mode

Link to Code

GitHub logo Delta456 / box-cli-maker

Make Highly Customized Boxes for CLI


logo



Go Reference godocs.io CI Go Report Card GolangCI GitHub release Mentioned in Awesome Go

Features

  • Make a Terminal Box in 8๏ธโƒฃ inbuilt different styles
  • 16 Inbuilt Colors and True Color Support ๐ŸŽจ
  • Custom Title Positions ๐Ÿ“
  • Make your Terminal Box style ๐Ÿ“ฆ
  • Support for ANSI, Tabbed, Multi-line and Line Wrapping boxes ๐Ÿ“‘
  • Align the text according to your needs ๐Ÿ“
  • Unicode, Emoji and Windows Console Support ๐Ÿ˜‹
  • Written in ๐Ÿ‡ฌ ๐Ÿ‡ด

Installation

 go get github.com/Delta456/box-cli-maker/v2

Usage Tutorial

In main.go

package main
import "github.com/Delta456/box-cli-maker/v2"

func main() {
 Box := box.New(box.Config{Px: 2, Py: 5, Type: "Single", Color: "Cyan"})
 Box.Print("Box CLI Maker", "Highly Customized Terminal Box Maker")
}
Enter fullscreen mode Exit fullscreen mode

box.New(config Config) takes Box Config and returns a Box from the given Config.

  • Parameters
    • Px : Horizontal Padding
    • Py : Vertical Padding
    • ContentAlign : Content Alignment inside Box i.e. Center, Left and Right
    • Type: Boxโ€ฆ

How I built it

Using Go, VSCode, Terminal etc...

What I learned

  • Go Packages work
  • Semantic Versioning
  • GitHub Releases
  • Updating and Optimizing my code
  • Making documentation of my code
  • much more....

Additional Thoughts / Feelings / Stories

This is my first library that I have ever written!!

Top comments (1)

Collapse
 
gunjanmishra profile image
Gunjan Mishra

Tmrw, I am attending OCD's hurdles meet-up and I am hoping to receive some of BOX CLI MAKER stickers as a memento.