Simple activity indicator for your command line tools.

Minimal CLI Spinner

Example

package main

import (
    "fmt"
    "time"

    "github.com/lucasepe/spinner"
)

func main() {
    fmt.Println("This may take some time:")

    s := spinner.StartNew("Task 1: Processing...")
    time.Sleep(3 * time.Second)
    s.Stop()
    fmt.Println("✓  Task 1: Completed")

    s = spinner.NewSpinner("Task 2: Processing...")
    s.Start()
    s.SetSpeed(100 * time.Millisecond)
    time.Sleep(3 * time.Second)
    s.SetText("About to change spinner shape...")
    time.Sleep(1 * time.Second)

    s.SetCharset([]string{"☱", "☲", "☴"})
    s.SetText(" Shape changed")
    time.Sleep(1 * time.Second)
    s.SetText(" Task 2: Processing...")
    time.Sleep(3 * time.Second)
    s.Stop()

    fmt.Println("✓  Task 2: Completed")
}

Credits

This is a modified version of https://github.com/janeczku/go-spinner.

Owner
Luca Sepe
Software Craftsman [Golang / CLI tools / K8s operators].
Luca Sepe
Similar Resources

Command line tools for creating and compiling JavaScript Minecraft plugins.

@customrealms/cli CustomRealms command-line tools for setting up and compiling JavaScript Minecraft plugins. Installation Install the CLI on your comp

Aug 2, 2022

Command-line tools for the FFS module.

Command-line tools for FFS The blobd tool defines a JSON-RPC service that implements the FFS blob store interface over various underlying key-value st

Dec 14, 2022

Watch your favourite anime using the video player of your choice directly from the command line

anime-cli Watch your favourite anime using the video player of your choice direc

Feb 10, 2022

Package command provide simple API to create modern command-line interface

Package command Package command provide simple API to create modern command-line interface, mainly for lightweight usage, inspired by cobra Usage pack

Jan 16, 2022

Watcher - A simple command line app to watch files in a directory for changes and run a command when files change!

Watcher - Develop your programs easily Watcher watches all the files present in the directory it is run from of the directory that is specified while

Mar 27, 2022

A simple tool which you can use to move through your directories from the command line

Fe What is Fe ? Fe is a simple tool which you can use to move through your direc

Jan 1, 2022

A simple command line functionality to convert your Kaspersky Password Manager exported file to CSV format

A simple command line functionality to convert your Kaspersky Password Manager exported file to CSV format

Apr 20, 2022

Go package to make lightweight ASCII line graph ╭┈╯ in command line apps with no other dependencies.

Go package to make lightweight ASCII line graph ╭┈╯ in command line apps with no other dependencies.

asciigraph Go package to make lightweight ASCII line graphs ╭┈╯. Installation go get github.com/guptarohit/asciigraph Usage Basic graph package main

Jan 8, 2023

git-xargs is a command-line tool (CLI) for making updates across multiple Github repositories with a single command.

git-xargs is a command-line tool (CLI) for making updates across multiple Github repositories with a single command.

Table of contents Introduction Reference Contributing Introduction Overview git-xargs is a command-line tool (CLI) for making updates across multiple

Dec 31, 2022
A command line tool that builds and (re)starts your web application everytime you save a Go or template fileA command line tool that builds and (re)starts your web application everytime you save a Go or template file

# Fresh Fresh is a command line tool that builds and (re)starts your web application everytime you save a Go or template file. If the web framework yo

Nov 22, 2021
Jan 3, 2023
An open-source GitLab command line tool bringing GitLab's cool features to your command line
An open-source GitLab command line tool bringing GitLab's cool features to your command line

GLab is an open source GitLab CLI tool bringing GitLab to your terminal next to where you are already working with git and your code without switching

Dec 30, 2022
wy : a set of command-line tools to test your container-based platform

wy wy (Abbreviation of Would You) is a set of command-line tools to test your container-based platform. ToC: Commands Deployment Monitoring Contributi

Apr 30, 2022
The simple and easy-to-use program designed to watch user activity for Cloud Providers.

Cloud Agent The simple and easy-to-use program is designed to watch user activity and possible orphan clusters for Cloud Providers: Gardener GCP (work

Jun 6, 2022
Inotify-tools is a C library and a set of command-line programs providing a simple interface to inotify.

inotify-tools This is a package of some commandline utilities relating to inotify. The general purpose of this package is to allow inotify's features

Jan 4, 2023
A command line tool to prompt for a value to be included in another command line.

readval is a command line tool which is designed for one specific purpose—to prompt for a value to be included in another command line. readval prints

Dec 22, 2021
Raspberry Pi terminal based activity monitor
Raspberry Pi terminal based activity monitor

pitop Raspberry Pi terminal based activity monitor Yes I know there are plenty of solutions already available, but I wanted to build my own terminal b

Dec 11, 2022
A terminal based graphical activity monitor inspired by gtop and vtop
A terminal based graphical activity monitor inspired by gtop and vtop

NO LONGER MAINTAINED. A maintained fork of gotop exists at https://github.com/xxxserxxx/gotop. Another terminal based graphical activity monitor, insp

Jan 1, 2023
Basic command line example using golang grpc client tools

This is a basic command line interface that demonstrates using the golang GRPC API. The API is reused between dishy and the wifi router, however both

Jan 3, 2023