skip to main content
ANIMESH BULUSU | అనిమేష్ బులుసు

Windows gems #1: Scoop installer

I decided to collect amazing software applications that make my Windows experience better every day. First of such gems is scoop.

Scoop is an excellent little Windows app that installs many other apps. It describes itself as A (UAC-less) command-line installer for Windows. It is specifically good for installing many CLI tools, and utilities. Incidentally it is also good with larger apps such as 7zip, curl, mongodb, puppet, and many more.

In this post, I will talk about what is good about scoop, some scoop concepts, usage details and notes.

The good

Scoop is amazing for the following reasons:

1. No more permission popups

This removes the need for permission popups as apps are installed in the C:\Users\<username>\scoop\apps directory. We would still need to trust the app to not cause any troubles. If we are allowed to install scoop on a work machine, we would still need to check with the IT department to install a particular app via scoop.

By putting apps in the home directory this also avoids pollution of the PATH environment variable. Executables of every installed apps is placed into C:\Users\username\scoop\shims directory and this directory is added to the PATH environment variable

2. Great command line interface

Scoop provides a great command line interface. There is plenty to do with scoop on the command line via commands and subcommands.

  1. App management via info, install, list, status, update etc
  2. Cleanup and verification, via checkup and cleanup
  3. Self-management via export and update
  4. Helper functionality via cat, help, virustotal, which etc

3. JSON as configuration

Scoop utilizes a simpler configuration format such as JSON. App manifests and internal configuration use JSON making it easier for users and developers alike to understand and/or contribute.

4. Feels Unixy and open-sourcey

  1. It does one thing well as per the Unix philosophy
  2. It is made for installing many popular open-source apps and CLI dev tools.
  3. Encourages SPDX identifiers for describing the app license in the app manifest

Installing apps

At the time of this writing, scoop was already installed on my main machine many months ago. For a fresh perspective, I needed another Windows machine. There was an opportunity in the form of my rarely used ultrabook. It was time to put a small but awesome selection of software on it.

  1. 7zip for all extraction needs
  2. notepad2 for the easiest notetaking
  3. sumatrapdf for reading PDFs
  4. everything for fast-searching files and stuff

First we need to install scoop. Going by the recommended way, open PowerShell and run the following command.

C:\Users\animesh> iwr -useb get.scoop.sh | iex

Now open a cmd prompt and install the 4 apps we need.

C:\Users\animesh> scoop install 7zip notepad2 sumatrapdf everything

Nothing happens. One or more of these apps must be in a non-main bucket. As it turns out, except 7zip, the remaining three reside in the extras bucket. Add the bucket via the following subcommand.

C:\Users\animesh> scoop bucket add extras

This command requires git to be installed. Install git from scoop.

C:\Users\animesh> scoop install git

It prompts to run a command post installation to set the git credential store. Follow that. In case git needs to be installed separately, uninstall it from scoop apps and install it from the official source.

Note: We may need to install git separately from the direct link https://gitforwindows.org. I remember going back to the direct install on my current workstation for some? reason. For a new machine and/or non-dev machine YMMV.

If git is installed through scoop, the interesting thing that happens is that it will install 7zip automatically to unzip copy of a portable git. So 7zip is installed by the time git is installed. Same will not be true if git is installed separately.

C:\Users\animesh> scoop uninstall git

Finally, install the remaining apps. If git is installed with scoop, then this command will do:

C:\Users\animesh> scoop install notepad2 sumatrapdf everything

Otherwise, we will need to add 7zip as well:

C:\Users\animesh> scoop install 7zip notepad2 sumatrapdf everything

That is it. Now the ultrabook is rarely used but functional.

Common commands

Use caseCommand
Check for new versionsscoop status
List installed appsscoop list
Update all apps including scoopscoop update *
Update a specific appscoop update app
Resolve app conflictsscoop reset app
Search for an app across bucketsscoop search app

App manifests and Buckets

An app manifest is a JSON file that describes how to install a app. Here is one of the simplest app manifests:

{
    "version": "0.2013.07.19",
    "description": "Cowsay/think in Powershell",
    "homepage": "https://github.com/lukesampson/cowsay-psh",
    "license": "Unknown",
    "url": "https://github.com/lukesampson/cowsay-psh/archive/master.zip",
    "hash": "c65cdfbf43b15f65742831f812003a92abeaa5d416374d5d75a53388d0b59148",
    "extract_dir": "cowsay-psh-master",
    "bin": [
        "cowsay.ps1",
        "cowthink.ps1"
    ]
}

Buckets are package repositories in the scoop world. A bucket is simply a directory containing app manifests. Example:

mybucket\
    ------app1.json
    ------app2.json
    ------app3.json
    ------appN.json

There are two types of buckets: Well-known and Third-party. A bucket is added using the following command:

C:\Users\animesh> scoop bucket add <bucket-name> <bucket-repo-url>

Well-known buckets such as main, extras and a few other don't require the bucket repository URL at the end. So, for extras bucket, we can just run:

C:\Users\animesh> scoop bucket add extras

All third party buckets require the bucket repository URL at the end. For example, if we want to add the bucket p8rdev_scoop-portableapps, we need to run the full command:

C:\Users\animesh> scoop bucket add p8rdev_scoop-portableapps https://github.com/p8rdev/scoop-portableapps

To find out the known buckets, we have a handy bucket command with a known subcommand:

C:\Users\animesh> scoop bucket known
main
extras
versions
nirsoft
php
nerd-fonts
nonportable
java
games

Searching for apps

If we want to search for an app, we can use the search command. This will search for the app across known and any added third-party buckets.

C:\Users\animesh>scoop search notepad++
Invalid regular expression: Invalid pattern 'notepad++' at offset 9. Nested quantifier '+'.

C:\Users\animesh>scoop search notepad
'extras' bucket:
    notepad2-mod (4.2.25.998)
    notepad2 (4.2.25)
    notepad3 (5.21.1129.1)
    notepadplusplus (8.3)
    xmlnotepad (2.8.0.52)

'nonportable' bucket:
    notepadplusplus-np (8.3)
    notepads-np (1.4.2.0)

'p8rdev_scoop-portableapps' bucket:
    Notepad++Portable (7.8.5_Rev_3)
    Notepad2-modPortable (4.2.25.998)
    Notepad2Portable (4.2.25_Rev_2)

If we are not able to find a app across any of the buckets, we can utilize Scoop-search websites.

  1. Scoopsearch
  2. scoop-docs-search

Issue notes

Error on update issue

At one point, when I did scoop update I started getting this error:

C:\Users\animesh> scoop update
Updating Scoop...
Updating 'extras' bucket...
error: Your local changes to the following files would be overwritten by merge:
        scripts/everything/install-context.reg
        scripts/everything/uninstall-context.reg
Please commit your changes or stash them before you merge.
Aborting
Updating 'java' bucket...
Updating 'main' bucket...
Updating 'nonportable' bucket...
Scoop was updated successfully!

Fix: Remove and add the bucket, in this case the extras bucket:

C:\Users\animesh> scoop bucket rm extras
...
C:\Users\animesh> scoop bucket add extras

Specific app uninstall issue

After uninstalling qutebrowser, I kept getting *failed* on several other commands such as scoop list and scoop status:

C:\Users\animesh>scoop status
Scoop is up to date.
Updates are available for:
    aws: 2.4.16 -> 2.4.17
    dbeaver: 21.2.2 -> 21.3.4
    qutebrowser: *failed*

This happened because the app was moved to different bucket in between the install and uninstall.

Fix: Re-install and uninstall the app once again.

C:\Users\animesh> scoop install qutebrowser
...
C:\Users\animesh> scoop uninstall qutebrowser

Multiple app versions issue

For some reason, two versions of Element were installed side by side and the current shim still pointed to the older version

Fix: Run reset and then cleanup subcommands.

C:\Users\animesh> scoop reset element
Resetting element (1.9.7).
Linking ~\scoop\apps\element\current => ~\scoop\apps\element\1.9.7
Creating shim for 'Element'.
Creating shim for 'element-desktop'.
Creating shortcut for Element (Element.exe)

C:\Users\animesh>scoop cleanup element
Removing element: 1.9.0

scoop cleanup * cleans up all apps.

The Bad

I did not find anything prohibitively bad. Here are a few observations to keep in mind.

The number one annoyance is that the element app needs to be unpinned from the taskbar each time I update it. I tried pinning the app from the current directory. Somehow it does not work after an app update. I have to repin the app. I haven't noticed this with other apps.

We need to be aware of installing traditional installer-based apps like Firefox, Chromium, Docker, etc. Scoop may cause some trouble installing these larger apps. I did not try or test these specific apps, but I successfully installed Dbeaver and Postgresql.

As mentioned in the installation section, installing git with scoop may cause some trouble. It can be fixed by installing git for Windows from the source gitforwindows.org.

Apps do not show up in the start menu as they are installed in the home directory. Somewhere along the line scoop devs made ti so that apps are displayed in the start menu under Scoop Apps section.

Conclusion

There are other alternatives like chocolatey and winget to install apps.

Chocolatey requires admin rights to install an app and Nuget for packaging the software. While I appreciate Nuget as a .NET-oriented developer, scoop's solution to define package details in JSON is superior IMHO.

Winget is a newer tool from Microsoft based on AppGet. I have not tried it beyond the initial impressions.

Scoop is amazing app that feels like a proper open source package manager w.r.t the UX of apt from Debian. It has a unixy feel to its overall experience. With all this ambience, it just makes installing other apps on Windows a painless experience.