Skip to content

slTrain is a fun and nostalgic Python script inspired by the classic sl steam locomotive command. This script animates a charming steam locomotive chugging across your terminal, complete with a dynamic smoke trail and colorful ASCII art. It's perfect for adding a bit of old-school charm to your terminal sessions.

License

Notifications You must be signed in to change notification settings

developtheweb/slTrain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš‚ sl - Steam Locomotive

GitHub stars GitHub forks License: MIT Python Platform Maintained Website

A joke command that displays an animated steam locomotive in your terminal when you accidentally type 'sl' instead of 'ls'.

      ====        ________                ___________
  _D _|  |_______/        \__I_I_____===__|_________|
   |(_)---  |   H\________/ |   |        =|___ ___|  
   /     |  |   H  |  |     |   |         ||_| |_||  
  |      |  |   H  |__--------------------| [___] |  
  | ________|___H__/__|_____/[][]~\_______|       |  
  |/ |   |-----------I_____I [][] []  D   |=======|__
__/ =| o |=-~~\  /~~\  /~~\  /~~\ ____Y___________|__
 |/-=|___|=    ||    ||    ||    |_____/~\___/       
  \_/      \O=====O=====O=====O_/      \_/           

πŸŽ₯ Demo

sl command demo

Watch the train cross your terminal when you mistype!

✨ Features

  • πŸš‚ Multiple train types - Classic, D51, and C51 locomotives
  • ✈️ Flying mode - Make the train fly across the sky (-F)
  • πŸ’₯ Accident mode - Watch a dramatic crash (-a)
  • 🎨 Colorful ASCII art - Beautiful colored trains with dynamic smoke
  • ⚑ Adjustable speed - Control animation speed
  • πŸ“ Terminal-aware - Handles terminal resizing gracefully
  • πŸ›‘οΈ Clean exit - Proper cleanup and Ctrl+C handling
  • πŸͺΆ Lightweight - No external dependencies, pure Python

πŸ“¦ Installation

Quick Install (Recommended)

# Clone the repository
git clone https://github.com/developtheweb/slTrain.git
cd slTrain

# Install to /usr/local/bin
sudo make install

Platform-Specific Instructions

🐧 Linux
# Debian/Ubuntu
git clone https://github.com/developtheweb/slTrain.git
cd slTrain
sudo make install

# Arch Linux (AUR)
# Coming soon!

# Manual install
sudo cp sl /usr/local/bin/
sudo chmod +x /usr/local/bin/sl
🍎 macOS
# Using Homebrew (coming soon)
# brew install sl

# Manual install
git clone https://github.com/developtheweb/slTrain.git
cd slTrain
sudo make install
🐳 Docker
# Run without installing
docker run --rm -it ghcr.io/developtheweb/sl:latest

# Alias for easy use
alias sl='docker run --rm -it ghcr.io/developtheweb/sl:latest'

Uninstall

sudo make uninstall
# or
sudo rm /usr/local/bin/sl

πŸš€ Usage

Simply type sl instead of ls:

$ sl              # Classic train
$ sl -F           # Flying train
$ sl -a           # Train accident
$ sl -c           # C51 train type
$ sl -l           # Long train (D51)
$ sl -s 2.0       # Double speed
$ sl --help       # Show help

Options

Option Long Form Description
-a --accident An accident occurs partway through
-F --fly Make the train fly through the sky
-l --long Use a longer train (D51)
-c --C51 Use the C51 train type
-s --speed Animation speed multiplier (default: 1.0)
-v --version Show version information
-h --help Show help message

πŸ€” Why sl?

We've all done it - typed sl when we meant ls. Instead of getting an error, why not get a gentle reminder in the form of a steam locomotive chugging across your terminal?

Benefits:

  • πŸ“š Learn to type more carefully - Muscle memory training through humor
  • πŸ˜„ Add whimsy to your command line - Because terminals can be fun too
  • 🎭 Surprise your coworkers - Watch their confusion turn to delight
  • 🧘 Take a brief mental break - Sometimes you need a train break

πŸ“‹ Requirements

  • Python 3.6 or higher
  • Unix-like terminal with ANSI escape code support
  • A sense of humor πŸ˜„

🀝 Contributing

We love contributions! Please see our Contributing Guidelines for details.

Quick Start for Contributors

# Fork and clone the repository
git clone https://github.com/YOUR_USERNAME/slTrain.git
cd slTrain

# Create a feature branch
git checkout -b feature/amazing-feature

# Make your changes and test
./sl -F  # Test your changes

# Commit and push
git commit -m "Add amazing feature"
git push origin feature/amazing-feature

πŸ’– Support the Project

If you enjoy sl, consider supporting the development:

  • ⭐ Star this repository - It helps others discover the project
  • πŸ› Report bugs - Help us improve by reporting issues
  • πŸ’‘ Suggest features - Share your ideas for new train types or animations
  • 🌐 Visit my website - Learn more at StevenMilanese.com
  • β˜• Buy me a coffee - Support development at StevenMilanese.com/support

πŸ”’ Security

Found a security issue? Please see our Security Policy for responsible disclosure.

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘¨β€πŸ’» Author

Reverend Steven Milanese

πŸ™ Acknowledgments

  • Inspired by the original sl command by Toyoda Masashi
  • ASCII art trains adapted from various sources
  • Thanks to all contributors who have helped improve this project
  • Special thanks to the first stargazer who inspired this update! ⭐

πŸ“Š Project Stats

GitHub commit activity GitHub last commit GitHub code size


Remember: It's not a bug, it's a feature! πŸš‚

Made with ❀️ by Reverend Steven Milanese
Visit StevenMilanese.com for more projects

About

slTrain is a fun and nostalgic Python script inspired by the classic sl steam locomotive command. This script animates a charming steam locomotive chugging across your terminal, complete with a dynamic smoke trail and colorful ASCII art. It's perfect for adding a bit of old-school charm to your terminal sessions.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published