https://github.com/linuxfandudeguy/webshell
Web-based fedora experience possible using an API.
https://github.com/linuxfandudeguy/webshell
fedora linux terminal webterminal webvm
Last synced: about 2 months ago
JSON representation
Web-based fedora experience possible using an API.
- Host: GitHub
- URL: https://github.com/linuxfandudeguy/webshell
- Owner: linuxfandudeguy
- License: cc0-1.0
- Created: 2024-07-27T01:15:23.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-08-30T19:33:24.000Z (8 months ago)
- Last Synced: 2025-01-21T04:28:26.572Z (3 months ago)
- Topics: fedora, linux, terminal, webterminal, webvm
- Language: HTML
- Homepage: https://webshell-omega.vercel.app
- Size: 1.07 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WebShell

WebShell is a browser-based Linux terminal experience designed for **testing**. This project was created as an experiment to see if the node.js module `child_process` with the export `exec` could power an entire terminal, and to fulfill the need for terminal technologies in the browser.
## Features
- **RHEL-based terminal**: The terminal uses **Amazon Linux**, which is based on **Fedora/CentOS**.
- **Browser-based**: Access a fully interactive Linux terminal directly from your browser.
- **Pre-installed tools**: Essential development tools and utilities are available.
- **API Access**: Programmatically run commands via an API.## API
WebShell includes an API to execute commands programmatically.
### Endpoint
```http
URL: https://web-terminal-eight.vercel.app/run
Method: POST
Headers: Content-Type: application/json
Body: {"command": "your_linux_command_here"}
```### Example
To try it, run the following command in your system terminal if `curl` is installed:
```bash
curl -X POST https://web-terminal-eight.vercel.app/run -H "Content-Type: application/json" -d '{"command": "ls -l"}'
```## Screenshots
### Terminal View

### API View
## Customization Commands
WebShell has a variety of commands that allow you to customize your shell to however you want.
- `setfontsize` - Allows you to change the size of the text using `px` or `em`.
- `setfont` - Allows you to change the font of the terminal by providing a font URL in `otf` or `ttf`.
- `setcolor` - Allows you to change the background color by providing a hex code.
- `setbgcolor` - Allows you to change the background color by providing a hex code.
- `setprompt` - Allows you to change the prompt of the terminal `admin@webshell:~$` to whatever you want.The usage example of each command is below:
```bash
setfont https://webshell-omega.vercel.app/assets/fonts/Pixel_NES.ttf
```
```bash
setcolor #ff0000
```
```bash
setbgcolor #000000
```
```bash
setfontsize 16px
``````bash
setprompt foo@localhost~$
```## How it Works
WebShell uses AWS with a Node.js runtime deployed on Vercel. The `typeset` command in the terminal can display the environment variables.
WebShell uses the `child_process.exec` export to run commands.
> **NOTE**: WebShell Should not be used for complicated tasks due to its restrictions.
## Updates
WebShell now has node.js support! Just type `node` and then You can run JavaScript.
## Licensing
WebShell is licensed under the CC0-1.0 license.
## Contact
For more information, please contact the creator.