Scoop Documentation

repository·master·Indexed 30 days ago

https://github.com/scoopinstaller/scoop

Scoop is a command-line installer for Windows that manages applications via buckets (manifest repositories). It provides a lightweight, non-intrusive way to install and update software. Documentation covers installation via PowerShell, configuring aria2 for multi-connection downloads, managing application buckets, and using maintenance scripts like auto-pr.ps1, checkver.ps1, and checkhashes.ps1 for manifest management.

Tokens
2.7K
Snippets
4
Records
17
Agent score
98%

What's inside scoop

  1. Install Scoop via PowerShell

    master

    To install Scoop, run the following commands from a regular (non-admin) PowerShell terminal. The first command sets the execution policy to allow running installation and management scripts, which is required by default Windows 10 settings.

    Scoop installs to C:\Users\<YOUR USERNAME>\scoop by default.

    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
    Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
  2. Enable multi-connection downloads with aria2

    master

    You can speed up downloads by using aria2. To enable it, install the aria2 package via Scoop. Once installed, Scoop will automatically use it for all subsequent downloads.

    To suppress the warning message that appears during scoop install or scoop update when aria2 is enabled, use the scoop config command.

    scoop install aria2
    scoop config aria2-warning-enabled false
  3. Configure aria2 download settings

    master

    You can fine-tune aria2 performance using scoop config. The following keys are available:

    • aria2-enabled (default: true)
    • aria2-warning-enabled (default: true)
    • aria2-retry-wait (default: 2)
    • aria2-split (default: 5)
    • aria2-max-connection-per-server (default: 5)
    • aria2-min-split-size (default: 5M)
    • aria2-options (default: empty string)

    Example usage:

    scoop config aria2-split 10
  4. Install Scoop via PowerShell

    master

    To install Scoop on Windows, run the following command in a PowerShell terminal. This requires PowerShell version 5 or higher. The command fetches the installation script from the official Scoop website and executes it immediately.

    Invoke-RestMethod https://get.scoop.sh | Invoke-Expression
  5. Add application buckets to Scoop

    master

    Scoop uses 'buckets' to organize applications. The main bucket is installed by default. To access apps in other buckets (like extras, java, or games), you must add them using the scoop bucket add command.

    Example to add the extras bucket:

    scoop bucket add extras
  6. Check Scoop version and bucket status

    master
    Use the -v or --version flag to display the current Scoop version and release date. If Scoop was installed via Git and is not on the master branch, it will also show the latest commit hash. This command also lists local buckets and their latest commit information if they are Git repositories.
  7. Format Scoop manifests using formatjson.ps1

    master

    The formatjson.ps1 script is used to beautify and standardize the formatting of Scoop manifest JSON files. It parses the JSON, converts it to a pretty-printed format, and replaces tabs with 4 spaces to ensure consistent indentation across the bucket.

    Parameters

    • $App: The name of the application manifest to format. Supports wildcards (e.g., *).
    • $Dir: The directory where the script should search for manifests. This parameter is mandatory and must be a valid directory path.

    Usage

    To format all manifests within a specific bucket directory, provide the bucket root path to the -Dir parameter.

  8. Refresh Scoop scripts for development

    master

    If you are developing Scoop locally, you can use the refresh.ps1 script to update the installed scripts in your Scoop directory to match your local source code.

    Warning: This script is intended for development purposes only. It will fail if you attempt to run it from within the actual Scoop installation directory.

  9. Search for application descriptions using describe.ps1

    master

    The describe.ps1 script searches for application descriptions by visiting the homepage URL specified in Scoop manifests. This is useful for verifying or extracting descriptions for manifest maintenance.

    Parameters

    • $App: The manifest name to search for. Supports wildcards (e.g., *). Defaults to *.
    • $Dir: The directory containing the manifest files to search. This parameter is mandatory and must be a valid directory path.

    Behavior

    • The script iterates through .json manifests in the specified directory.
    • For each manifest, it attempts to download the content from the homepage URL.
    • It uses internal logic (find_description) to locate a description within the HTML.
    • If successful, it prints the cleaned description and the method used to find it.
    • If no homepage is set, or if the description cannot be found/downloaded, it reports an error in red text.
  10. Automate manifest updates with auto-pr.ps1

    master

    The auto-pr.ps1 script automates the process of updating Scoop application manifests. It can either push updates directly to your local origin branch or create pull requests for upstream repositories.

    Prerequisites

    • The hub CLI must be installed. On Windows, you can install it via Scoop: scoop install hub.
    • The script must be run from within a Scoop bucket directory.

    Mandatory Modes

    • -Push (-p): Updates manifests and pushes them directly to your local origin branch.
    • -Request (-r): Updates manifests and creates pull requests on the specified upstream branch for each update.

    Key Parameters

    • -Upstream (-u): The target upstream repository in the format <user>/<repo>:<branch> (e.g., scoop/extras:master).
    • -OriginBranch (-o): The name of your local origin branch (defaults to master).
    • -App (-a): The specific manifest name to search for. Supports placeholders or * for all. If a file path is provided, it uses that directory.
    • -Dir (-d): The directory where manifests are located. Required if -App is not a direct file path.
    • -CommitMessageFormat: Customizes the commit message. Use <app> for the filename and <version> for the new version number.
    • -SpecialSnowflakes: An array of specific manifests that should always be checked for updates (uses -ForceUpdate logic).
    • -SkipUpdated: Prevents showing manifests that do not require updates.
    • -ThrowError: Forces the script to throw an exception instead of just printing errors.
  11. Verify manifest hashes with checkhashes.ps1

    master

    The checkhashes.ps1 script validates that all URLs within Scoop manifests have correct corresponding hashes. It downloads the files (or uses a cache) and compares the computed hash against the expected hash defined in the manifest. This is primarily used for maintaining bucket integrity.

    Parameters

    • $App: The name of the manifest to check. Supports wildcards (e.g., *).
    • $Dir: (Mandatory) The directory where the manifests are located.
    • $Update: If a hash mismatch is found, the script will update the manifest with the actual computed hashes.
    • $ForceUpdate: Forces the script to update the manifest regardless of whether a mismatch was found.
    • $SkipCorrect: If set, the script will only output manifests that have hash mismatches, hiding those that are 'OK'.
    • $UseCache (Alias: -k): Uses previously downloaded files instead of downloading fresh ones. Note: It is recommended not to use this for official validation, as it might use damaged or incorrect files previously stored in the cache.
  12. Identify manifests missing checkver or autoupdate properties

    master

    Use the missing-checkver.ps1 script to audit Scoop manifests within a directory to ensure they contain the checkver and autoupdate properties. This is useful for maintaining bucket quality and ensuring automated updates work correctly.

    Parameters:

    • $App: The name of the manifest to check. Supports wildcards (e.g., *).
    • $Dir: The directory containing the manifests. This parameter is mandatory and must be a valid directory path.
    • $SkipSupported: A switch that, when enabled, hides manifests that already have both checkver and autoupdate properties, showing only those that need attention.