webwright


Namewebwright JSON
Version 0.0.5 PyPI version JSON
download
home_pagehttps://github.com/MittaAI/webwright
SummaryWebwright: The Ghost in Your Shell πŸ‘»πŸ’»
upload_time2024-09-18 18:29:37
maintainerNone
docs_urlNone
authorKord Campbell
requires_pythonNone
licenseMIT
keywords ai terminal shell automation development tools
VCS
bugtrack_url
requirements gitpython prompt_toolkit beautifulsoup4 coolname pygments openai openai tenacity anthropic torch transformers sentence_transformers InstructorEmbedding Halo PyGithub cowsay google-generativeai unidiff patch
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Webwright: The Ghost in Your Shell πŸ‘»πŸ’»

Webwright is more than just a terminal shellβ€”it's a transformative tool that gets things done, plain and simple.

In the early days of computing, the command line was king. Webwright is for the tinkerers and hackers who remember that raw power. It taps into that primal, user-first ethos, acting as a ghost in your shell: an AI that speaks your language and understands your needs.

With Webwright, you're in control. Generate code, manage projects, deploy apps, and automate tasksβ€”all from your terminal. It's the tool that puts power back in your hands.

This is computing at its rawest, most powerful, and most liberating.

Are you ready to unleash the ghost in your shell?

## πŸ”‘ API Requirements

Webwright requires an API token from either OpenAI or Anthropic to function. You can obtain these tokens from:

- [OpenAI API Keys](https://platform.openai.com/account/api-keys)
- [Anthropic API Keys](https://console.anthropic.com/settings/keys)

Please ensure you have at least one of these API keys before proceeding with the installation.

## πŸš€ Key Features

- 🌐 **AI-Powered Web Development**: Craft and launch websites with intelligent, AI-driven tools.
- πŸ’» **Smart Code Generation**: Let AI write code for you, boosting productivity and innovation.
- πŸ“Š **Effortless Project Management**: Seamlessly create and oversee projects with AI assistance.
- πŸ”„ **Integrated Version Control**: Push your code to GitHub without leaving the terminal.
- 🐳 **Docker at Your Fingertips**: Effortlessly spin up and manage Docker containers.
- 🌐 **Browser Magic**: Automate web tasks and open URLs (or other apps) with simple commands.
- πŸ”§ **Infinitely Extensible**: Customize your shell with bespoke commands and scripts.

## Demo
![Animated GIF](https://github.com/MittaAI/webwright/blob/main/assets/video.gif?raw=true)

## πŸ› οΈ Installation
Webwright requires Anaconda and Docker to be configured on your system.

1. **Install Webwright**
   ```bash
   pip install webwright
   ```

2. **Set up dependencies**

  Webwright requires Anaconda and Docker to be configured on your system.
  - [Anaconda/Miniconda Installation](https://docs.anaconda.com/miniconda/miniconda-install/)
  - [Docker Desktop Installation](https://www.docker.com/products/docker-desktop/)

3. **Create and activate a Conda environment**
   ```bash
   conda create -n webwright python=3.8
   conda activate webwright
   ```

4. **Install Git**
   Ensure Git is installed in your Conda environment:
   ```bash
   conda install git
   ```

5. **Start Webwright**
   ```bash
   webwright
   ```

## πŸ”„ System Flow Diagram

```mermaid
graph TD
    A[User] -->|Enters command| B[Webwright Shell]
    B -->|Processes command| E{OpenAI or Anthropic?}
    E -->|OpenAI| F[OpenAI API]
    E -->|Anthropic| G[Anthropic API]
    F -->|Response| H[Process AI Response]
    G -->|Response| H
    H <-->|Query/Update| L[(Vector Store)]
    H <-->|Query/Update| M[(Set Store)]
    H -->|Generate Code/App| I[Code/Application Output]
    H -->|Execute Function| J[Function Execution]
    J -->|Result| K[Process Function Result]
    K -->|Update Context| B
    I -->|Display to User| A
    B <-->|API Calls| N[mitta.ai API]
    N -->|Document Processing| O[Process Documents]
    N -->|Web Crawling| P[Crawl Websites]
    N -->|Other Functionality| Q[...]
```

This diagram illustrates the flow of Webwright's functionality, showing how user commands are processed, how AI requests are handled, and how data is stored and retrieved.

## Getting Started

Once installed, you can start using Webwright by simply typing `webwright` in your terminal. Here's a quick overview of some commands:

### Open URLs in Your Browser

```bash
open hackernews
```

### Create a New Project

```bash
create project my-project
```

### Generate Code

```bash
generate code --type python --output my_script.py
```

### Commit to GitHub

```bash
git commit -m "Initial commit"
```

### Start Docker Containers

```bash
docker start my-container
```

### AI-Powered Code Generation

Webwright can generate complex code snippets using AI. For example, to generate an ASCII fractal:

```bash
generate fractal --size 20
```

### Example: Fractal Generation

Here's an example of a Python code snippet generated by Webwright to create a mandlebrot fractal:

```python
import matplotlib.pyplot as plt
import numpy as np

# Function to compute the Mandelbrot set
def mandelbrot(c, max_iter):
    z = c
    for n in range(max_iter):
        if abs(z) > 2:
            return n
        z = z*z + c
    return max_iter

# Generate the fractal
def generate_fractal(size):
    # Determine the plot boundaries
    x_min, x_max = -2.5, 1.5
    y_min, y_max = -2.0, 2.0

    width, height = (size*100, size*100)  # Increase resolution by multiplying size by 100
    x, y = np.linspace(x_min, x_max, width), np.linspace(y_min, y_max, height)
    fractal = np.zeros((width, height))

    for i in range(width):
        for j in range(height):
            fractal[i, j] = mandelbrot(complex(x[i], y[j]), 256)

    plt.imshow(fractal.T, extent=[x_min, x_max, y_min, y_max], cmap='hot')
    plt.colorbar()
    plt.title("Mandelbrot Fractal")
    plt.show()

# Generate a fractal of the given size
generate_fractal(20)

```

### Output

<img src="https://github.com/MittaAI/webwright/blob/main/assets/fractal.png?raw=true" alt="Fractal">


### Developer Installation

For developers who want to install Webwright for testing, building, and running from source:

1. **Clone the Repository**
   ```bash
   git clone https://github.com/MittaAI/webwright.git
   cd webwright
   ```

2. **Set up Conda Environment**
   ```bash
   conda create -n webwright python=3.10
   conda activate webwright
   ```

3. **Install Dependencies**
   ```bash
   pip install -r requirements.txt
   ```

4. **Install Git (if not already installed)**
   ```bash
   conda install git
   ```
5. **Add GITHUB_TOKEN to Environment**
   ```bash
   $env:GITHUB_TOKEN = "your_github_token"
   ```
6. **Run Webwright from Source**
   ```bash
   python webwright/main.py
   ```

### Conda Initialization in VSCode

If you are using VSCode and need to get conda working in the editor, you might need to run the following command from the `condabin` directory:

```
./conda init powershell
```

This will set up the necessary configuration for conda to work properly within VSCode terminal sessions.

### Building and Testing

To build and test Webwright:

1. **Install Development Dependencies**
   ```bash
   pip install -r requirements-dev.txt
   ```

2. **Run Tests**
   ```bash
   pytest
   ```

3. **Build Package**
   ```bash
   python setup.py sdist bdist_wheel
   ```

### Git Setup for Developers

If you're planning to contribute to Webwright, make sure to set up your Git environment:

1. **Configure Git**
   ```bash
   git config --global user.name "Your Name"
   git config --global user.email "your.email@example.com"
   ```

2. **Create a New Branch for Your Changes**
   ```bash
   git checkout -b feature/your-feature-name
   ```

3. **Make Your Changes and Commit**
   ```bash
   git add .
   git commit -m "Description of your changes"
   ```

4. **Push Your Changes and Create a Pull Request**
   ```bash
   git push origin feature/your-feature-name
   ```
   Then, go to the GitHub repository and create a pull request for your branch.

Remember to always pull the latest changes from the main branch before starting your work:

```bash
git checkout main
git pull origin main
```

For more detailed contribution guidelines, please refer to our [CONTRIBUTING.md](link-to-contributing-file) file.

## Documentation

For detailed usage instructions and examples, visit the [Webwright Documentation](https://mitta.ai/docs/webwright).

## Contributing

Webwright is an open-source project. We welcome contributions!

## Community and Support

Join our community on [Slack](https://join.slack.com/t/mittaai/shared_invite/zt-2azbcv29i-CL74lmOksgvN54jhvmVWeA) for support, discussions, and to share your ideas and feedback.

## License

Webwright is open-source software licensed under the [MIT License](https://opensource.org/license/mit).

---

With Webwright, harness the power of AI to enhance your development workflow and make building and managing websites easier and more efficient than ever before. Try it today and experience the future of web development!

---

Β© Mitta Corp. All rights reserved 2024.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/MittaAI/webwright",
    "name": "webwright",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "ai terminal shell automation development tools",
    "author": "Kord Campbell",
    "author_email": "kordless@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/bf/ba/e5e18287154305203cd28b44e485d6fabdeb25b07116f5f6190c09ba2c51/webwright-0.0.5.tar.gz",
    "platform": null,
    "description": "# Webwright: The Ghost in Your Shell \ud83d\udc7b\ud83d\udcbb\r\n\r\nWebwright is more than just a terminal shell\u2014it's a transformative tool that gets things done, plain and simple.\r\n\r\nIn the early days of computing, the command line was king. Webwright is for the tinkerers and hackers who remember that raw power. It taps into that primal, user-first ethos, acting as a ghost in your shell: an AI that speaks your language and understands your needs.\r\n\r\nWith Webwright, you're in control. Generate code, manage projects, deploy apps, and automate tasks\u2014all from your terminal. It's the tool that puts power back in your hands.\r\n\r\nThis is computing at its rawest, most powerful, and most liberating.\r\n\r\nAre you ready to unleash the ghost in your shell?\r\n\r\n## \ud83d\udd11 API Requirements\r\n\r\nWebwright requires an API token from either OpenAI or Anthropic to function. You can obtain these tokens from:\r\n\r\n- [OpenAI API Keys](https://platform.openai.com/account/api-keys)\r\n- [Anthropic API Keys](https://console.anthropic.com/settings/keys)\r\n\r\nPlease ensure you have at least one of these API keys before proceeding with the installation.\r\n\r\n## \ud83d\ude80 Key Features\r\n\r\n- \ud83c\udf10 **AI-Powered Web Development**: Craft and launch websites with intelligent, AI-driven tools.\r\n- \ud83d\udcbb **Smart Code Generation**: Let AI write code for you, boosting productivity and innovation.\r\n- \ud83d\udcca **Effortless Project Management**: Seamlessly create and oversee projects with AI assistance.\r\n- \ud83d\udd04 **Integrated Version Control**: Push your code to GitHub without leaving the terminal.\r\n- \ud83d\udc33 **Docker at Your Fingertips**: Effortlessly spin up and manage Docker containers.\r\n- \ud83c\udf10 **Browser Magic**: Automate web tasks and open URLs (or other apps) with simple commands.\r\n- \ud83d\udd27 **Infinitely Extensible**: Customize your shell with bespoke commands and scripts.\r\n\r\n## Demo\r\n![Animated GIF](https://github.com/MittaAI/webwright/blob/main/assets/video.gif?raw=true)\r\n\r\n## \ud83d\udee0\ufe0f Installation\r\nWebwright requires Anaconda and Docker to be configured on your system.\r\n\r\n1. **Install Webwright**\r\n   ```bash\r\n   pip install webwright\r\n   ```\r\n\r\n2. **Set up dependencies**\r\n\r\n  Webwright requires Anaconda and Docker to be configured on your system.\r\n  - [Anaconda/Miniconda Installation](https://docs.anaconda.com/miniconda/miniconda-install/)\r\n  - [Docker Desktop Installation](https://www.docker.com/products/docker-desktop/)\r\n\r\n3. **Create and activate a Conda environment**\r\n   ```bash\r\n   conda create -n webwright python=3.8\r\n   conda activate webwright\r\n   ```\r\n\r\n4. **Install Git**\r\n   Ensure Git is installed in your Conda environment:\r\n   ```bash\r\n   conda install git\r\n   ```\r\n\r\n5. **Start Webwright**\r\n   ```bash\r\n   webwright\r\n   ```\r\n\r\n## \ud83d\udd04 System Flow Diagram\r\n\r\n```mermaid\r\ngraph TD\r\n    A[User] -->|Enters command| B[Webwright Shell]\r\n    B -->|Processes command| E{OpenAI or Anthropic?}\r\n    E -->|OpenAI| F[OpenAI API]\r\n    E -->|Anthropic| G[Anthropic API]\r\n    F -->|Response| H[Process AI Response]\r\n    G -->|Response| H\r\n    H <-->|Query/Update| L[(Vector Store)]\r\n    H <-->|Query/Update| M[(Set Store)]\r\n    H -->|Generate Code/App| I[Code/Application Output]\r\n    H -->|Execute Function| J[Function Execution]\r\n    J -->|Result| K[Process Function Result]\r\n    K -->|Update Context| B\r\n    I -->|Display to User| A\r\n    B <-->|API Calls| N[mitta.ai API]\r\n    N -->|Document Processing| O[Process Documents]\r\n    N -->|Web Crawling| P[Crawl Websites]\r\n    N -->|Other Functionality| Q[...]\r\n```\r\n\r\nThis diagram illustrates the flow of Webwright's functionality, showing how user commands are processed, how AI requests are handled, and how data is stored and retrieved.\r\n\r\n## Getting Started\r\n\r\nOnce installed, you can start using Webwright by simply typing `webwright` in your terminal. Here's a quick overview of some commands:\r\n\r\n### Open URLs in Your Browser\r\n\r\n```bash\r\nopen hackernews\r\n```\r\n\r\n### Create a New Project\r\n\r\n```bash\r\ncreate project my-project\r\n```\r\n\r\n### Generate Code\r\n\r\n```bash\r\ngenerate code --type python --output my_script.py\r\n```\r\n\r\n### Commit to GitHub\r\n\r\n```bash\r\ngit commit -m \"Initial commit\"\r\n```\r\n\r\n### Start Docker Containers\r\n\r\n```bash\r\ndocker start my-container\r\n```\r\n\r\n### AI-Powered Code Generation\r\n\r\nWebwright can generate complex code snippets using AI. For example, to generate an ASCII fractal:\r\n\r\n```bash\r\ngenerate fractal --size 20\r\n```\r\n\r\n### Example: Fractal Generation\r\n\r\nHere's an example of a Python code snippet generated by Webwright to create a mandlebrot fractal:\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\n\r\n# Function to compute the Mandelbrot set\r\ndef mandelbrot(c, max_iter):\r\n    z = c\r\n    for n in range(max_iter):\r\n        if abs(z) > 2:\r\n            return n\r\n        z = z*z + c\r\n    return max_iter\r\n\r\n# Generate the fractal\r\ndef generate_fractal(size):\r\n    # Determine the plot boundaries\r\n    x_min, x_max = -2.5, 1.5\r\n    y_min, y_max = -2.0, 2.0\r\n\r\n    width, height = (size*100, size*100)  # Increase resolution by multiplying size by 100\r\n    x, y = np.linspace(x_min, x_max, width), np.linspace(y_min, y_max, height)\r\n    fractal = np.zeros((width, height))\r\n\r\n    for i in range(width):\r\n        for j in range(height):\r\n            fractal[i, j] = mandelbrot(complex(x[i], y[j]), 256)\r\n\r\n    plt.imshow(fractal.T, extent=[x_min, x_max, y_min, y_max], cmap='hot')\r\n    plt.colorbar()\r\n    plt.title(\"Mandelbrot Fractal\")\r\n    plt.show()\r\n\r\n# Generate a fractal of the given size\r\ngenerate_fractal(20)\r\n\r\n```\r\n\r\n### Output\r\n\r\n<img src=\"https://github.com/MittaAI/webwright/blob/main/assets/fractal.png?raw=true\" alt=\"Fractal\">\r\n\r\n\r\n### Developer Installation\r\n\r\nFor developers who want to install Webwright for testing, building, and running from source:\r\n\r\n1. **Clone the Repository**\r\n   ```bash\r\n   git clone https://github.com/MittaAI/webwright.git\r\n   cd webwright\r\n   ```\r\n\r\n2. **Set up Conda Environment**\r\n   ```bash\r\n   conda create -n webwright python=3.10\r\n   conda activate webwright\r\n   ```\r\n\r\n3. **Install Dependencies**\r\n   ```bash\r\n   pip install -r requirements.txt\r\n   ```\r\n\r\n4. **Install Git (if not already installed)**\r\n   ```bash\r\n   conda install git\r\n   ```\r\n5. **Add GITHUB_TOKEN to Environment**\r\n   ```bash\r\n   $env:GITHUB_TOKEN = \"your_github_token\"\r\n   ```\r\n6. **Run Webwright from Source**\r\n   ```bash\r\n   python webwright/main.py\r\n   ```\r\n\r\n### Conda Initialization in VSCode\r\n\r\nIf you are using VSCode and need to get conda working in the editor, you might need to run the following command from the `condabin` directory:\r\n\r\n```\r\n./conda init powershell\r\n```\r\n\r\nThis will set up the necessary configuration for conda to work properly within VSCode terminal sessions.\r\n\r\n### Building and Testing\r\n\r\nTo build and test Webwright:\r\n\r\n1. **Install Development Dependencies**\r\n   ```bash\r\n   pip install -r requirements-dev.txt\r\n   ```\r\n\r\n2. **Run Tests**\r\n   ```bash\r\n   pytest\r\n   ```\r\n\r\n3. **Build Package**\r\n   ```bash\r\n   python setup.py sdist bdist_wheel\r\n   ```\r\n\r\n### Git Setup for Developers\r\n\r\nIf you're planning to contribute to Webwright, make sure to set up your Git environment:\r\n\r\n1. **Configure Git**\r\n   ```bash\r\n   git config --global user.name \"Your Name\"\r\n   git config --global user.email \"your.email@example.com\"\r\n   ```\r\n\r\n2. **Create a New Branch for Your Changes**\r\n   ```bash\r\n   git checkout -b feature/your-feature-name\r\n   ```\r\n\r\n3. **Make Your Changes and Commit**\r\n   ```bash\r\n   git add .\r\n   git commit -m \"Description of your changes\"\r\n   ```\r\n\r\n4. **Push Your Changes and Create a Pull Request**\r\n   ```bash\r\n   git push origin feature/your-feature-name\r\n   ```\r\n   Then, go to the GitHub repository and create a pull request for your branch.\r\n\r\nRemember to always pull the latest changes from the main branch before starting your work:\r\n\r\n```bash\r\ngit checkout main\r\ngit pull origin main\r\n```\r\n\r\nFor more detailed contribution guidelines, please refer to our [CONTRIBUTING.md](link-to-contributing-file) file.\r\n\r\n## Documentation\r\n\r\nFor detailed usage instructions and examples, visit the [Webwright Documentation](https://mitta.ai/docs/webwright).\r\n\r\n## Contributing\r\n\r\nWebwright is an open-source project. We welcome contributions!\r\n\r\n## Community and Support\r\n\r\nJoin our community on [Slack](https://join.slack.com/t/mittaai/shared_invite/zt-2azbcv29i-CL74lmOksgvN54jhvmVWeA) for support, discussions, and to share your ideas and feedback.\r\n\r\n## License\r\n\r\nWebwright is open-source software licensed under the [MIT License](https://opensource.org/license/mit).\r\n\r\n---\r\n\r\nWith Webwright, harness the power of AI to enhance your development workflow and make building and managing websites easier and more efficient than ever before. Try it today and experience the future of web development!\r\n\r\n---\r\n\r\n\u00a9 Mitta Corp. All rights reserved 2024.\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Webwright: The Ghost in Your Shell \ud83d\udc7b\ud83d\udcbb",
    "version": "0.0.5",
    "project_urls": {
        "Homepage": "https://github.com/MittaAI/webwright"
    },
    "split_keywords": [
        "ai",
        "terminal",
        "shell",
        "automation",
        "development",
        "tools"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9f068f4c3d810aaa30be2375b2b4244b16ec0b4178c6e842b9bb78db3538c4c7",
                "md5": "6641ba1192fced64d4cdb88447747cfb",
                "sha256": "a7af6b5e6921b923045869f6900f211fc8e908c19a487b08f712b1583d34948b"
            },
            "downloads": -1,
            "filename": "webwright-0.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6641ba1192fced64d4cdb88447747cfb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 70931,
            "upload_time": "2024-09-18T18:29:35",
            "upload_time_iso_8601": "2024-09-18T18:29:35.504485Z",
            "url": "https://files.pythonhosted.org/packages/9f/06/8f4c3d810aaa30be2375b2b4244b16ec0b4178c6e842b9bb78db3538c4c7/webwright-0.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bfbae5e18287154305203cd28b44e485d6fabdeb25b07116f5f6190c09ba2c51",
                "md5": "79d47be8d41c774303e2ef27dc8fdc41",
                "sha256": "9ba44102e9b4bb23037dceb46525b13e42e76cb905ff68dfbd1af5673b9484ad"
            },
            "downloads": -1,
            "filename": "webwright-0.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "79d47be8d41c774303e2ef27dc8fdc41",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 58596,
            "upload_time": "2024-09-18T18:29:37",
            "upload_time_iso_8601": "2024-09-18T18:29:37.035691Z",
            "url": "https://files.pythonhosted.org/packages/bf/ba/e5e18287154305203cd28b44e485d6fabdeb25b07116f5f6190c09ba2c51/webwright-0.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-18 18:29:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "MittaAI",
    "github_project": "webwright",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "gitpython",
            "specs": []
        },
        {
            "name": "prompt_toolkit",
            "specs": []
        },
        {
            "name": "beautifulsoup4",
            "specs": []
        },
        {
            "name": "coolname",
            "specs": []
        },
        {
            "name": "pygments",
            "specs": []
        },
        {
            "name": "openai",
            "specs": []
        },
        {
            "name": "openai",
            "specs": []
        },
        {
            "name": "tenacity",
            "specs": []
        },
        {
            "name": "anthropic",
            "specs": []
        },
        {
            "name": "torch",
            "specs": []
        },
        {
            "name": "transformers",
            "specs": []
        },
        {
            "name": "sentence_transformers",
            "specs": [
                [
                    "==",
                    "2.2.2"
                ]
            ]
        },
        {
            "name": "InstructorEmbedding",
            "specs": []
        },
        {
            "name": "Halo",
            "specs": []
        },
        {
            "name": "PyGithub",
            "specs": []
        },
        {
            "name": "cowsay",
            "specs": []
        },
        {
            "name": "google-generativeai",
            "specs": []
        },
        {
            "name": "unidiff",
            "specs": []
        },
        {
            "name": "patch",
            "specs": []
        }
    ],
    "lcname": "webwright"
}
        
Elapsed time: 2.01411s