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 your CLI

Box CLI Maker πŸ“¦

Box CLI Maker is a Highly Customized Terminal Box Creator

go.dev reference godocs.io CI Go Report Card GolangCI GitHub release Mentioned in Awesome Go

Features

  • Make Terminal Box in 8️⃣ inbuilt different styles
  • 16 Inbuilt Colors and True Color Support 🎨
  • Custom Title Positions
  • Make your own Terminal Box style πŸ“¦
  • Align the text according to the need
  • Unicode, Emoji and Windows Console Support πŸ˜‹
  • Written in πŸ‡¬ πŸ‡΄

Installation

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

Usage

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) accepts a Config struct with following parameters and returns a Box struct.

  • Parameters
    • Px : Horizontal Padding
    • Py : Vertical Padding
    • ContentAlign : Align the content inside the Box i.e. Center, Left and…

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!!

Discussion (0)