{"id":19458183,"url":"https://github.com/longtian/qshell-cli","last_synced_at":"2026-03-11T17:03:02.173Z","repository":{"id":82330435,"uuid":"75999406","full_name":"longtian/qshell-cli","owner":"longtian","description":"使用 NPM 下载 qshell 到本地","archived":false,"fork":false,"pushed_at":"2017-03-26T03:28:49.000Z","size":15,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-30T13:37:20.497Z","etag":null,"topics":["qshell"],"latest_commit_sha":null,"homepage":"http://developer.qiniu.com/code/v6/tool/qshell.html","language":"JavaScript","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/longtian.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":"2016-12-09T03:46:49.000Z","updated_at":"2024-09-20T03:09:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"1bfe28c7-4cc3-4206-95b4-fd2e4dbc811d","html_url":"https://github.com/longtian/qshell-cli","commit_stats":null,"previous_names":["wyvernnot/qshell-cli"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longtian%2Fqshell-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longtian%2Fqshell-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longtian%2Fqshell-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/longtian%2Fqshell-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/longtian","download_url":"https://codeload.github.com/longtian/qshell-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250760891,"owners_count":21482887,"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":["qshell"],"created_at":"2024-11-10T17:25:45.715Z","updated_at":"2026-03-11T17:03:01.960Z","avatar_url":"https://github.com/longtian.png","language":"JavaScript","readme":"# qshell-cli\n[![](https://img.shields.io/npm/v/qshell-cli.svg)](https://www.npmjs.com/package/qshell-cli)\n[![](https://img.shields.io/travis/wyvernnot/qshell-cli.svg)](https://travis-ci.org/wyvernnot/qshell-cli)\n[![](https://img.shields.io/npm/dm/qshell-cli.svg)](http://npm-stat.com/charts.html?package=qshell-cli)\n[![](https://img.shields.io/npm/l/qshell-cli.svg)](https://github.com/wyvernnot/qshell-cli/blob/master/LICENSE)\n\n\u003e 自动安装七牛命令行工具 `qshell` 到 `Node.js` 项目的依赖里\n\n## 安装\n\n```\nnpm install qshell-cli --save-dev\n```\n\n## 使用\n\n#### 第 1 种：直接使用原始的 `qshell` 可执行文件\n\n```\n./node_modules/qshell-cli/vendor/qshell -h\n```\n\n#### 第 2 种：推荐在 `NPM Scripts` 中使用，因为 `NPM` 会自动修改 `PATH` 环境变量\n\n要用 `npm run deploy` 的方式上传文件到七牛，可以修改 `package.json` \n\n```\n{\n  \"scripts\":{\n    \"deploy\":\"qshell qupload qiniu.config.js\" \n  }\n}\n```\n\n`qiniu.config.js` 是 `qshell` 上传文件的配置文件\n\n## 关于\n\n#### 为什么把 qshell 当成一个 NPM 的依赖\n\n像 `qshell` 这样的部署工具一般只有运维人员才会用到，但对于提倡 `DevOps` 文化的团队来说，把部署工具也放进项目依赖里会非常方便。\n这一点也是受到了 [12factor](https://12factor.net/zh_cn/) 里 `显式声明依赖关系` 这一条的启发。\n\n#### 可选使用其它 CDN 地址\n\n默认会从 `http://devtools.qiniu.com/qshell-{version}.zip` 来下载，你也可以使用其它的地址：\n\n```\nnpm config qshell_cdnurl='http://10.0.0.1/path/qshell-{version}.zip'\n```\n\n不过 `qshell-cli` 为了保障安全和完整性，压缩包下载完成后会强制做 `md5` 校验，所以请确保使用从七牛官方下载的原始压缩包。\n\n## Inspired by\n\nhttps://github.com/Medium/phantomjs/blob/master/install.js\n\n## Lincense\n\nMIT\n\n--------\n\nWe \u003c3 Qiniu\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flongtian%2Fqshell-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flongtian%2Fqshell-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flongtian%2Fqshell-cli/lists"}