{"id":19686135,"url":"https://github.com/loiccoyle/shiv","last_synced_at":"2026-05-06T13:15:55.974Z","repository":{"id":201225375,"uuid":"612475894","full_name":"loiccoyle/shiv","owner":"loiccoyle","description":"🐚 Run shell commands from any text box, kinda...","archived":false,"fork":false,"pushed_at":"2024-10-01T16:08:56.000Z","size":104,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-10T07:11:54.861Z","etag":null,"topics":["input-method","linux","shell"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/loiccoyle.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-03-11T03:48:22.000Z","updated_at":"2024-10-01T16:09:00.000Z","dependencies_parsed_at":"2024-04-26T23:15:07.745Z","dependency_job_id":null,"html_url":"https://github.com/loiccoyle/shiv","commit_stats":null,"previous_names":["loiccoyle/shiv"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loiccoyle%2Fshiv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loiccoyle%2Fshiv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loiccoyle%2Fshiv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loiccoyle%2Fshiv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loiccoyle","download_url":"https://codeload.github.com/loiccoyle/shiv/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240993950,"owners_count":19890419,"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":["input-method","linux","shell"],"created_at":"2024-11-11T18:26:18.472Z","updated_at":"2026-05-06T13:15:50.932Z","avatar_url":"https://github.com/loiccoyle.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# shiv\n\n`shiv` is a jankier version of [`shin`](https://github.com/p-e-w/shin), which does not require `ibus`.\n\nIt allows you to run shell commands from any text box.\n\n## ❓ How\n\nWhen started, `shiv` grabs the user's keyboard and creates a virtual pass-through keyboard.\n\nIt keeps track of the user's inputs and forwards them selectively to the virtual keyboard.\n\nWhen the enter key is pressed, the provided command is run and its output is pasted in (or typed out using the `-T` option).\n\n\u003e **Note:** To create and grab the keyboard devices `shiv` needs elevated privileges. To help with this, a `polkit` file is available in the [`extra`](https://github.com/loiccoyle/shiv/tree/main/extra) folder. The command, however, is run as the invoking user.\n\n## 📋 Usage\n\n`shiv` is designed to be bound to a key combination.\n\nFor example, using [`sxhkd`](https://github.com/baskerville/sxhkd):\n\n```sxhkd\nsuper + i; any + g\n    sudo -E shiv -d 5 \"sgpt\"\nsuper + i; any + f\n    sudo -E shiv -d 5 \"figlet\"\nsuper + i; any + i\n    sudo -E shiv -d 5\n```\n\nAs always, if in doubt, see the `--help`:\n\n\u003c!-- help start --\u003e\n\n```console\n$ shiv --help\nShiv: shell access everywhere.\n\nShiv allows you to run shell commands from any text box.\nWhen started, it listens for keyboard inputs, on Enter it will run the command and write the output.\n\nThe recommended way to use shiv is to bind it to a key combination.\n\nExamples:\n  • On demand python shell:\n    $ shiv \"python -c\"\n  • Query ChatGPT:\n    $ shiv \"sgpt\"\n  • On demand calculator and conversions:\n    $ shiv \"qalc -t\"\n  • ASCII art:\n    $ shiv \"figlet\"\n\nUsage: shiv [OPTIONS] [PRE_CMD]\n\nArguments:\n  [PRE_CMD]\n          Prefix input with this command\n          \n          [default: \"bash -c\"]\n\nOptions:\n  -T, --type-output\n          Type out the command output instead of pasting it\n\n  -d, --key-delay \u003cKEY_DELAY\u003e\n          Add delay between keypresses, in ms, values between 1 and 10 work best\n          \n          [default: 5]\n\n  -v, --verbose...\n          Increase verbosity\n\n  -q, --quiet...\n          Decrease verbosity\n\n  -h, --help\n          Print help (see a summary with '-h')\n\n  -V, --version\n          Print version\n\nNote: shiv requires priviledges to create and access keyboard devices.\n```\n\n\u003c!-- help end --\u003e\n\n## ✔️ TODO\n\n- [x] add a cli\n- [x] add tests\n- [x] add ci\n- [x] Run command in separate thread, and still allow user to cancel running command.\n- [ ] look into better permission handling\n- [ ] test on different layouts\n- [ ] Give some feedback that the command is running\n- [ ] Look into \u003chttps://github.com/chris-ricketts/keyboard-layouts\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floiccoyle%2Fshiv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floiccoyle%2Fshiv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floiccoyle%2Fshiv/lists"}