Project

starlined

0.0
No release in over 3 years
Terminal output utilities with animated progress indicators
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 2.0
~> 13.0
~> 3.0
~> 1.0
~> 0.21

Runtime

>= 0.8
 Project Readme

starlined 🌟

terminal output gem with animated stars, colored messages, and progress tracking.

install

gem 'starlined'

usage

basic messages

require 'starlined'
include Starlined::Messages

info "Starting deployment"
warn "Config file missing"
error "Connection failed"
success "Build complete", 3.5  # with elapsed time

run with animation (sequentially)

runner = Starlined::Runner.new
runner.start("Installing deps", steps: 3)

runner.run("bundle install", aka: "bundler")
runner.run("npm install", aka: "npm")
runner.run("rake db:migrate", aka: "database")

runner.stop

The aka parameter shows what's currently running in the animation.

run in parallel

runner = Starlined::Runner.new
runner.start("Running tests", steps: 3)

threads = []
threads << Thread.new { runner.run("rspec spec/models") }
threads << Thread.new { runner.run("rspec spec/controllers") }
threads << Thread.new { runner.run("rspec spec/features") }
threads.each(&:join)

runner.stop

animation manipulation/control

animation = Starlined::Animation.new("Processing", steps: 100)
animation.start

100.times do |i|
  # do work
  animation.increment_step
  animation.add_alias("file_#{i}.txt")
  sleep 0.1
  animation.remove_alias("file_#{i}.txt")
end

animation.stop

custom configuration

Starlined.configure do |config|
  config.verbose = true         # show verbose messages
  config.sleep_time = 0.5      # animation speed
  config.msg_ljust = 40        # message padding
end

license

CC-NC-BY-4.0, open-sourced from okticket