A minimal, customizable command-line shell written in Rust โ with features like aliases, environment management, history, prompt customization, and fun facts about Rust on startup. ๐ง โจ
- ๐ก Random Rust fun fact on launch
- ๐ง Alias support (with save/load functionality)
- ๐
cd,lsand environment variable handling (setenv,getenv) - ๐งพ Shell history (auto-saved)
- ๐งฐ Runs system commands cross-platform (Windows/Linux/macOS)
- ๐ง Git branch detection in prompt (if inside a repo)
- โจ Colored directory listing (on Unix)
- ๐ Built-in commands like
help,whoami-shell,shellinfo - ๐จ Custom prompt symbol with
setprompt
- Rust (with
cargo) - Git (optional, for branch detection)
- Build tools (for your OS)
git clone https://github.com/yourusername/rust-shell.git
cd rust-shell
cargo build --releasecargo runOr run the compiled executable:
./target/release/rust-shellYou can run commands just like in a regular shell:
> ls
> cd my_folder
> setenv NAME Rustacean
> getenv NAME
> alias gs=git status
> gs| Command | Description |
|---|---|
ls |
Lists directory contents (color-coded) |
cd <dir> |
Changes directory |
setenv VAR VAL |
Sets an environment variable |
getenv VAR |
Gets an environment variable |
alias a=b |
Creates an alias |
save-aliases |
Saves aliases to aliases.txt |
load-aliases |
Loads aliases from aliases.txt |
setprompt <sym> |
Sets custom prompt symbol |
shellinfo |
Displays system and shell info |
whoami-shell |
Prints shell identity |
help |
Lists available commands |
exit |
Exits the shell |
src/main.rs- Main source codealiases.txt- Saved aliaseshistory.txt- Shell history
* Welcome to your custom Rust Shell! *
Fun fact: Rust was voted the 'most loved programming language' on Stack Overflow for 7 years in a row!(Optional: You can add a screenshot of the terminal interface here)
This project is licensed under the MIT License.
Pull requests are welcome! Feel free to open issues or feature requests.
Built with โค๏ธ and rustyline, git2, sysinfo, and pure Rust magic.