An open API service indexing awesome lists of open source software.

https://github.com/elysiumor/didactic-system

๐Ÿฆ€ A customizable Rust-powered command-line shell with alias support, Git branch awareness, colorful directory listing, and built-in commands for a personalized terminal experience.
https://github.com/elysiumor/didactic-system

alias-support cli colored-output command-line custom-shell git-integration interactive-shell rust rust-project shell system-info system-information terminal terminal-utility

Last synced: 1 day ago
JSON representation

๐Ÿฆ€ A customizable Rust-powered command-line shell with alias support, Git branch awareness, colorful directory listing, and built-in commands for a personalized terminal experience.

Awesome Lists containing this project

README

          

# ๐Ÿฆ€ Rust Shell

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. ๐Ÿง โœจ

---

## ๐Ÿš€ Features

- ๐Ÿ’ก Random Rust fun fact on launch
- ๐Ÿง  Alias support (with save/load functionality)
- ๐Ÿ“‚ `cd`, `ls` and 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`

---

## ๐Ÿ“ฆ Installation

### 1. Prerequisites

- [Rust](https://www.rust-lang.org/tools/install) (with `cargo`)
- Git (optional, for branch detection)
- Build tools (for your OS)

### 2. Clone and Build

```bash
git clone https://github.com/yourusername/rust-shell.git
cd rust-shell
cargo build --release
```

### 3. Run

```bash
cargo run
```

Or run the compiled executable:

```bash
./target/release/rust-shell
```

---

## โš™๏ธ Usage

You can run commands just like in a regular shell:

```bash
> ls
> cd my_folder
> setenv NAME Rustacean
> getenv NAME
> alias gs=git status
> gs
```

### ๐Ÿ“œ Built-in Commands

| Command | Description |
|--------------------|----------------------------------------------|
| `ls` | Lists directory contents (color-coded) |
| `cd ` | 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 ` | Sets custom prompt symbol |
| `shellinfo` | Displays system and shell info |
| `whoami-shell` | Prints shell identity |
| `help` | Lists available commands |
| `exit` | Exits the shell |

---

## ๐Ÿ“ Files

- `src/main.rs` - Main source code
- `aliases.txt` - Saved aliases
- `history.txt` - Shell history

---

## ๐Ÿค“ Fun Fact Sample Output

```bash
* 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!
```

---

## ๐Ÿ–ฅ Screenshot

> *(Optional: You can add a screenshot of the terminal interface here)*

---

## ๐Ÿ“œ License

This project is licensed under the MIT License.

---

## ๐Ÿค Contributions

Pull requests are welcome! Feel free to open issues or feature requests.

---

## ๐Ÿ’ก Credits

Built with โค๏ธ and `rustyline`, `git2`, `sysinfo`, and pure Rust magic.