{"id":13439082,"url":"https://github.com/1player/host-spawn","last_synced_at":"2025-12-15T22:48:35.111Z","repository":{"id":43640283,"uuid":"511190378","full_name":"1player/host-spawn","owner":"1player","description":"Run commands on your host from inside your toolbox or flatpak sandbox","archived":false,"fork":false,"pushed_at":"2025-07-31T10:35:01.000Z","size":57,"stargazers_count":151,"open_issues_count":3,"forks_count":8,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-10-13T03:36:49.543Z","etag":null,"topics":["containers","distrobox","flatpak","linux","sandbox","silverblue","toolbox"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit-0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1player.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2022-07-06T15:21:37.000Z","updated_at":"2025-10-11T10:19:28.000Z","dependencies_parsed_at":"2023-12-21T12:12:02.478Z","dependency_job_id":"b3663dd6-2a2c-4867-8a15-c28a3f395b86","html_url":"https://github.com/1player/host-spawn","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/1player/host-spawn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1player%2Fhost-spawn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1player%2Fhost-spawn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1player%2Fhost-spawn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1player%2Fhost-spawn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1player","download_url":"https://codeload.github.com/1player/host-spawn/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1player%2Fhost-spawn/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27757475,"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","status":"online","status_checked_at":"2025-12-15T02:00:09.782Z","response_time":96,"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":["containers","distrobox","flatpak","linux","sandbox","silverblue","toolbox"],"created_at":"2024-07-31T03:01:10.980Z","updated_at":"2025-12-15T22:48:35.081Z","avatar_url":"https://github.com/1player.png","language":"Go","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"# host-spawn\n\nRun commands on your host machine from inside your flatpak sandbox, [toolbox](https://github.com/containers/toolbox) or [distrobox](https://github.com/89luca89/distrobox) containers.\n\nOriginally started as a reimplementation of `flatpak-spawn --host`.\n\n## Recommended setup\n\n**Note:** Distrobox already ships with host-spawn. You might be better served by using their wrapper `distrobox-host-exec` which runs host-spawn under the hood.\n\n* Install host-spawn in a location visible only to the container. I recommend `/usr/local/bin`.\n* Make sure it is executable with `chmod +x host-spawn`\n\n## How to use\n\n* `host-spawn` with no argument will open a shell on your host.\n* `host-spawn command...` will run the command on your host.\n\nRun `host-spawn -h` for more options.\n\n## Creating shims for host binaries\n\nIf there's a process that you always want to execute on the host system, you can\ncreate a symlink to it somewhere in your $PATH and it'll always be executed through `host-spawn`.\n\nExample of creating a shim for the `flatpak` command:\n\n```\n# Inside your container:\n\n$ flatpak --version\nzsh: command not found: flatpak\n\n# Have host-spawn handle any flatpak command\n$ ln -s /usr/local/bin/host-spawn /usr/local/bin/flatpak\n\n# Now flatpak will always be executed on the host\n$ flatpak --version\nFlatpak 1.12.7\n```\n\n**Note:** you will want to store the symlink in a location visible only to the container, to avoid an infinite loop. If you are using toolbox/distrobox, this means anywhere outside your home directory. I recommend `/usr/local/bin`.\n\n## Improvements over flatpak-spawn --host\n\n* Allocates a pty for the spawned process, fixing the following upstream issues: https://github.com/flatpak/flatpak/issues/3697, https://github.com/flatpak/flatpak/issues/3285 and https://github.com/flatpak/flatpak-xdg-utils/issues/57\n* Handles SIGWINCH (terminal size changes)\n* Passes through `$TERM` environment variable\n* Shims host binaries when symlinked, see section above\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1player%2Fhost-spawn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1player%2Fhost-spawn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1player%2Fhost-spawn/lists"}