{"id":50329241,"url":"https://github.com/srcrs/docker-cli-wrapper","last_synced_at":"2026-05-29T08:32:38.570Z","repository":{"id":356915591,"uuid":"1234575755","full_name":"srcrs/docker-cli-wrapper","owner":"srcrs","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-10T11:32:10.000Z","size":185,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-10T13:42:22.861Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/srcrs.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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-10T11:16:16.000Z","updated_at":"2026-05-10T11:32:14.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/srcrs/docker-cli-wrapper","commit_stats":null,"previous_names":["srcrs/docker-cli-wrapper"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/srcrs/docker-cli-wrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srcrs%2Fdocker-cli-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srcrs%2Fdocker-cli-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srcrs%2Fdocker-cli-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srcrs%2Fdocker-cli-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srcrs","download_url":"https://codeload.github.com/srcrs/docker-cli-wrapper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srcrs%2Fdocker-cli-wrapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33644305,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","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":[],"created_at":"2026-05-29T08:32:34.004Z","updated_at":"2026-05-29T08:32:38.564Z","avatar_url":"https://github.com/srcrs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker CLI Wrapper\n\n用 Docker 运行 npm 工具，主机不需要安装 Node.js/npm。\n\n## 原理\n\n每个 npm 工具用一个 shell wrapper 封装，通过 `docker run` 直接执行，用完即删，配置文件通过 volume 挂载到 `~/.tool-name`，运行后自动修复属主。\n\n参考了 [Trellis CLI](https://github.com/mindfoldhq/trellis) 的实现方式。\n\n## 结构\n\n```\n.\n├── wrappers/          # wrapper 脚本目录\n│   ├── mmx            # MiniMax CLI wrapper\n│   └── trellis        # Trellis CLI wrapper\n├── Makefile\n└── README.md\n```\n\n## 添加新 wrapper\n\n复制 `wrappers/mmx` 模板，改三处：\n\n```bash\n#!/usr/bin/env bash\n# \u003ctool-name\u003e wrapper - runs \u003cnpm-package\u003e inside Docker\n\nset -e\n\n_uid=$(id -u)\n_gid=$(id -g)\n_config_dir=\"${HOME}/.\u003ctool-name\u003e\"\n\nexec docker run --rm -i \\\n  -v \"${_config_dir}:/home/app/.\u003ctool-name\u003e\" \\\n  -w /home/app \\\n  node:22-alpine \\\n  sh -c \"\n    npm install -g --force \u003cnpm-package\u003e \u003e/dev/null 2\u003e\u00261\n    _rc=0\n    \u003cnpm-command\u003e \\\"\\$@\\\" || _rc=\\$?\n    find /home/app/.\u003ctool-name\u003e -not -user ${_uid} -exec chown ${_uid}:${_gid} {} + 2\u003e/dev/null || true\n    exit \\$_rc\n  \" -- \"$@\"\n```\n\n安装到 `~/.local/bin/`：\n\n```bash\ncp wrappers/\u003ctool-name\u003e ~/.local/bin/\u003ctool-name\u003e\nchmod +x ~/.local/bin/\u003ctool-name\u003e\n```\n\n## 当前可用\n\n### mmx (MiniMax CLI)\n\n```bash\n# 安装\ncp wrappers/mmx ~/.local/bin/mmx \u0026\u0026 chmod +x ~/.local/bin/mmx\n\n# 配置（API key 存在 ~/.mmx/config.json）\nmmx config set --key api-key --value your-key\nmmx config set --key region --value cn\n\n# 使用\nmmx text chat \"hello\"\nmmx image generate \"一只猫\"\nmmx speech synthesize \"你好\"\nmmx music generate \"轻快音乐\"\n```\n\n### trellis (Trellis CLI)\n\n```bash\n# 安装\ncp wrappers/trellis ~/.local/bin/trellis \u0026\u0026 chmod +x ~/.local/bin/trellis\n\n# 使用（在仓库根目录执行）\ntrellis check\ntrellis implement \"task-name\"\n```\n\n注意：trellis wrapper 会在容器内自动安装 python3、git、bash 等依赖。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrcrs%2Fdocker-cli-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrcrs%2Fdocker-cli-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrcrs%2Fdocker-cli-wrapper/lists"}