{"id":22878034,"url":"https://github.com/hi-doki/pipios","last_synced_at":"2025-04-14T19:33:26.291Z","repository":{"id":267360975,"uuid":"900951142","full_name":"Hi-doki/PiPiOS","owner":"Hi-doki","description":"A basic simulated os/kernel idk built with Python","archived":false,"fork":false,"pushed_at":"2024-12-31T23:48:54.000Z","size":39,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T23:49:35.802Z","etag":null,"topics":["cli","college-project","command-line","cryptography","educational-project","encryption","filesystem","filesystem-simulation","hobby-project","json","mini-os","open-source","operating-system","python","simulated-os","simulator","user-management"],"latest_commit_sha":null,"homepage":"https://nekos.ca/","language":"Python","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/Hi-doki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-12-09T19:11:52.000Z","updated_at":"2025-03-31T20:06:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"4f8f550c-7ce4-4e0e-b5c1-fd3bca686390","html_url":"https://github.com/Hi-doki/PiPiOS","commit_stats":null,"previous_names":["hi-doki/pipios"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hi-doki%2FPiPiOS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hi-doki%2FPiPiOS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hi-doki%2FPiPiOS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hi-doki%2FPiPiOS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hi-doki","download_url":"https://codeload.github.com/Hi-doki/PiPiOS/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248946266,"owners_count":21187477,"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","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":["cli","college-project","command-line","cryptography","educational-project","encryption","filesystem","filesystem-simulation","hobby-project","json","mini-os","open-source","operating-system","python","simulated-os","simulator","user-management"],"created_at":"2024-12-13T16:17:39.026Z","updated_at":"2025-04-14T19:33:26.276Z","avatar_url":"https://github.com/Hi-doki.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PiPiOS\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch3\u003eViews\u003c/h3\u003e\n  \u003cimg src=\"https://moe-counter.glitch.me/get/@:hidokipipi\" align=\"center\" /\u003e\n  \u003ch4\u003e\u003c/h4\u003e\n\u003c/div\u003e\n\n\nPiPiOS is a simulated operating system built with Python, featuring a simple file system, user management, and a command-line interface. It allows users to create directories, edit files, manage user accounts, and more.\n\n---\n\n## Features\n\n- **File System**:\n  - Create directories and files.\n  - Edit files using a simple text editor (`nano`).\n  - Save the filesystem structure in a JSON file.\n\n- **User Management**:\n  - Create users with encrypted passwords.\n  - Differentiate between admin and non-admin users.\n  - Login and logout functionality with a secure login screen.\n\n- **Command-Line Interface**:\n  - Commands like `cd`, `ls`, `mkdir`, `nano`, `login`, `logout`, and more.\n  - Dynamic paths with support for relative and absolute navigation.\n\n---\n\n## Main Commands\n\n| Command|Description|Syntax|Example|\n|--------|-----------|-------|------|\n|**`cd`**|Change the current directory.| `cd \u003cpath\u003e`| `cd ~\\users\\admin\\Home\\Documents`|\n|**`ls`**|List the contents of the current directory.| `ls`| `ls`|\n|**`mkdir`**|Create a new directory.| `mkdir \u003cdirectory_name\u003e`| `mkdir my_folder`|\n|**`nano`**|Edit or create a file using a simple text editor.| `nano \u003cfile_path\u003e`| `nano cool.txt`|\n|**`read_file`**|Display the contents of a file.| `read_file \u003cfile_path\u003e`| `read_file cool.txt`|\n|**`create_user`**|Create a new user. (Admins only).| `create_user \u003cusername\u003e \u003cpassword\u003e`| `create_user alice pass123`|\n|**`login`**|Log in to an existing user account.| `login \u003cusername\u003e \u003cpassword\u003e`| `login admin admin123`|\n|**`logout`**|Log out from the current session.| `logout`| `logout`|\n|**`help`**|Display a list of all available commands with usage examples.| `help`| `help`|\n\n---\n\n## How It Works\n\n### File System\n- The file system is represented as a nested dictionary and is saved/loaded from `filesystem.json`.\n- Directories are stored as nested dictionaries, and files are stored as key-value pairs where the value is the file content.\n\n### User Management\n- User accounts are stored in `users.json`, with encrypted passwords using the `cryptography` library.\n- Only logged-in users can access the file system.\n- Admin users have additional permissions (e.g., creating new users).\n\n---\n\n## Getting Started\n\n### Prerequisites\n- Python 3.7 or higher\n- Install dependencies:\n  ```bash\n  pip install cryptography\n  ```\n\n### Running PiPiOS\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/hi-doki/PiPiOS.git\n   cd PiPiOS\n   ```\n2. Run the main script:\n   ```bash\n   python pipios.py\n   ```\n\n### Example Usage\n1. Log in as the default admin (`admin` with password `admin123`).\n2. Create a new user:\n   ```plaintext\n   ~ \u003e create_user alice password123 True\n   ```\n3. Switch to the new user:\n   ```plaintext\n   ~ \u003e logout\n   ~ \u003e login alice password123\n   ```\n\n---\n\n## File Structure\n```plaintext\n.\\\n├── pipios.py         # Main script to run PiPiOS\n├── filesystem.json # JSON file representing the file system structure\n├── users.json      # JSON file storing user data (encrypted passwords)\n├── secret.key      # Encryption key for securing user passwords\n```\n\n---\n\n## Future Features\n- Add permissions for user-specific directories and files.\n- Improve the file editor with more functionality.\n- Implement file copy, move, and delete commands.\n\n---\n\n## License\nThis project is licensed under the MIT License. See `LICENSE` for more details.\n\n---\n\n## Contributing\nContributions are welcome! Feel free to open an issue or submit a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhi-doki%2Fpipios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhi-doki%2Fpipios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhi-doki%2Fpipios/lists"}