Scoop & Co
This page describes how I'm
current-ly using Scoop (and other Package Managers) to configure my system
The Daddy... Scoop!¶
Scoop focuses on open-source, command-line developer tools" but then those are the kinds of tools I'm using more and more... ...You're familiar with UNIX tools, and you wish there were more of them on Windows
scoop and base set of tools¶
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh') scoop help scoop install 7zip git git-filter-repo scoop install sudo scoop install aria2 lessmsi innounp scoop install curl grep sed less nano bind scoop install coreutils # vim scoop install vim ' set ff=unix set cindent set tabstop=4 set shiftwidth=4 set expandtab set backupdir=$TEMP ' | out-file ~/.vimrc -enc oem -append
you can use the Unix tool
ls after installing
coreutils but you first need to remove the
PowerShell alias already in place
i.e. add this to your Powershell
scoop install pwsh
...switch to powershell core
#powershell 6 and above Remove-Alias -Name ls Remove-Alias -Name cat Remove-Alias -Name mv Remove-Alias -Name ps Remove-Alias -Name pwd Remove-Alias -Name rm
scoop bucket add extras scoop bucket add versions scoop bucket add Sysinternals 'https://github.com/Ash258/Scoop-Sysinternals.git'
Then yet more handy tools I use (some are from the **extras* bucket*):
scoop install vscode azure-cli azure-ps storageexplorer dotnet-sdk scoop install go lua docker kubectl helm make scoop install nodejs nvs yarn openssl scoop install azure-functions-core-tools scoop install vcredist2019 scoop install notepadplusplus windows-terminal postman scoop install paint.net scoop install gh scoop bucket add instrumenta https://github.com/instrumenta/scoop-instrumenta scoop install kubeval scoop install conftest # SysInternals (now in extras bucket) scoop install sysinternals #scoop install krita brackets # Used to install with scoop but are now in PSGallery Install-PackageProvider -Name NuGet -MinimumVersion 22.214.171.124 -Force -Scope CurrentUser Install-Module posh-git -Scope CurrentUser Install-Module oh-my-posh -Scope CurrentUser
Other useful (possibly useful?) buckets that I've not yet had a use for:
Referencing the path to an application installed by Scoop
Those installed with the
--global (and with the
sudo command) will reside in the path
For each version of an application the files will be in a directory with the version number, but Scoop creates a Shim for the current version in the path
For example: the path to Python (
python.exe) will be either:
For system tools you'll probably want to use the
current shim to avoid those tools breaking between updates.
Specifying Application Versions¶
versions bucket contains a way to obtain versions other than the latest version of an application. This is used in combination with
scoop reset command to switch between versions of an app. Scoop creates a shim for each version and
scoop reset switches the
current shim between those versions.
For example: Switching-Ruby-And-Python-Versions
scoop status is used to display any available updates:
scoop update is used to update one or more applications (in a single command if you like!).
Downloads can be speeded up by using Aria2. See also lukesampson/scoop#multi-connection-downloads-with-aria2
scoop can be prevented from using it if necessary by running
scoop config aria2-enabled $false
!!!info What is LessMSI? A tool to view and extract the contents of a Windows Installer (.msi) file.
scoop install lessmsi scoop config MSIEXTRACT_USE_LESSMSI $true
The following is a set of common pre-requisites for installing tools and utilities (e.g. the
pip package manager for python tools):
scoop install python miniconda3 scoop install curl curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python get-pip.py # pip and other tools be later upgraded by re-running the above or running: python -m pip install -U pip # when running behind a corporate propxy, the following command should still work: sudo pip install --upgrade --trusted-host pypi.org --trusted-host files.pythonhosted.org pip setuptools wheel
Here's another place where Scoop comes to the rescue to avoid clunky download and installs for system fonts!
sudo is being used to install the font as a global / system font - this obvisouly pops up a UAC prompt as it requires elevated provilege to install a system font...
scoop bucket add nerd-fonts sudo scoop install Delugia-Nerd-Font-Complete Cascadia-Code Meslo-NF Meslo-NF-Mono
MkDocs "Project documentation with Markdown"
I use this for writing this site!:
pip install mkdocs python .\scoop\apps\python\current\Tools\scripts\win_add2path.py
Install the Custom Theme¶
pip install mkdocs-material pip install pygments # for source code syntax highlighting
This a version of asciinema for recording and re-playing PowerShell terminal sessions. Once recorded you upload the recording and share it with the world!
asciinema and how do I get it?!
If you've never used asciinema before and you want to share a demo of something at a terminal then you'll love this tool.
- Simply go to asciinema.org/
- click on Log in / Sign up
- Enter an email address
- Click on the link in the confirmation email
- Choose a username
- Stay logged into that browser on that machine and you can then
PowerSession authto create a link between the terminal and your asciinema account
Apparently tt's based on Windows Pseudo Console (ConPTY).
# Installation scoop install PowerSession # Usage: Log in on the machine where you want to make a recording Powersession auth # ... copy the URL you're given and paste it into your browser as instructed # Record a Terminal session (it will open a new session for you) PowerSession rec a.txt # Play back the recording to check that it's OK to upload PowerSession play a.txt # If it's ok then PowerSession upload a.txt
An example of an uploaded recording looks like this!