sl logo

sl sl

Use this command to install sl:
winget install --id=ScaryRawr.SL -e

Prints a steam locomotive if you type sl instead of ls

sl is a command-line utility designed to replace the standard 'ls' command with an engaging steam locomotive animation. When you type 'sl', it displays a moving train across your terminal window, providing a fun alternative to the usual file listing.

Key Features:

  • Accident Mode (-a): Simulates an accident scenario where people cry for help.
  • Fly Mode (-F): Makes the train fly like the Galaxy Express 999.
  • Custom Train Types (-c): Allows selection of different locomotive designs, such as C51 instead of D51.
  • Piping Support: Enables integration with other commands to display messages on the train cars.

Audience & Benefit: Ideal for developers and terminal users who frequently mistype 'ls' as 'sl'. It transforms an accidental typo into a delightful experience, enhancing productivity by turning potential frustration into entertainment. Additionally, it supports embedding in web pages, allowing creative use beyond the command line.

Installable via winget on Windows, this tool adds a playful touch to your workflow without compromising functionality.

README

SL(1): Cure your bad habit of mistyping

SL (Steam Locomotive) runs across your terminal when you type "sl" as you meant to type "ls". It's just a joke command.

Copyright 1993,1998,2014 Toyoda Masashi ()

Terminal Demo

Usage

Usage: sl [OPTIONS]

Options:
  -a, --accident  An accident is occurring. People cry for help. Lists all files
  -l, --logo      Little version
  -F, --fly       It flies like the galaxy express 999
  -c, --c51       C51 appears instead of D51
  -f, --files     Disables listing files and directories
  -h, --help      Print help
  -V, --version   Print version

Piping

SL supports piping contents into it for printing things to the train car.

echo "Hello\nworld!" | sl

You can also pipe long/slow (only so slow though, if the train finishes before it gets a new line things are boring) running processes into it:

# Print package names as they are built as train cars!
cargo build 2>&1 | awk -F' ' '/Compiling/ {print $2}' | sl

Embed

You can embed the SL terminal in your own pages using query parameters:

https://scaryrawr.github.io/sl/#embed?accident=true&fly=false&smoke=true&trainType=d51&messages=["hello","world"]

Supported query parameters:

  • accident: true or false
  • fly: true or false
  • smoke: true or false
  • trainType: d51, c51, or logo
  • messages: URL encoded JSON array of messages

Installation

macOS and x64 Linux

Using homebrew:

brew install scaryrawr/formulae/sl

Fedora Linux

Using copr:

sudo dnf copr enable scaryrawr/sl
sudo dnf install sl

Windows

Download the latest release or using winget (winget may be a few versions behind):

winget install scaryrawr.sl
# Override sl alias which was (Set-Location)
echo 'Set-Alias -Name sl -Value "C:\Program Files\sl\bin\sl.exe" -Force' >> $profile
Set-Alias -Name sl -Value "C:\Program Files\sl\bin\sl.exe" -Force

Using cargo:

cargo install --git https://github.com/scaryrawr/sl
Versions
6.1.5
6.0.0
5.06.0
Website
License