{"id":17996961,"url":"https://github.com/jstrieb/webash","last_synced_at":"2025-03-26T04:30:59.401Z","repository":{"id":205726196,"uuid":"714835432","full_name":"jstrieb/webash","owner":"jstrieb","description":"A cursed bash web application that makes more cursed bash web applications","archived":false,"fork":false,"pushed_at":"2023-11-06T06:42:47.000Z","size":43,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-21T05:22:22.489Z","etag":null,"topics":["bash","gui","posix-sh","quickserv","shell","shell-script","web","web-gui"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/jstrieb.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}},"created_at":"2023-11-05T23:49:26.000Z","updated_at":"2024-01-12T02:50:29.000Z","dependencies_parsed_at":"2023-11-06T07:27:24.998Z","dependency_job_id":null,"html_url":"https://github.com/jstrieb/webash","commit_stats":null,"previous_names":["jstrieb/webash"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstrieb%2Fwebash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstrieb%2Fwebash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstrieb%2Fwebash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jstrieb%2Fwebash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jstrieb","download_url":"https://codeload.github.com/jstrieb/webash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245589185,"owners_count":20640240,"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":["bash","gui","posix-sh","quickserv","shell","shell-script","web","web-gui"],"created_at":"2024-10-29T21:16:23.952Z","updated_at":"2025-03-26T04:30:59.089Z","avatar_url":"https://github.com/jstrieb.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webash\n\nWebash (web + bash) creates web interfaces for console applications by\nextracting flags and options from programs' help text. With webash, you can run\nshell commands from any phone or laptop without leaving the browser.\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"https://github.com/jstrieb/webash/assets/7355528/0a15342f-b97d-4b80-8e66-a3dede595059\" width=\"90%\" /\u003e\n\u003c/div\u003e\n\nWebash is specifically built to be used with\n[QuickServ](https://github.com/jstrieb/quickserv), a simple web server with a\nfresh take on the common gateway interface (CGI). \n\nQuickServ serves static files directly, but executes scripts and programs. It\npasses GET parameters to executing programs as command-line arguments, and\npasses POST data on standard input. Then, it responds to the user by wrapping\nany data echoed to the standard output with the correct MIME type and the\nappropriate HTTP headers (e.g., for CORS).\n\nUsing QuickServ, any console application becomes a web application back end\nwith no additional changes. Before webash, creating a front end interface was\nthe most tedious part of using QuickServ. Now, webash automates the process by\ncreating web interfaces from any program's help text.\n\nIn other words, with QuickServ and webash, it is trivial to turn any console\nprogram into a web application with a functional front end and back end.\n\nWebash, itself, is a portable, POSIX-compatible shell script that can be run\noffline to generate static HTML, or online via QuickServ to dynamically\ngenerate interfaces for console programs.\n\n\n# Examples\n\nExample web interfaces have been generated for a handful of common shell\ncommands. \n\n\u003c!--\n  Generated with:\n\n  ls examples/ \\\n    | grep -v index \\\n    | sed 's,^\\(.*\\).html$,- [`\\1`](https://jstrieb.github.io/webash/\\1.html),g'\n--\u003e\n\n- [`dir`](https://jstrieb.github.io/webash/dir.html)\n- [`gas`](https://jstrieb.github.io/webash/gas.html)\n- [`htop`](https://jstrieb.github.io/webash/htop.html)\n- [`hwclock`](https://jstrieb.github.io/webash/hwclock.html)\n- [`install`](https://jstrieb.github.io/webash/install.html)\n- [`mount`](https://jstrieb.github.io/webash/mount.html)\n- [`tar`](https://jstrieb.github.io/webash/tar.html)\n- [`xargs`](https://jstrieb.github.io/webash/xargs.html)\n\n\n# Quick Start \u0026 Installation\n\nFor most use cases, webash should be used offline to generate an interface that\ngets manually modified before being used with QuickServ. But for demonstration\npurposes, the following steps will set up webash to dynamically generate\ninterfaces for any command line application on the host system's `PATH`.\n\n1. [Install QuickServ.](https://github.com/jstrieb/quickserv/#get-started)\n1. Clone this repository locally and `cd` into the repository root directory.\n\n   ``` bash\n   git clone https://github.com/jstrieb/webash.git\n   cd webash\n   ```\n1. Optionally, allow the interface to run commands (arbitrary remote code\n   execution on the server computer – **very unsafe!**) by [uncommenting these\n   lines in the\n   code](https://github.com/jstrieb/webash/blob/46b3ee14fec3162d4863f5b22ced987db471f117/index.sh#L124-L129).\n1. Run `quickserv` in the repo root.\n1. Go to \u003chttp://localhost:42069\u003e in the browser.\n1. Pick a command-line program, and check out the generated interface.\n\n\n## Static HTML\n\nIt is safer to use webash to generate static HTML interfaces for individual\nconsole applications than to run it dynamically.\n\n```\n# Install webash into the PATH (only needs to be done once)\nsudo curl \\\n  --location \\\n  -o /usr/local/bin/webash \\\n  \"https://github.com/jstrieb/webash/raw/master/index.sh\"\nsudo chmod +x /usr/local/bin/webash \n\n# Generate HTML for your program with webash\nwebash links/my_program.py \u003e index.html\n\n# Run QuickServ to serve the front end and execute the back end\nquickserv\n```\n\n\n# Project Status \u0026 Contributing\n\nThis project is actively maintained, but no new features are planned. If there\nare no recent commits, it means that everything is running smoothly!\n\nPlease [open an issue](https://github.com/jstrieb/webash/issues/new) with any\nbugs, suggestions, or questions. \n\n\n## Known Issues\n\nWebash can only automatically extract command-line arguments from the most\ncommon help text formats. It uses simple regular expression-based normalization\nand pattern matching, and is therefore somewhat brittle. It is also not\nparticularly performant.\n\n\n# Support the Project\n\nThere are a few ways to support the project:\n\n- Star the repository and follow me on GitHub\n- Share and upvote on sites like Twitter, Reddit, and Hacker News\n- Report any bugs, glitches, or errors that you find\n- Build and share your own projects made with QuickServ\n\nThese things motivate me to to keep sharing what I build, and they provide\nvalidation that my work is appreciated! They also help me improve the project.\nThanks in advance!\n\nIf you are insistent on spending money to show your support, I encourage you to\ninstead make a generous donation to one of the following organizations. By\nadvocating for Internet freedoms, organizations like these help me to feel\ncomfortable releasing work publicly on the Web.\n\n- [Electronic Frontier Foundation](https://supporters.eff.org/donate/)\n- [Signal Foundation](https://signal.org/donate/)\n- [Mozilla](https://donate.mozilla.org/en-US/)\n- [The Internet Archive](https://archive.org/donate/index.php)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjstrieb%2Fwebash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjstrieb%2Fwebash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjstrieb%2Fwebash/lists"}