{"id":17382928,"url":"https://github.com/eefahd/shell-gateway","last_synced_at":"2026-05-17T02:34:50.842Z","repository":{"id":255079984,"uuid":"848480636","full_name":"eefahd/shell-gateway","owner":"eefahd","description":"Minimal HTTP service for executing shell scripts and commands locally via HTTP requests.","archived":false,"fork":false,"pushed_at":"2024-09-04T18:55:53.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-24T19:31:47.339Z","etag":null,"topics":["api","scripts","shell"],"latest_commit_sha":null,"homepage":"","language":"Go","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/eefahd.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-27T20:52:46.000Z","updated_at":"2024-09-04T18:55:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"2e97fe6f-e60c-4195-9a46-88b3c76454aa","html_url":"https://github.com/eefahd/shell-gateway","commit_stats":null,"previous_names":["eefahd/shell-gateway"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eefahd/shell-gateway","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eefahd%2Fshell-gateway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eefahd%2Fshell-gateway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eefahd%2Fshell-gateway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eefahd%2Fshell-gateway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eefahd","download_url":"https://codeload.github.com/eefahd/shell-gateway/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eefahd%2Fshell-gateway/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33125320,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T18:38:32.183Z","status":"online","status_checked_at":"2026-05-17T02:00:05.366Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["api","scripts","shell"],"created_at":"2024-10-16T07:39:51.475Z","updated_at":"2026-05-17T02:34:50.811Z","avatar_url":"https://github.com/eefahd.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ShellGateway\n\nShellGateway is a minimal HTTP-based command execution service for local use. This tool allows you to execute command-line programs and shell scripts over HTTP requests. It's intended for internal use only, primarily to facilitate communication with local applications that only support frontend plugin development.\n\n**Disclaimer**: This script is provided \"as is\" with no guarantees. Use it at your own risk.\n\n## Design Philosophy\nShellGateway is designed to be a minimal, straightforward solution with minimal configuration requirements:\n- **Simplified Script Management**: All scripts are expected to reside in the specified scripts directory.\n- **Direct URL Mapping**: The request URL corresponds directly to the script or command name, eliminating the need for mapping dictionaries.\n- **Simple Argument Passing**: All arguments are passed as a single string, maintaining simplicity.\n- **No Unnecessary Complexity**: There are no plans to add advanced features or complications, preserving its lightweight nature.\n\n## Installation\n\n### Prerequisites\n\n- Go (Golang) must be installed. You can download it from [here](https://go.dev/doc/install).\n- Ensure your `GOPATH` and `GOROOT` environment variables are set correctly.\n\n### Installation with `go install`\n\n```sh\ngo install github.com/eefahd/shell-gateway@latest\n```\n\n## Environment Setup\n\nEnsure that your Go environment variables are set:\n\n- Add the Go bin directory to your `PATH`:\n\n```sh\nexport PATH=$PATH:$(go env GOPATH)/bin\n```\n\n## Configuration\n\nCreate a `config.json` file in the `.config/shell-gateway/` directory under your home directory with the following content:\n\n```json\n{\n  \"port\": \"9090\",\n  \"api_token\": \"YOUR_TOKEN\",\n  \"scripts_directory\": \"YOUR_SCRIPTS_DIR_PATH\",\n  \"allowed_commands\": [\n    \"YOUR_COMMAND\", // example: echo\n    \"YOUR_COMMAND2\"\n    //...\n  ]\n}\n```\n\n### Note\n- **Allowed Commands**: A list of commands that are allowed to be executed. This setting is only needed to restrict command execution for more security, and does not apply to scripts.\n\n## Running the Server\n\nStart the server by running the binary:\n\n```sh\nshell-gateway\n```\n\n## Making Requests\n\nTo execute a command or script, send an HTTP POST request with the `Authorization` header and, if needed, a JSON body.\n\n### Example: Executing a Command\n\n```sh\ncurl -X POST \"http://localhost:9090/echo\" -H \"Authorization: Bearer YOUR_TOKEN\" -d '{\"arguments\": \"Hello, World!\"}'\n```\n\n### Example: Executing a Script\n\nAssuming you have a script named `test.sh` in your scripts directory:\n\n```sh\ncurl -X POST \"http://localhost:9090/test\" -H \"Authorization: Bearer YOUR_TOKEN\" -d '{\"arguments\": \"arg1 arg2\"}'\n```\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](https://opensource.org/license/mit) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feefahd%2Fshell-gateway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feefahd%2Fshell-gateway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feefahd%2Fshell-gateway/lists"}