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_/ \_/
Watch the train cross your terminal when you mistype!
- π 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
# Clone the repository
git clone https://github.com/developtheweb/slTrain.git
cd slTrain
# Install to /usr/local/bin
sudo make install
π§ 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'
sudo make uninstall
# or
sudo rm /usr/local/bin/sl
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
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 |
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?
- π 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
- Python 3.6 or higher
- Unix-like terminal with ANSI escape code support
- A sense of humor π
We love contributions! Please see our Contributing Guidelines for details.
# 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
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
Found a security issue? Please see our Security Policy for responsible disclosure.
This project is licensed under the MIT License - see the LICENSE file for details.
Reverend Steven Milanese
- π Website: StevenMilanese.com
- π§ Email: contact@stevenmilanese.com
- π GitHub: @developtheweb
- πΌ LinkedIn: Connect with me
- 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! β
Remember: It's not a bug, it's a feature! π
Made with β€οΈ by Reverend Steven Milanese
Visit StevenMilanese.com for more projects