cobrashell


Namecobrashell JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://github.com/G000D1ESS/snakeshell.git
SummaryUnix Shell written in Python3
upload_time2024-10-29 23:47:32
maintainerNone
docs_urlNone
authorG000D1ESS
requires_python<4.0,>=3.12
licenseMIT
keywords unix shell
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 🐍 SnakeShell: A Bash-like Unix Shell in Python

![License](https://img.shields.io/badge/license-MIT-blue.svg)
![Python](https://img.shields.io/badge/python-3.12-blue.svg)
![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)

Welcome to **SnakeShell**! 🎉

This project aims to develop a Unix shell similar to Bash, written in Python and utilizing the PEG parser [TatSu](https://github.com/neogeny/TatSu). SnakeShell is designed to replicate core functionalities of traditional Unix shells while incorporating modern features.

## 📚 Table of Contents

- [Features](#-features)
- [Roadmap](#-roadmap)
  - [Development Stages](#development-stages)
- [Installation](#-installation)
- [Usage](#-usage)
- [Contributing](#-contributing)
- [License](#-license)

## 🌟 Features

- **Process Management**: Forking, executing, and waiting for processes
- **File Redirection and Pipes**: Input/output redirection and command pipelines
- **Job Control**: Background processes and signal handling
- **Quoting and Expansion**: Variable expansion and globbing
- **Interactive Features**: Command history and auto-completion

## 📋 Roadmap

### Development Stages

#### Stage 1: Fork/Exec/Wait ✅

- Basics of Unix processes
- Implement the simplest possible shell
- Support built-in commands like `cd`, `exec`, etc.
- Search for commands in `PATH`
- Handle exit statuses and the `!` operator
- Support command lists using `;`, `&&`, and `||`
- Support subshells and line continuation

#### Stage 2: Files and Pipes ✅

- Implement file descriptor redirection (`<`, `>`, `>>`, `<>`)
- Support pipes between commands (`|`)
- Handle file descriptor duplication (`<&`, `>&`)
- Implement process and command substitution (`<(...)`, `$(...)`)
- Ensure proper handling of file descriptors and inheritance

#### Stage 3: Job Control and Signals 🚧

- Discuss signals and support for keyboard shortcuts like `Ctrl+C`, `Ctrl+\`, and `Ctrl+Z`
- Implement background processes and job control (`&`, `jobs`, `fg`, `bg`)
- Ensure proper handling of sessions and process groups

#### Stage 4: Quoting and Expansion ⏳

- Handle environments and variables
- Implement globbing (wildcard matching)
- Support quoting and character escaping
- Handle alias and function expansions

#### Stage 5: Interactivity ⏳

- Enhance the shell for interactive work
- Support command history
- Implement auto-completion
- Customize prompts and themes

## 🚀 Installation

To install **SnakeShell**, follow these steps:

1. **Clone the repository**

    ```bash
    git clone https://github.com/G000D1ESS/snakeshell.git
    ```

2. **Navigate to the project directory**

    ```bash
    cd snakeshell
    ```

3. **Run the installation**

    ```bash
    python3 -m pip install .
    ```

## 🎮 Usage

To use this Unix Shell, follow these steps:

1. **Start the shell by executing the command:**

    ```bash
    snake
    ```

2. **Enter commands in the interactive shell and press Enter to execute them.**

    Example commands:

    ```bash
    ls -l
    cd /path/to/directory
    mkdir new_directory
    ```

## 📄 License

This project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details.

---

Feel free to ⭐ star the repository if you find it interesting!

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/G000D1ESS/snakeshell.git",
    "name": "cobrashell",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.12",
    "maintainer_email": null,
    "keywords": "unix, shell",
    "author": "G000D1ESS",
    "author_email": "wherenodarkness@mail.ru",
    "download_url": "https://files.pythonhosted.org/packages/66/4b/158ff9251e986a280671d7a8b7c216edc8e599920e5ff3c6f68c0d666e32/cobrashell-0.0.2.tar.gz",
    "platform": null,
    "description": "# \ud83d\udc0d SnakeShell: A Bash-like Unix Shell in Python\n\n![License](https://img.shields.io/badge/license-MIT-blue.svg)\n![Python](https://img.shields.io/badge/python-3.12-blue.svg)\n![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg)\n\nWelcome to **SnakeShell**! \ud83c\udf89\n\nThis project aims to develop a Unix shell similar to Bash, written in Python and utilizing the PEG parser [TatSu](https://github.com/neogeny/TatSu). SnakeShell is designed to replicate core functionalities of traditional Unix shells while incorporating modern features.\n\n## \ud83d\udcda Table of Contents\n\n- [Features](#-features)\n- [Roadmap](#-roadmap)\n  - [Development Stages](#development-stages)\n- [Installation](#-installation)\n- [Usage](#-usage)\n- [Contributing](#-contributing)\n- [License](#-license)\n\n## \ud83c\udf1f Features\n\n- **Process Management**: Forking, executing, and waiting for processes\n- **File Redirection and Pipes**: Input/output redirection and command pipelines\n- **Job Control**: Background processes and signal handling\n- **Quoting and Expansion**: Variable expansion and globbing\n- **Interactive Features**: Command history and auto-completion\n\n## \ud83d\udccb Roadmap\n\n### Development Stages\n\n#### Stage 1: Fork/Exec/Wait \u2705\n\n- Basics of Unix processes\n- Implement the simplest possible shell\n- Support built-in commands like `cd`, `exec`, etc.\n- Search for commands in `PATH`\n- Handle exit statuses and the `!` operator\n- Support command lists using `;`, `&&`, and `||`\n- Support subshells and line continuation\n\n#### Stage 2: Files and Pipes \u2705\n\n- Implement file descriptor redirection (`<`, `>`, `>>`, `<>`)\n- Support pipes between commands (`|`)\n- Handle file descriptor duplication (`<&`, `>&`)\n- Implement process and command substitution (`<(...)`, `$(...)`)\n- Ensure proper handling of file descriptors and inheritance\n\n#### Stage 3: Job Control and Signals \ud83d\udea7\n\n- Discuss signals and support for keyboard shortcuts like `Ctrl+C`, `Ctrl+\\`, and `Ctrl+Z`\n- Implement background processes and job control (`&`, `jobs`, `fg`, `bg`)\n- Ensure proper handling of sessions and process groups\n\n#### Stage 4: Quoting and Expansion \u23f3\n\n- Handle environments and variables\n- Implement globbing (wildcard matching)\n- Support quoting and character escaping\n- Handle alias and function expansions\n\n#### Stage 5: Interactivity \u23f3\n\n- Enhance the shell for interactive work\n- Support command history\n- Implement auto-completion\n- Customize prompts and themes\n\n## \ud83d\ude80 Installation\n\nTo install **SnakeShell**, follow these steps:\n\n1. **Clone the repository**\n\n    ```bash\n    git clone https://github.com/G000D1ESS/snakeshell.git\n    ```\n\n2. **Navigate to the project directory**\n\n    ```bash\n    cd snakeshell\n    ```\n\n3. **Run the installation**\n\n    ```bash\n    python3 -m pip install .\n    ```\n\n## \ud83c\udfae Usage\n\nTo use this Unix Shell, follow these steps:\n\n1. **Start the shell by executing the command:**\n\n    ```bash\n    snake\n    ```\n\n2. **Enter commands in the interactive shell and press Enter to execute them.**\n\n    Example commands:\n\n    ```bash\n    ls -l\n    cd /path/to/directory\n    mkdir new_directory\n    ```\n\n## \ud83d\udcc4 License\n\nThis project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details.\n\n---\n\nFeel free to \u2b50 star the repository if you find it interesting!\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Unix Shell written in Python3",
    "version": "0.0.2",
    "project_urls": {
        "Homepage": "https://github.com/G000D1ESS/snakeshell.git",
        "Repository": "https://github.com/G000D1ESS/snakeshell.git"
    },
    "split_keywords": [
        "unix",
        " shell"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fb896e2addafb7ce10d82edc9c71a8112d44d4641f978da98c2e6450a5fa5e35",
                "md5": "131bda83340fc4608f2a22699d94c93b",
                "sha256": "d72ac2e6ad1dd5b5cb7a89ee2bc489bafdb48fae9a70c9ad0f41a31c4a38ca33"
            },
            "downloads": -1,
            "filename": "cobrashell-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "131bda83340fc4608f2a22699d94c93b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.12",
            "size": 11378,
            "upload_time": "2024-10-29T23:47:32",
            "upload_time_iso_8601": "2024-10-29T23:47:32.004039Z",
            "url": "https://files.pythonhosted.org/packages/fb/89/6e2addafb7ce10d82edc9c71a8112d44d4641f978da98c2e6450a5fa5e35/cobrashell-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "664b158ff9251e986a280671d7a8b7c216edc8e599920e5ff3c6f68c0d666e32",
                "md5": "e9b9e8541224dccc6e3ed4772d354e24",
                "sha256": "6a9f49e1710294cec3e86903178fe02ed4eec220a4f407846f4e59993ce802a0"
            },
            "downloads": -1,
            "filename": "cobrashell-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "e9b9e8541224dccc6e3ed4772d354e24",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.12",
            "size": 10170,
            "upload_time": "2024-10-29T23:47:32",
            "upload_time_iso_8601": "2024-10-29T23:47:32.968044Z",
            "url": "https://files.pythonhosted.org/packages/66/4b/158ff9251e986a280671d7a8b7c216edc8e599920e5ff3c6f68c0d666e32/cobrashell-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-29 23:47:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "G000D1ESS",
    "github_project": "snakeshell",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "cobrashell"
}
        
Elapsed time: 0.35601s