{"id":30068447,"url":"https://github.com/aminehabchi/0-shell","last_synced_at":"2025-08-08T10:11:17.488Z","repository":{"id":307815150,"uuid":"996016091","full_name":"aminehabchi/0-shell","owner":"aminehabchi","description":"A minimalist Unix-like shell built in Rust from scratch","archived":false,"fork":false,"pushed_at":"2025-08-02T10:12:07.000Z","size":5129,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-02T12:28:04.444Z","etag":null,"topics":["busybox","rust","shell","unix","zone01oujda"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aminehabchi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-04T10:35:34.000Z","updated_at":"2025-08-02T10:12:10.000Z","dependencies_parsed_at":"2025-08-02T12:28:06.892Z","dependency_job_id":"c5ae8d70-3ba6-465b-9b8d-25a95466837c","html_url":"https://github.com/aminehabchi/0-shell","commit_stats":null,"previous_names":["aminehabchi/0-shell"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/aminehabchi/0-shell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aminehabchi%2F0-shell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aminehabchi%2F0-shell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aminehabchi%2F0-shell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aminehabchi%2F0-shell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aminehabchi","download_url":"https://codeload.github.com/aminehabchi/0-shell/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aminehabchi%2F0-shell/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269403572,"owners_count":24411230,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["busybox","rust","shell","unix","zone01oujda"],"created_at":"2025-08-08T10:11:16.003Z","updated_at":"2025-08-08T10:11:17.478Z","avatar_url":"https://github.com/aminehabchi.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 0-Shell\nA minimalist Unix-like shell built in **Rust** — no `bash`, no `sh`, just pure system-level control.\n\n---\n\n## About This Project\n**0-Shell** is a lightweight, standalone shell inspired by tools like **BusyBox**, built for embedded Linux environments. It uses **Rust** to implement core shell commands **from scratch**, without relying on external programs.\n\n![Alt text](./Screenshot.png)\n\n---\n\n## What We Built\nA fully working shell that:\n- Displays an intelligent prompt: `$ [branch] ~/current/path`\n- Features **colored output** similar to `zsh` with syntax highlighting\n- Accepts and parses complex user input with **advanced input parsing**\n- Executes built-in commands with proper argument handling\n- Handles errors gracefully with informative messages\n- Exits on `exit` or `Ctrl+D`\n\n---\n\n## Shell Features\n\n### **Smart Prompt \u0026 UI**\n- **Dynamic prompt**: Shows current directory and Git branch when available\n- **Colored output**: Syntax highlighting for commands, files, and directories\n- **Zsh-like experience**: Modern shell aesthetics with intuitive color coding\n- **Error highlighting**: Clear visual feedback for invalid commands\n\n### **System Integration**\n- **Git awareness**: Displays current branch in prompt\n- **Path intelligence**: Smart directory navigation and display\n- **Signal handling**: Proper `Ctrl+D` behavior\n\n---\n\n## What You'll Learn\n- How to use Rust's standard and low-level system libraries\n- How to write your own versions of Unix commands\n- How to build a modular command-execution loop\n- **Advanced terminal manipulation** and ANSI color codes\n- **Input parsing algorithms** and command-line argument processing\n- **Git integration** and repository status detection\n- **Cross-platform terminal handling** in Rust\n\n---\n\n## Built-In Commands\n| Command | Description                              | Features |\n|---------|------------------------------------------|----------|\n| `echo`  | Print text to stdout                     | Color support, escape sequences |\n| `cd`    | Change the current working directory     | Smart path completion, `~` expansion |\n| `ls`    | List directory contents (`-l`, `-a`, `-F`) | **Full color coding**, file type indicators |\n| `pwd`   | Show the current working directory       | Git-aware path display |\n| `cat`   | Display file contents                    | Syntax highlighting for code files |\n| `cp`    | Copy files                               | Progress indication, recursive copy |\n| `rm`    | Remove files or directories (`-r` flag)  | Safe deletion with confirmation |\n| `mv`    | Move or rename files                     | Smart conflict resolution |\n| `mkdir` | Create directories                       | Recursive creation with `-p` |\n| `clear` | Clear the terminal screen                | Complete screen refresh |\n| `exit`  | Exit the shell                           | Graceful cleanup and goodbye message |\n\n---\n\n## Getting Started\n\n### Clone the Repository\n```bash\ngit clone https://github.com/aminehabchi/0-shell\ncd 0-shell\ncargo run -p terminal\n```\n\n---\n\n## Team Members \u0026 Responsibilities\n| Name                  | Assigned Commands           | Additional Responsibilities |\n|-----------------------|-----------------------------|----------------------------|\n| **Ali Louhab**        | `cat`, `rm`, `exit`, `mkdir` | Error handling, file operations |\n| **Amine Habchi**      | `mv`, `cp`, `pwd`, `ls`     | **Input parsing**, **prompt system**, colors |\n| **Abdelouahab Bouchik** | `cd`, `echo`, `clear`      | Terminal control, Git integration |\n\n---","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faminehabchi%2F0-shell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faminehabchi%2F0-shell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faminehabchi%2F0-shell/lists"}