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.
- Host: GitHub
- URL: https://github.com/elysiumor/didactic-system
- Owner: elysiumor
- License: mit
- Created: 2025-05-09T15:07:49.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-09T16:46:20.000Z (about 1 year ago)
- Last Synced: 2025-10-23T16:27:18.074Z (8 months ago)
- Topics: alias-support, cli, colored-output, command-line, custom-shell, git-integration, interactive-shell, rust, rust-project, shell, system-info, system-information, terminal, terminal-utility
- Language: Rust
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: history.txt
- License: LICENSE
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.