{"id":18105388,"url":"https://github.com/bjesus/localcommand","last_synced_at":"2025-07-14T16:06:43.997Z","repository":{"id":152889520,"uuid":"626038283","full_name":"bjesus/localcommand","owner":"bjesus","description":"Run local commands straight from the web 🪄","archived":false,"fork":false,"pushed_at":"2023-04-14T07:07:26.000Z","size":126,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-04T22:58:10.795Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/bjesus.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":"2023-04-10T17:03:34.000Z","updated_at":"2025-03-14T11:28:49.000Z","dependencies_parsed_at":"2024-06-21T16:27:36.231Z","dependency_job_id":"953db21c-be27-4872-a63d-1141e62665dd","html_url":"https://github.com/bjesus/localcommand","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/bjesus/localcommand","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjesus%2Flocalcommand","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjesus%2Flocalcommand/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjesus%2Flocalcommand/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjesus%2Flocalcommand/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bjesus","download_url":"https://codeload.github.com/bjesus/localcommand/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjesus%2Flocalcommand/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265314506,"owners_count":23745282,"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":[],"created_at":"2024-10-31T22:18:34.409Z","updated_at":"2025-07-14T16:06:43.966Z","avatar_url":"https://github.com/bjesus.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  🖥️ Local Command 🖥️\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cb\u003eRun local commands directly from the web!\u003c/b\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/License-MIT-green.svg\"\u003e\n\u003c/p\u003e\n\n\n\nhttps://user-images.githubusercontent.com/55081/231964667-556f9308-22d4-42bc-b091-a7072853bfb1.mp4\n\n\n\n---\nLocal Command is an interface for running local commands directly from the web. It lets you use links with the `cmd://` scheme, like `cmd://ls -l` or any other command you want to run. It can be useful for triggering actions directly from internal dashboards.\n\n## Usage\n\nThe `localcommand` program expects a string argument string starting with `cmd://` followed by a URL-encoded command, for example, `localcommand cmd://uname` or `localcommand cmd://ls%20-l`. After registering it as a scheme handler for `cmd://`, you can use `cmd://` links to invoke commands form your browser. Local Command asks for confirmation before running a command, unless you define this command as pre-approved. You can configure almost everything about the way it runs: whether to run commands in a terminal (and which), how to approve running commands, and what to do with their output.\n\nYou can test Local Command by trying to run `echo it worked!` [here](https://cmd.bjesus.workers.dev/echo%20it%20worked!).\n\n## Configuration\n\nLocal Command requires a configuration file to run. On Linux, this file will be placed under `~/.config/localcommand/config.toml`. On macOS, it's `~/Library/Application Support/localcommand/config.toml`. If you're unsure about the path in your OS, check out the [xdg](https://github.com/adrg/xdg) library, or just run Local Command and it will tell you where it expects the file.\n\nSee [example.toml](example.toml) for configuration reference.\n\n## Installation\n\nObtain the `localcommand` binary from the [Releases](https://github.com/bjesus/localcommand/releases) page or compile it yourself.\n\n### Linux\n\n1. Place the binary in your path\n2. Place the [desktop file](localcommand.desktop) in `/usr/share/applications`\n\nFor Arch Linux, use [the AUR package](https://aur.archlinux.org/packages/localcommand).\n\n\n### macOS\n\n1. Place the binary under `/Applications`\n2. `git clone` the repo and copy to `Local Command.app` folder to `/Applications`\n3. If using the default config.toml, make sure to `brew install zenity` first. You might need to set your config to use `/usr/loca/bin/zenity` instead of `zenity`\n4. If the `cmd://` scheme still isn't working, try `brew install duti \u0026\u0026 duti -s org.bjesus.LocalCommand cmd`\n\nI'm not a macOS user, so if you think there's an easier way to set this up, let me know!\n\n### Troubleshooting\n\nFor Firefox, you might need to edit `handlers.json` and add the following under the `schemes` key:\n\n```json\n\"cmd\": {\n  \"action\": 2,\n  \"handlers\": [\n    {\n      \"name\": \"localcommand\",\n      \"path\": \"/usr/bin/localcommand\"\n    }\n  ]\n},\n```\n\n## Isn't this dangerous?\n\nMaybe, but I couldn't find out how. Do tell me if you find an issue! It's always a good idea to be cautious when running commands from the web. I recommend that you only use Local Command with trusted sources. If you're running the command in a terminal, I highly recommend not using `sh` because it might allow running unapproved commands as approved, e.g. by calling commands like `approved \u0026\u0026 unapproved`.\n\n## Related\n\n- [Zenity](https://help.gnome.org/users/zenity/3.32/) - used in the example config to confirm and show commands output\n- [Platypus](https://github.com/sveinbjornt/Platypus/) - used to wrap the binary with a macOS bundle app (whatever that is!) and register the scheme\n- [duti](https://github.com/moretension/duti/) - a useful tool for selecting default applications for file types and URI schemes\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjesus%2Flocalcommand","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbjesus%2Flocalcommand","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjesus%2Flocalcommand/lists"}