{"id":28432552,"url":"https://github.com/abgox/scoop-install","last_synced_at":"2025-07-01T08:31:57.707Z","repository":{"id":295987202,"uuid":"991841507","full_name":"abgox/scoop-install","owner":"abgox","description":"一个 PowerShell 脚本，它允许你添加 Scoop 配置，在 Scoop 安装应用时使用替换后的 url 而不是原始的 url。A PowerShell script that allows you to add Scoop configurations to use a replaced url instead of the original url when installing the app in Scoop.","archived":false,"fork":false,"pushed_at":"2025-06-19T16:02:29.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-19T17:19:46.688Z","etag":null,"topics":["install","scoop","script"],"latest_commit_sha":null,"homepage":"https://gitee.com/abgox/scoop-install","language":"PowerShell","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/abgox.png","metadata":{"files":{"readme":"readme-cn.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,"zenodo":null}},"created_at":"2025-05-28T08:22:36.000Z","updated_at":"2025-06-19T16:02:33.000Z","dependencies_parsed_at":"2025-05-28T12:32:51.174Z","dependency_job_id":"243f2d96-4b0d-4751-a45b-8b342b37e80c","html_url":"https://github.com/abgox/scoop-install","commit_stats":null,"previous_names":["abgox/scoop-install"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/abgox/scoop-install","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abgox%2Fscoop-install","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abgox%2Fscoop-install/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abgox%2Fscoop-install/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abgox%2Fscoop-install/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abgox","download_url":"https://codeload.github.com/abgox/scoop-install/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abgox%2Fscoop-install/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262927716,"owners_count":23386011,"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":["install","scoop","script"],"created_at":"2025-06-05T17:10:10.294Z","updated_at":"2025-07-01T08:31:57.691Z","avatar_url":"https://github.com/abgox.png","language":"PowerShell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003e✨scoop-install✨\u003c/h1\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"readme-cn.md\"\u003e简体中文\u003c/a\u003e |\n    \u003ca href=\"readme.md\"\u003eEnglish\u003c/a\u003e |\n    \u003ca href=\"https://github.com/abgox/scoop-install\"\u003eGithub\u003c/a\u003e |\n    \u003ca href=\"https://gitee.com/abgox/scoop-install\"\u003eGitee\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/abgox/scoop-install/blob/main/license\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/license/abgox/scoop-install\" alt=\"license\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/abgox/scoop-install\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/v/release/abgox/scoop-install?label=version\" alt=\"version\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://img.shields.io/github/languages/code-size/abgox/scoop-install.svg\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/languages/code-size/abgox/scoop-install.svg\" alt=\"code size\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://img.shields.io/github/repo-size/abgox/scoop-install.svg\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/repo-size/abgox/scoop-install.svg\" alt=\"repo size\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/abgox/scoop-install\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/created-at/abgox/scoop-install\" alt=\"created\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n\u003e [!Tip]\n\u003e\n\u003e 推荐使用 [PSCompletions 中的 scoop 和 scoop-install 命令补全](https://gitee.com/abgox/PSCompletions)\n\n## 介绍\n\n一个 PowerShell 脚本，它允许你添加 Scoop 配置，在 Scoop 安装应用时使用替换后的 url 而不是原始的 url\n\n## 安装\n\n```pwsh\nscoop bucket add abyss https://gitee.com/abgox/abyss\nscoop install abyss/abgox.scoop-install\n```\n\n## 使用\n\n1. 设置 url 替换配置\n\n   ```pwsh\n   scoop config scoop-install-url-replace-from \"https://github.com\"\n   scoop config scoop-install-url-replace-to \"https://gh-proxy.com/github.com\"\n   ```\n\n2. 使用 `scoop-install` 命令安装 `abgox.InputTip-zip`\n\n   ```pwsh\n   scoop-install abyss/abgox.InputTip-zip\n   ```\n\n---\n\n- `scoop-install` 可以使用 `-reset` 参数和 `scoop install` 命令的所有参数\n\n- 参考示例:\n\n  - 如果你想清除所有 bucket 中的本地文件更改，避免 `scoop update` 出现远程同步冲突\n\n    ```pwsh\n    scoop-install -reset\n    ```\n\n  - 如果你想在安装 `abyss/abgox.InputTip-zip` 时不更新 Scoop，可以使用 `-u` 或 `--no-update-scoop`\n\n    ```pwsh\n    scoop-install abyss/abgox.InputTip-zip -u\n    ```\n\n  - 如果你还不想使用下载缓存，可以使用 `-k` 或 `--no-cache`\n    ```pwsh\n    scoop-install abyss/abgox.InputTip-zip -u --no-cache\n    ```\n\n## 实现原理\n\n\u003e [!Tip]\n\u003e\n\u003e 当你运行 `scoop-install abyss/abgox.InputTip-zip` 时，scoop-install 会执行以下逻辑\n\n1. scoop-install 会读取以下两个配置项的值\n\n   - `scoop-install-url-replace-from`: 需要替换的 url 前缀\n   - `scoop-install-url-replace-to`: 替换后的 url 前缀\n\n2. scoop-install 会根据配置项的值替换 `abyss/abgox.InputTip-zip.json` 这个清单文件中的 url\n\n   - 假如你使用了以下配置\n\n     - `scoop-install-url-replace-from` 的值为 `https://github.com`\n     - `scoop-install-url-replace-to` 的值为 `https://gh-proxy.com/github.com`\n\n   - 这表示要将 url 中的 `https://github.com` 替换为 `https://gh-proxy.com/github.com`\n\n3. 替换完成后，scoop-install 才会执行 `scoop install abyss/abgox.InputTip-zip`\n\n   - 由于清单中的 url 已经替换为了 `https://gh-proxy.com/github.com`\n   - 所以 `scoop` 会从 `https://gh-proxy.com/github.com` 下载安装包\n\n4. 当安装完成或使用 `Ctrl + C` 终止安装后，scoop-install 会清除掉 `abyss/abgox.InputTip-zip.json` 这个清单文件的本地更改\n\n   - 如果安装过程中，直接关掉终端，scoop-install 无法继续清除本地更改\n   - 这可能导致因为本地残留的更改，`scoop update` 无法正常的同步远程 bucket 仓库\n   - 此时，你需要运行 `scoop-install -reset`，它会清除所有 bucket 中的本地文件更改\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabgox%2Fscoop-install","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabgox%2Fscoop-install","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabgox%2Fscoop-install/lists"}