#ascii-art #shell #command-line-interface #cmd #linux #system-information

app batcave

the Batcave Terminal, a mysterious and powerful command-line interface inspired by the Dark Knight's lair

10 releases (5 breaking)

new 0.7.4 Oct 28, 2024
0.7.3 Oct 28, 2024
0.6.0 Oct 12, 2024
0.5.0 Oct 12, 2024
0.1.0 Oct 4, 2024

#146 in Filesystem

Download history 299/week @ 2024-09-29 137/week @ 2024-10-06 85/week @ 2024-10-13 397/week @ 2024-10-20 281/week @ 2024-10-27

1,028 downloads per month

MIT license

51KB
1K SLoC

The Batcave Terminal

Batcave entrance

Welcome to the Batcave Terminal. This Rust-based terminal emulator provides a unique, Batman-themed experience while offering essential file system navigation and manipulation capabilities. If you are looking for something different and refreshing, this is the right terminal for you.

Features

Batcave entrance

  • 🦇 Bat-signal inspired ASCII art banner (may or may not summon Batman)
  • 🖤 Dark Knight theme
  • 📁 File system operations
  • 📝 Command logging
  • 🎯 Advanced shell management with pushd/popd navigation
  • ⚡ System information display
  • 🔧 Customizable configuration through .batcaverc

Installation

To install and activate the Terminal on your computer, follow these steps:

You can install it from cargo by running:

cargo install batcave

Or clone the repository:

git clone https://github.com/ThembinkosiThemba/batcave.git
cd batcave
cargo build --release
cargo run --release

Usage

Once you've launched the Batcave Terminal, you'll be greeted with a bat-tastic ASCII art and a prompt that would make Commissioner Gordon jealous. Here are the available commands to fight crime (or just manage your files):

System Information

  • sys on: Enable system information display at startup
  • sys off: Disable system information display
  • sys status: Check current system information display settings
  • info: Display system information on demand

Basic Commands

  • cd [directory]: Swoop into a new directory
  • pwd: Reveal your current Bat-location
  • ls [directory]: Shine the Bat-light on directory contents
  • mkdir [directory_name]: Construct a new Bat-cave (directory)
  • rm [file_or_directory]: Dispatch a file or directory to Arkham Asylum
  • touch [file_name]: Leave your Bat-mark on a new file
  • echo [message]: Broadcast a message to all of Gotham (or just your terminal)
  • exit: Hang up the cape and cowl (exit the Batcave Terminal)

Shell Management

  • pushd [directory]: Store your current location and move to a new directory (like setting a waypoint)
  • popd: Return to your previously stored location (tactical retreat)
  • jobs: Monitor your active processes (keep tabs on Gotham's activity)
  • history: Review your past commands (because Batman always learns from experience)
  • alias: Create command shortcuts (because even Batman needs efficiency)

Configuration: The .batcaverc File

The Batcave Terminal comes with a powerful configuration system, managed through the .batcaverc file in your home directory. This file is automatically created during first launch with sensible defaults, but you can customize it to your heart's content.

Example .batcaverc configuration:

# Batcave Shell Configuration

# Default aliases for quick crime-fighting
alias ll="ls -la"
alias cls="clear"
alias gst="git status"
alias gco="git checkout"
alias gaa="git add ."

# Environment variables
export PATH="$HOME/.cargo/bin:$PATH"
export EDITOR="vim"
export TERM="xterm-256color"

# Custom prompt settings
export PS1="🦇 \w> "

# System information display preference
export SHOW_SYSTEM_INFO="true"

Shell Management Features

The Batcave Terminal includes advanced shell management capabilities that would make even Lucius Fox proud:

  • Directory Stack: Use pushd and popd to maintain a stack of directories, perfect for quick navigation between multiple locations in your crime-fighting duties.
  • Command History: Maintains a history of your last 1000 commands, accessible through the history command.
  • Command Timing: Automatically tracks and displays execution time for commands that take longer than expected.
  • Environment Variables: Manage your shell environment with export commands, all persistently stored in your .batcaverc.

System Information Display

The Batcave Terminal can display detailed system information at startup, providing you with crucial intelligence about your computer:

  • CPU usage and specifications
  • Memory utilization
  • Disk space statistics
  • Network interfaces
  • Operating system details

Control this feature with:

sys on     # Enable system information display
sys off    # Disable system information display
sys status # Check current setting

Customization

Feel free to modify the ASCII art, colors, or add new commands to make the Batcave Terminal your own. The main logic is contained in src/main.rs. Remember, Batman works alone, but he's not opposed to a little help from his friends.

Contributing

Contributions to the Batcave Terminal are welcome! Simple open a PR and those change will be implemented.

License

This project is licensed under the "Wayne Enterprises Open Source Initiative" License - see the LICENSE file for details. (It's actually just the MIT License, but I think this name sounds cooler.)

Acknowledgments

  • Inspired by the Caped Crusader himself and The Drive to Stop Bane
  • Built with Rust, forged in the shadows of Gotham
  • Tested on systems from the Batcave to the Justice League Watchtower

Remember, it's not who you are underneath, it's what you type on the command line that defines you. Use the Batcave Terminal wisely, and may it serve you well in your coding adventures!

"Why do we fall? So we can learn to pick ourselves up." - Alfred Pennyworth (and also applicable to debugging)

Dependencies

~8–20MB
~247K SLoC