{"id":38917321,"url":"https://github.com/libops/cli-sandbox","last_synced_at":"2026-01-17T15:28:38.648Z","repository":{"id":327893692,"uuid":"1111138853","full_name":"libops/cli-sandbox","owner":"libops","description":"gemini, claude, opencode CLI sandbox docker container","archived":false,"fork":false,"pushed_at":"2026-01-02T15:04:05.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-06T15:38:42.470Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/libops.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-06T10:54:26.000Z","updated_at":"2026-01-02T15:04:10.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/libops/cli-sandbox","commit_stats":null,"previous_names":["joecorall/cli-sandbox"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/libops/cli-sandbox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libops%2Fcli-sandbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libops%2Fcli-sandbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libops%2Fcli-sandbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libops%2Fcli-sandbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libops","download_url":"https://codeload.github.com/libops/cli-sandbox/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libops%2Fcli-sandbox/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28511480,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-01-17T15:28:38.536Z","updated_at":"2026-01-17T15:28:38.629Z","avatar_url":"https://github.com/libops.png","language":"Shell","readme":"# cli-sandbox\n\nRun `claude`, `gemini` or `opencode` in a docker container.\n\n`iptables` is used inside the container to block all outbound traffic except GitHub, Anthropic, and Google Cloud internal IPs.\n\n## Requirements\n\n- docker\n  - Need to pass `--cap-add=NET_ADMIN --cap-add=NET_RAW` to the `docker run` command for this image to configure the firewall\n- You will need to mount the codebase you want to work on inside the container\n- To persist your auth and settings for gemini and claude, you'll want to mount those directories into `/home/node` (see usage below)\n\n## Usage\n\n```bash\nCODE_CLI=claude\ncd /path/to/codebase\ndocker run \\\n  -v $HOME/.$CODE_CLI:/home/node/.$CODE_CLI \\\n  --cap-add=NET_ADMIN --cap-add=NET_RAW \\\n  -v ./:/workspace \\\n  -w /workspace \\\n  --rm -it \\\n  ghcr.io/libops/cli-sandbox:main \\\n  \"$CODE_CLI\"\n# chit chat\n```\n\n### alias\n\nWith the following in your shell's dot file, you can\n\n```\ncd path/to/code\ngemini\n```\n\nAnd you’ll get dropped into a sandbox’d docker container with the respective CLI with firewall protection and no host filesystem access besides the claude/gemini settings dir and the codebase mounted into the container. Be sure to uninstall claude or gemini from your machine to avoid conflicts.\n\n```bash\nccli() {\n  if [ \"$#\" != 1 ]; then\n    echo \"Need to pass gemini or claude\"\n    return\n  fi\n\n  local cli=$1\n  if [ \"$cli\" ] != \"opencode\" ] \u0026\u0026 [ \"$cli\" != \"claude\" ] \u0026\u0026 [ \"$cli\" != \"gemini\" ]; then\n    echo \"Need to pass opencode, gemini, or claude\"\n    return\n  fi\n\n  if [ \"$(pwd)\" = \"$HOME\" ]; then\n    echo \"You should cd into your codebase\"\n    echo \"Running this command here would mount your entire home directory into $cli\"\n    return\n  fi\n\n  docker run \\\n    -v $HOME/.$cli:/home/node/.$cli \\\n    --cap-add=NET_ADMIN --cap-add=NET_RAW \\\n    -e COLUMNS=$(tput cols) \\\n    -e LINES=$(tput lines) \\\n    -v ./:/workspace \\\n    -w /workspace \\\n    --rm -it \\\n    ghcr.io/libops/cli-sandbox:main \\\n    \"$cli\"\n}\n\ngemini() {\n  ccli gemini\n}\n\nclaude() {\n  ccli claude\n}\n\nopencode() {\n  ccli opencode\n}\n```\n\n## Attribution\n\n- `Dockerfile` and `init-firewall.sh` forked from [anthropics/claude-code](https://github.com/anthropics/claude-code/tree/main/.devcontainer). Added gemini support and installed `go`\n- `download.sh` copied from [islandora-devops/isle-buildkit](https://github.com/Islandora-Devops/isle-buildkit/tree/main/base/rootfs/usr/local/bin)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibops%2Fcli-sandbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibops%2Fcli-sandbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibops%2Fcli-sandbox/lists"}