✨ scoop-tools ✨
简体中文 | English | Github | Gitee
Star ⭐️ or Donate 💰 if you like it!
Tip
scoop/scoop-install/scoop-update completion in PSCompletions is recommended.
- Tools provided for Scoop that allow you to use a replaced URL instead of the original URL when downloading applications via Scoop.
- You can use them to replace URLs in a specified format, thereby optimizing the download through a proxy address.
- Typical case: Replace
https://cf-workers-proxy-9e9.pages.devandhttps://raw.githubusercontent.comwith proxy addresses, refer to Usage.
-
Add the abyss bucket via Github or Gitee.
scoop bucket add abyss https://gitee.com/abgox/abyss
scoop bucket add abyss https://github.com/abgox/abyss
-
Install
scoop-installscoop install abyss/abgox.scoop-install
-
Install
scoop-updatescoop install abyss/abgox.scoop-update
Tip
Scoop Config
abgox-scoop-install-url-replace-from: The URL to replace, use regular expressions. Use^to match the beginning of the URL.abgox-scoop-install-url-replace-to: The replacement URL that corresponds toabgox-scoop-install-url-replace-from.
-
Set URL replacement configurations. Use
|||as a delimiter if there are multiple values.scoop config abgox-scoop-install-url-replace-from "^https://github.com|||^https://raw.githubusercontent.com"scoop config abgox-scoop-install-url-replace-to "https://gh-proxy.com/github.com|||https://gh-proxy.com/raw.githubusercontent.com" -
Install PSCompletions to add command completion.
scoop install abyss/abgox.PSCompletions
Import-Module PSCompletions
psc add scoop-install scoop-update
-
Install apps using the
scoop-installcommand.scoop-install abyss/abgox.scoop-i18n
-
Update apps using the
scoop-updatecommand.scoop-update abyss/abgox.scoop-i18n
-
scoop-installsupports the-resetparameter and all parameters of thescoop installcommand. -
scoop-updatesupports the-resetparameter and all parameters of thescoop updatecommand. -
Examples:
-
If you want to undo all local file changes in the buckets to avoid synchronization conflicts during
scoop update.-
It uses
git stashto undo. -
If you still need these changes, you can use
git stash pop. -
For details, refer to git stash.
scoop-install -reset
-
-
If you want to install
abyss/abgox.InputTip-zipwithout updating Scoop, you can use-uor--no-update-scoop.scoop-install abyss/abgox.scoop-i18n -u
-
If you don't also want to use the download cache, you can use
-kor--no-cache.scoop-install abyss/abgox.scoop-i18n -u --no-cache
-
Tip
- Take
scoop-installas an example. - When you run
scoop-install abyss/abgox.scoop-i18n, it goes through the following process:
-
scoop-installreads the following two configuration values:abgox-scoop-install-url-replace-fromabgox-scoop-install-url-replace-to
-
It replaces
urlin the manifest file ofabyss/abgox.scoop-i18nbased on these configurations.-
For example, if you use the following configuration:
abgox-scoop-install-url-replace-fromis set to^https://github.com|||^https://raw.githubusercontent.comabgox-scoop-install-url-replace-tois set tohttps://gh-proxy.com/github.com|||https://gh-proxy.com/raw.githubusercontent.com
-
It will split the values by
|||and replace theurlaccordingly:^https://cf-workers-proxy-9e9.pages.devmatchesurlstarting withhttps://cf-workers-proxy-9e9.pages.devand replaces them withhttps://gh-proxy.com/github.com.^https://raw.githubusercontent.comis replaced withhttps://gh-proxy.com/raw.githubusercontent.com.
-
-
After replacement,
scoop-installruns the actualscoop installcommand.- Since
urlof the manifest have been replaced withhttps://gh-proxy.com, Scoop will download the installation packages fromhttps://gh-proxy.com.
- Since
-
Once the installation is complete (or interrupted with
Ctrl + C),scoop-installautomatically undos the changes made to the manifest file.-
If you close the terminal during installation, it cannot undo the changes.
-
This may cause issues with
scoop updatedue to local file modifications conflicting with the remote bucket. -
In that case, you can run
scoop-install -reset, which will undo local file changes in all buckets viagit stash.- It uses
git stashto undo. - If you still need these changes, you can use
git stash pop. - For details, refer to git stash
- It uses
-