{"id":33235926,"url":"https://github.com/hackedarea/phoenix-shell","last_synced_at":"2025-11-16T18:03:01.400Z","repository":{"id":321463239,"uuid":"1085935804","full_name":"hackedarea/phoenix-shell","owner":"hackedarea","description":"My self made Linux Shell/Terminal, made by using Node.js","archived":false,"fork":false,"pushed_at":"2025-11-13T16:58:02.000Z","size":66,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-13T18:26:58.035Z","etag":null,"topics":["all-linux-distribution","cli","kali-linux","linux","nodejs","parrot-os","shell","terminal"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hackedarea.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-29T18:00:16.000Z","updated_at":"2025-11-13T16:58:06.000Z","dependencies_parsed_at":"2025-10-29T20:42:45.086Z","dependency_job_id":null,"html_url":"https://github.com/hackedarea/phoenix-shell","commit_stats":null,"previous_names":["hackedarea/phoenix-shell"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hackedarea/phoenix-shell","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackedarea%2Fphoenix-shell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackedarea%2Fphoenix-shell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackedarea%2Fphoenix-shell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackedarea%2Fphoenix-shell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hackedarea","download_url":"https://codeload.github.com/hackedarea/phoenix-shell/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hackedarea%2Fphoenix-shell/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284750955,"owners_count":27057456,"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-11-16T02:00:05.974Z","response_time":65,"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":["all-linux-distribution","cli","kali-linux","linux","nodejs","parrot-os","shell","terminal"],"created_at":"2025-11-16T18:01:50.327Z","updated_at":"2025-11-16T18:03:01.389Z","avatar_url":"https://github.com/hackedarea.png","language":"JavaScript","readme":"# 🐚 Phoenix Shell - Rise of the Node-Powered Terminal 🔥  \n_A minimal yet mighty shell that blends UNIX wisdom with JavaScript flexibility._\n\n![Node](https://img.shields.io/badge/node-%3E%3D18.0.0-green)\n![Platform](https://img.shields.io/badge/platform-cross--platform-blue)\n![License](https://img.shields.io/badge/license-MIT-yellow)\n![Status](https://img.shields.io/badge/status-active-success)\n\n---\n\n**Phoenix Shell** is a lightweight, interactive command-line shell built entirely in **Node.js**.  \nIt mimics the behavior of common UNIX shells like **bash** or **zsh**, while revealing how real shells parse, interpret, and execute commands internally.\n\n---\n\n## 🚀 Features Implemented\n\n### ✅ Core Shell Functionality\n- Interactive prompt (`$`)\n- Command parsing (supports multiple args, flags, and quoted strings)\n- Error handling for unknown commands\n- Built-in environment variable usage (`$PATH`, `$HOME`, etc.)\n- Introduced shell variables (`x=5`, `$x`)\n- Commands to display network \u0026 machine interfaces (`ifconfig`,`iwconfig`)\n\n---\n\n### ✅ Built-in Commands\n\n| Command | Description |\n|----------|-------------|\n| `bae \u003ccommand\u003e` | 💖 My own “package manager soulmate” (actually uses the system’s default package manager, but named `bae`). Explore it using `--help` or just type `bae`. |\n| `cat [flags] \u003cfile\u003e` | Prints file content, supports `-n`, `-b`, `-E`, `-T`, `-s`, `-A`. Handles multiple files and both absolute/relative paths. |\n| `cd [path]` | Changes the current working directory, supports `..`, `-`, `~`, and absolute paths. |\n| `chmod [flags] [mode] [file]` | Changes the permissions of files for root, group, and other users. Supports `-c`, `-f`, `-v`, `-R`, `--help`, and `--version`. Accepts all modes like `rwx`, `777`, `444`, `u/g/o +,-,=` etc. |\n| `clear` | Clears the terminal screen (ANSI-based). |\n| `cp` | Copy the content of the file, supported `-r`,`-v`,`-n`,`-p`,`--version` and `--help`. |\n| `echo \u003ctext\u003e` | Prints text to stdout. |\n| `exit \u003cexit code\u003e` | Exits the terminal (defaults to code `0`). |\n| `grep [flags] [path]` | Searches content with support for `-n`, `-v`, and `--help`. |\n| `ifconfig [flags]` | Shows network interfaces, supports `-a` and `--help`. |\n| `iwconfig` | Shows wireless network interfaces (only works for linux, and for windows it displays manually added network data), support parameters `essid`,`mode`,`channel`,`freq`,`key`,`sens` and `--help`. |\n| `ls [flags] [path]` | Lists directory contents, supports `-a`, `-l`, combined flags (`-al`, `-la`), and `--help`. |\n| `man \u003ccommand\u003e` | Prints the help file content of the given command (e.g., `man ls`, `man cat`). |\n| `mkdir \u003cflags\u003e [path]` | Creates directories, supports `-m`, `-p`, `-v`, `-Z`, and `--help`. |\n| `mv \u003cflags\u003e [file]` | move file from one place to another or rename any file, supports `-u`, `-n`, `-i`, `-v`, `-f`, and `--help`. |\n| `pwd` | Prints the current working directory. Supports `-L`, `-P`, and `--help`. |\n| `rm \u003cflags\u003e [path]` | Removes files or directories. Supports `-f`, `-i`, `-I`, `-r`, `-d`, `-v`, `--`, and combined flags (`-rf`). |\n| `touch \u003cflags\u003e [File]` | Generate a file with a default permission `u=7`,`g=5`,`o=5` (`755`) if it does not exist in the given path (if not given then generated in current directory). |\n| `type \u003ccommand\u003e` | Identifies whether a command is built-in or external (searched via `$PATH`). |\n\n---\n\n## ⚙️ Technical Overview\n\n- **Language:** Node.js (JavaScript)\n- **Core Modules Used:**\n  - `fs` → File system access  \n  - `path` → Cross-platform path handling  \n  - `readline` → Interactive input  \n  - `process` → Environment and working directory management  \n\n---\n\n### 🧩 Path Resolution\nPhoenix Shell comes with an intelligent path resolver that:\n- Expands tilde (`~`)\n- Handles relative (`./`, `../`)\n- Resolves absolute paths (`/usr/bin`, `/help/file.txt`)\n- Normalizes redundant segments\n- Integrates a custom alias: `bae` (default package manager shortcut)\n\n---\n\n### 🧩 Command Parser\nThe internal parser ensures reliable cross-platform execution:\n- Handles `\"quoted strings\"` and multi-space inputs\n- Splits and resolves arguments, flags, and paths safely\n- Uses `path.delimiter` and `path.join` for clean path management\n\n---\n\n## 🧠 Learning Goals\nPhoenix Shell is built as a deep-dive project to:\n- Understand **how real shells interpret and execute commands**\n- Explore **system-level file operations** in Node.js\n- Learn **I/O handling**, **process management**, and **environment variables**\n- Recreate essential parts of a UNIX-like command ecosystem in pure JavaScript\n\n---\n\n## 🧪 Upcoming Features\n\n- [ ] Add more built-in commands like `chdir`, `alias`, etc.\n- [ ] Implement piped commands (`cat file | grep text`)\n- [ ] Some more advanced commands (`cat\u003efile_name`)\n- [ ] Support asynchronous execution (`\u0026`)\n\n---\n\n## Contributors\n\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors-)\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/coderujwal3\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/67452930?v=4?s=60\" width=\"60px;\" alt=\"coderujwal3\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eUjwal Singh\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\n\n---\n## 💡 Usage\n\n### Run in interactive mode:\n```bash\ngit clone https://github.com/hackedarea/phoenix-terminal.git\ncd phoenix-terminal\nnpm install\nnode main.js\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhackedarea%2Fphoenix-shell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhackedarea%2Fphoenix-shell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhackedarea%2Fphoenix-shell/lists"}