DEV Community

Swastik Baranwal
Swastik Baranwal

Posted on • Edited 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.