# 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.
We are strongly hoping to have support for Ollama soon.
## π 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.
## π οΈ 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
```
## 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 a 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 --no-deps -U chroma-hnswlib==0.7.3
```
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**
Install all dependencies except chroma-hnswlib (current version has issues)
```
pip install -r <(grep -v chroma-hnswlib requirements.txt)
```
Install the specific version of chroma-hnswlib
```
pip install --no-deps chroma-hnswlib==0.7.3
```
Install remaining dependencies
```
pip install -r requirements.txt
```
2. **Run Tests**
```bash
pytest
```
NOT WORKING.
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).
Β© 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/db/d8/003ad050489b34c0a3ed9731b9f305f82c29bb3cabb33555a94978c9ead9/webwright-0.0.7.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\nWe are strongly hoping to have support for Ollama soon.\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## \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## 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 a 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 --no-deps -U chroma-hnswlib==0.7.3\r\n ```\r\n\r\n4. **Install Git (if not already installed)**\r\n ```bash\r\n conda install git\r\n ```\r\n\r\n5. **Add GITHUB_TOKEN to Environment**\r\n ```bash\r\n $env:GITHUB_TOKEN = \"your_github_token\"\r\n ```\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\nInstall all dependencies except chroma-hnswlib (current version has issues)\r\n```\r\npip install -r <(grep -v chroma-hnswlib requirements.txt)\r\n```\r\n\r\nInstall the specific version of chroma-hnswlib\r\n```\r\npip install --no-deps chroma-hnswlib==0.7.3\r\n```\r\n\r\nInstall remaining dependencies\r\n```\r\npip install -r requirements.txt\r\n```\r\n\r\n2. **Run Tests**\r\n ```bash\r\n pytest\r\n ```\r\nNOT WORKING.\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\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.7",
"project_urls": {
"Homepage": "https://github.com/MittaAI/webwright"
},
"split_keywords": [
"ai",
"terminal",
"shell",
"automation",
"development",
"tools"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "21299234857032d948c9d0f9ac8cc980137c1b02e637cda83cc6b1074c90b250",
"md5": "bbe92151232a4e248698e6fc4325c22d",
"sha256": "cb9221e89401010d8aefd30e4a084530a918b99dce625fbd0394a785a147dadb"
},
"downloads": -1,
"filename": "webwright-0.0.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bbe92151232a4e248698e6fc4325c22d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 70457,
"upload_time": "2024-10-17T22:34:50",
"upload_time_iso_8601": "2024-10-17T22:34:50.214143Z",
"url": "https://files.pythonhosted.org/packages/21/29/9234857032d948c9d0f9ac8cc980137c1b02e637cda83cc6b1074c90b250/webwright-0.0.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "dbd8003ad050489b34c0a3ed9731b9f305f82c29bb3cabb33555a94978c9ead9",
"md5": "0fb84c621a99f71db11d974b799dc3db",
"sha256": "1f64707326b1a938b24d7125001eb868a528a66855569df11a2e24acf5746ea3"
},
"downloads": -1,
"filename": "webwright-0.0.7.tar.gz",
"has_sig": false,
"md5_digest": "0fb84c621a99f71db11d974b799dc3db",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 58521,
"upload_time": "2024-10-17T22:34:52",
"upload_time_iso_8601": "2024-10-17T22:34:52.286148Z",
"url": "https://files.pythonhosted.org/packages/db/d8/003ad050489b34c0a3ed9731b9f305f82c29bb3cabb33555a94978c9ead9/webwright-0.0.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-17 22:34:52",
"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": []
},
{
"name": "chromadb",
"specs": [
[
"==",
"0.5.5"
]
]
},
{
"name": "playsound",
"specs": []
}
],
"lcname": "webwright"
}