✨ 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://github.com
andhttps://raw.githubusercontent.com
with 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-install
scoop install abyss/abgox.scoop-install
-
Install
scoop-update
scoop 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-install
command.scoop-install abyss/abgox.scoop-i18n
-
Update apps using the
scoop-update
command.scoop-update abyss/abgox.scoop-i18n
-
scoop-install
supports the-reset
parameter and all parameters of thescoop install
command. -
scoop-update
supports the-reset
parameter and all parameters of thescoop update
command. -
Examples:
-
If you want to undo all local file changes in the buckets to avoid synchronization conflicts during
scoop update
.-
It uses
git stash
to 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-zip
without updating Scoop, you can use-u
or--no-update-scoop
.scoop-install abyss/abgox.scoop-i18n -u
-
If you don't also want to use the download cache, you can use
-k
or--no-cache
.scoop-install abyss/abgox.scoop-i18n -u --no-cache
-
Tip
- Take
scoop-install
as an example. - When you run
scoop-install abyss/abgox.scoop-i18n
, it goes through the following process:
-
scoop-install
reads the following two configuration values:abgox-scoop-install-url-replace-from
abgox-scoop-install-url-replace-to
-
It replaces
url
in the manifest file ofabyss/abgox.scoop-i18n
based on these configurations.-
For example, if you use the following configuration:
abgox-scoop-install-url-replace-from
is set to^https://github.com|||^https://raw.githubusercontent.com
abgox-scoop-install-url-replace-to
is set tohttps://gh-proxy.com/github.com|||https://gh-proxy.com/raw.githubusercontent.com
-
It will split the values by
|||
and replace theurl
accordingly:^https://github.com
matchesurl
starting withhttps://github.com
and replaces them withhttps://gh-proxy.com/github.com
.^https://raw.githubusercontent.com
is replaced withhttps://gh-proxy.com/raw.githubusercontent.com
.
-
-
After replacement,
scoop-install
runs the actualscoop install
command.- Since
url
of 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-install
automatically 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 update
due 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 stash
to undo. - If you still need these changes, you can use
git stash pop
. - For details, refer to git stash
- It uses
-