### Example Development Environment Setup Source: https://github.com/scoopinstaller/scoop/wiki/Example-Setup-Scripts Installs essential utilities, programming languages, a WAMP stack, and console theming tools for a development environment. Includes configuration for Vim. ```powershell # utils scoop install 7zip curl sudo git openssh coreutils grep sed less # programming languages scoop install python ruby go nodejs # WAMP stack scoop install apache mariadb php iex (new-object net.webclient).downloadstring('https://gist.github.com/lukesampson/6546858/raw/apache-php-init.ps1') # console theme scoop install concfg pshazz concfg import solarized small # 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 ``` -------------------------------- ### Example Production Environment Setup Source: https://github.com/scoopinstaller/scoop/wiki/Example-Setup-Scripts Installs essential utilities and system packages for a production environment. Some packages are installed globally for system processes, while others are installed for the current user. ```powershell scoop install sudo 7zip # make these available to system processes sudo scoop install git ruby postgres --global # just for me scoop install grep coreutils ``` -------------------------------- ### Example Dependency Tree Source: https://github.com/scoopinstaller/scoop/wiki/Dependencies Illustrates a hierarchical dependency structure for application installation and runtime. ```text rust | |—— innounp required (to install) | | | |—— 7zip required (to install) | |—— gcc45 required (to run) | |—— 7zip required (to install) ``` -------------------------------- ### Install Applications with Scoop Source: https://context7.com/scoopinstaller/scoop/llms.txt Installs the 'hello' application from a configured bucket. Verifies installation by running the application. ```powershell scoop install hello ``` ```powershell hello ``` -------------------------------- ### Install Scoop Source: https://github.com/scoopinstaller/scoop/wiki/Quick-Start Install Scoop by running this command in a PowerShell console. It downloads and executes the installation script. ```powershell irm get.scoop.sh | iex ``` -------------------------------- ### Install an Application with Scoop Source: https://github.com/scoopinstaller/scoop/wiki/Quick-Start Install an application, such as curl, using Scoop. Scoop handles downloading, installation, and dependency management. ```powershell scoop install curl ``` -------------------------------- ### Scripted Scoop Environment Setup Source: https://context7.com/scoopinstaller/scoop/llms.txt Automates the setup of a development environment using Scoop. Includes setting execution policy, adding buckets, installing core utilities, programming languages, and system-wide tools. ```powershell # ── Prerequisites ────────────────────────────────────────────── Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression ``` ```powershell # ── Add extra buckets ─────────────────────────────────────────── scoop bucket add extras scoop bucket add java ``` ```powershell # ── Core utilities ────────────────────────────────────────────── scoop install sudo 7zip curl git openssh coreutils grep sed less touch ``` ```powershell # ── Programming languages ─────────────────────────────────────── scoop install python ruby go nodejs sudo scoop install openjdk --global ``` ```powershell # ── Accelerate downloads with aria2 ──────────────────────────── scoop install aria2 scoop config aria2-warning-enabled false scoop config aria2-split 8 scoop config aria2-max-connection-per-server 8 ``` ```powershell # ── System-wide tools (requires elevation) ───────────────────── sudo scoop install git postgres --global ``` ```powershell # ── Hold a critical app at current version ───────────────────── scoop hold python ``` ```powershell # ── Update everything else ───────────────────────────────────── scoop update * scoop cleanup * ``` -------------------------------- ### Install Apps with Scoop Source: https://context7.com/scoopinstaller/scoop/llms.txt Use the `scoop install` command to install applications from manifests. You can install single or multiple apps, specific versions, or globally (requires admin). Local or remote manifest files can also be used. ```powershell # Install a single app scoop install git # Install multiple apps at once scoop install curl grep sed less # Install a specific version scoop install git@2.23.0.windows.1 # Install globally (system-wide, requires admin) scoop install sudo sudo scoop install git --global # short form: -g # Install directly from a local or remote manifest file scoop install hello.json scoop install https://gist.github.com/lukesampson/6446567/raw/hello.json ``` -------------------------------- ### Install Scoop with a Proxy Source: https://github.com/scoopinstaller/scoop/wiki/Using-Scoop-behind-a-proxy Use this command to install Scoop when behind a proxy. It downloads and executes the installation script. ```powershell iex (new-object net.webclient).downloadstring('https://get.scoop.sh') ``` -------------------------------- ### Install App from Web URL Source: https://github.com/scoopinstaller/scoop/wiki/Creating-an-app-manifest Install an application using a Scoop manifest that is publicly available on the web. This allows for easy distribution and installation by anyone with the URL. ```powershell scoop install https://gist.github.com/lukesampson/6446567/raw/hello.json ``` -------------------------------- ### Install PHP and Apache Source: https://github.com/scoopinstaller/scoop/wiki/Apache-with-PHP Use Scoop to install PHP and Apache. This is the initial step for setting up a local web server environment. ```powershell scoop install php apache ``` -------------------------------- ### Install Apache as a Service Source: https://github.com/scoopinstaller/scoop/wiki/Apache-with-PHP Install Apache as a Windows service for background operation. Requires administrator privileges or sudo. ```bash sudo httpd -k install -n apache sudo net start apache ``` -------------------------------- ### Export and Import Scoop Environment Source: https://context7.com/scoopinstaller/scoop/llms.txt Create a reproducible environment by exporting installed apps, buckets, and configurations to a JSON file (Scoopfile). Import the file on a new machine to restore the setup. ```powershell scoop export > scoopfile.json ``` ```powershell scoop import scoopfile.json ``` ```json { "apps": [ { "Source": "main", "Name": "git", "Version": "2.43.0.windows.1" }, { "Source": "main", "Name": "python", "Version": "3.11.6" } ], "buckets": [ { "Name": "main", "Source": "https://github.com/ScoopInstaller/Main" }, { "Name": "extras", "Source": "https://github.com/ScoopInstaller/Extras" } ] } ``` -------------------------------- ### Install Multiple Apps with Scoop Source: https://github.com/scoopinstaller/scoop/blob/master/README.md Use this command to install multiple applications at once. It can also be used to install global packages. ```console scoop install sudo sudo scoop install 7zip git openssh --global scoop install aria2 curl grep sed less touch scoop install python ruby go perl ``` -------------------------------- ### Install Scoop and Set Execution Policy Source: https://github.com/scoopinstaller/scoop/wiki/Example-Setup-Scripts Installs Scoop and sets the execution policy to unrestricted for the current user. This is a prerequisite for running other setup scripts. ```powershell iex (new-object net.webclient).downloadstring('https://get.scoop.sh') set-executionpolicy unrestricted -s cu ``` -------------------------------- ### Installing Specific Python Versions Source: https://github.com/scoopinstaller/scoop/wiki/Dependencies Demonstrates how to install specific major versions of Python using Scoop. ```bash scoop install python27 ``` ```bash scoop install python ``` -------------------------------- ### Create and Install a Basic App Manifest Source: https://github.com/scoopinstaller/scoop/wiki/Creating-an-app-manifest Use this PowerShell snippet to create a simple app manifest file and then install the application using Scoop. This is useful for custom or local applications. ```powershell # write an app manifest to hello.json '{ "version": "1.0", "url": "https://gist.github.com/lukesampson/6446238/raw/hello.ps1", "bin": "hello.ps1" }' > hello.json # install the app scoop install hello.json # did it work? hello # -> should output 'Hello, !' ``` -------------------------------- ### Install App from Network Share Source: https://github.com/scoopinstaller/scoop/wiki/Creating-an-app-manifest Install an application using a Scoop manifest located on a network share. Ensure the path is accessible to all users who need to install the app. ```powershell scoop install \\shared\files\scoop\hello.json ``` -------------------------------- ### Install Docker with Scoop Source: https://github.com/scoopinstaller/scoop/wiki/Docker Use this command to install Docker via Scoop. Note that this does not install Docker Engine. ```powershell scoop install docker ``` -------------------------------- ### Start and Configure Docker Machine Source: https://github.com/scoopinstaller/scoop/wiki/Docker Start the Docker machine and configure the environment variables for using the Docker CLI. This should be done each time you begin working with Docker. ```powershell docker-machine start docker-machine env | Invoke-Expression ``` -------------------------------- ### Install Git and OpenSSH Source: https://github.com/scoopinstaller/scoop/wiki/Github-with-SSH-key Installs Git for Windows and OpenSSH client using Scoop, essential for SSH key management and Git operations. ```powershell scoop install git openssh ``` -------------------------------- ### Install Multiple App Versions with Scoop Source: https://github.com/scoopinstaller/scoop/wiki/FAQ Install different versions of the same application by using the '@[version]' syntax for each desired version. Older versions are kept until cleaned up. ```bash scoop install git@2.19.0.windows.1 ``` ```bash scoop install git@2.23.0.windows.1 ``` -------------------------------- ### Install Scoop on Windows Source: https://github.com/scoopinstaller/scoop/blob/master/README.md Run these commands in a PowerShell terminal to install Scoop. The first command sets the execution policy to allow script execution, and the second downloads and runs the installation script. ```powershell Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression ``` -------------------------------- ### List Installed Apps with Scoop Source: https://context7.com/scoopinstaller/scoop/llms.txt Use `scoop list` to display all installed applications and their versions. `scoop info` provides detailed information, including all installed versions of a specific app. ```powershell # List all installed apps scoop list # Get detailed info (including all installed versions) for one app scoop info git ``` -------------------------------- ### Simple App Manifest Example Source: https://github.com/scoopinstaller/scoop/wiki/App-Manifests A basic app manifest demonstrating essential properties like version, URL, extract directory, and binary. ```json { "version": "1.0", "url": "https://github.com/lukesampson/cowsay-psh/archive/master.zip", "extract_dir": "cowsay-psh-master", "bin": "cowsay.ps1" } ``` -------------------------------- ### Install Scoop Source: https://context7.com/scoopinstaller/scoop/llms.txt Run these commands in a PowerShell terminal to install Scoop. Ensure local script execution is allowed. ```powershell # Allow local script execution (required on Windows 10+) Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser # Download and run the Scoop installer Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression # Verify installation scoop --version ``` -------------------------------- ### Install Specific App Version with Scoop Source: https://github.com/scoopinstaller/scoop/wiki/FAQ Install a particular version of an application by specifying the version after the app name with an '@' symbol. ```bash scoop install git@2.23.0.windows.1 ``` -------------------------------- ### Install Git with OpenSSH using Scoop Source: https://github.com/scoopinstaller/scoop/wiki/SSH-on-Windows Installs Git along with OpenSSH support using Scoop. Recommended if SSH will be used frequently with Git operations. ```powershell scoop install git-with-openssh ``` -------------------------------- ### Example Usage of appdir Function Source: https://github.com/scoopinstaller/scoop/wiki/Pre-Post-(un)install-scripts Use the `appdir` function within scripts to reference the installation directory of another Scoop application. This is useful for checking if another application is installed or accessing its files. ```powershell "post_install": [ "if (Test-Path \"$(appdir otherapp)\\\current\\otherapp.exe\") { <# .. do something .. #> }" ``` -------------------------------- ### Verify Bucket Addition and App Installation Source: https://github.com/scoopinstaller/scoop/wiki/Buckets Check if your custom bucket has been added successfully by listing buckets and searching for an app. Then, attempt to install the app. ```powershell scoop bucket list scoop search hello scoop install hello hello ``` -------------------------------- ### Switch Between Installed App Versions with Scoop Source: https://github.com/scoopinstaller/scoop/wiki/FAQ Use 'scoop reset' to activate a specific installed version of an app or reset to the latest installed version. ```bash scoop reset terraform@0.11.14 ``` ```bash scoop reset terraform@0.12.11 ``` ```bash scoop reset terraform ``` -------------------------------- ### Install Scoop Sudo Source: https://github.com/scoopinstaller/scoop/wiki/Global-Installs Installs the 'sudo' command for Scoop, which is used to run commands with administrator privileges for global installs. ```powershell scoop install sudo ``` -------------------------------- ### Autoupdate Configuration with Version Variables Source: https://github.com/scoopinstaller/scoop/wiki/App-Manifest-Autoupdate Example of autoupdate configuration for QEMU, demonstrating the use of captured year, month, and day variables in both the download URL and the hash URL. ```json "checkver": { "regex": "(?\\d{4})-(?\\d{2})-(?\\d{2}): New QEMU installers \\((?[\\d.a-z\\-]+)\\)" }, "autoupdate": { "architecture": { "64bit": { "url": "https://qemu.weilnetz.de/w64/qemu-w64-setup-$matchYear$matchMonth$matchDay.exe#/dl.7z", "hash": { "url": "https://qemu.weilnetz.de/w64/qemu-w64-setup-$matchYear$matchMonth$matchDay.sha512" } }, "32bit": { "url": "https://qemu.weilnetz.de/w32/qemu-w32-setup-$matchYear$matchMonth$matchDay.exe#/dl.7z", "hash": { "url": "https://qemu.weilnetz.de/w32/qemu-w32-setup-$matchYear$matchMonth$matchDay.sha512" } } } } ``` -------------------------------- ### Basic Autoupdate Configuration Source: https://github.com/scoopinstaller/scoop/wiki/App-Manifest-Autoupdate A fundamental example of the `autoupdate` block, specifying download URLs for 64-bit and 32-bit architectures. ```json "autoupdate": { "note": "Thanks for using autoupdate, please test your updates!", "architecture": { "64bit": { "url": "https://example.org/dl/example-v$version-x64.msi" }, "32bit": { "url": "https://example.org/dl/example-v$version-x86.msi" } } } ``` -------------------------------- ### Run a Docker Image Source: https://github.com/scoopinstaller/scoop/wiki/Docker Execute a Docker image, for example, running an Ubuntu container to print 'Hello world'. ```bash docker run ubuntu /bin/echo "Hello world" ``` -------------------------------- ### Start Apache Manually Source: https://github.com/scoopinstaller/scoop/wiki/Apache-with-PHP Run the Apache HTTP server executable from the command line. Press Ctrl-C to stop the server. ```bash httpd ``` -------------------------------- ### Install App Globally Source: https://github.com/scoopinstaller/scoop/wiki/Global-Installs Installs an application globally using Scoop, making it available to all users. Requires administrator privileges. ```powershell sudo scoop install git --global ``` -------------------------------- ### Install aria2 for Multi-connection Downloads Source: https://github.com/scoopinstaller/scoop/blob/master/README.md Install the aria2 package using Scoop to enable multi-connection downloads for faster software retrieval. ```console scoop install aria2 ``` -------------------------------- ### Install Theming Tools in PowerShell Source: https://github.com/scoopinstaller/scoop/wiki/Theming-Powershell Installs necessary tools for theming PowerShell, including Concfg for color themes and Pshazz for prompt enhancements. Backs up current console settings before applying new themes. ```powershell scoop install 7zip git openssh concfg # back-up current console settings concfg export console-backup.json # use solarized color theme concfg import solarized-dark # You'll see this warning: # overrides in the registry and shortcut files might interfere with # your concfg settings. # would you like to search for and remove them? (Y/n): # Enter 'n' if you're not sure yet: you can always run 'concfg clean' later scoop install pshazz ``` -------------------------------- ### Install OpenSSH using Scoop Source: https://github.com/scoopinstaller/scoop/wiki/SSH-on-Windows Installs the OpenSSH client for Windows using the Scoop package manager. This is the primary method for enabling SSH functionality. ```powershell scoop install openssh ``` -------------------------------- ### Node.js Autoupdate Example Source: https://github.com/scoopinstaller/scoop/wiki/App-Manifest-Autoupdate An example of `autoupdate` configuration for Node.js, including `extract_dir` and a specific hash URL. ```json "autoupdate": { "architecture": { "64bit": { "url": "https://nodejs.org/dist/v$version/node-v$version-win-x64.7z", "extract_dir": "node-v$version-win-x64" }, "32bit": { "url": "https://nodejs.org/dist/v$version/node-v$version-win-x86.7z", "extract_dir": "node-v$version-win-x86" } }, "hash": { "url": "$baseurl/SHASUMS256.txt.asc" } } ``` -------------------------------- ### Install Pshazz Source: https://github.com/scoopinstaller/scoop/wiki/Github-with-SSH-key Installs Pshazz, a tool that enhances PowerShell with features like SSH agent management and credential storage. ```powershell scoop install pshazz ``` -------------------------------- ### Update All Installed Applications Source: https://github.com/scoopinstaller/scoop/wiki/Quick-Start Update all applications installed by Scoop to their latest available versions. ```powershell scoop update * ``` -------------------------------- ### PHP Autoupdate Example Source: https://github.com/scoopinstaller/scoop/wiki/App-Manifest-Autoupdate Configuration for PHP autoupdate, specifying URLs for different architectures and a hash check URL. ```json "autoupdate": { "architecture": { "64bit": { "url": "https://windows.php.net/downloads/releases/php-$version-Win32-VC15-x64.zip" }, "32bit": { "url": "https://windows.php.net/downloads/releases/php-$version-Win32-VC15-x86.zip" } }, "hash": { "url": "$baseurl/sha256sum.txt" } } ``` -------------------------------- ### Install Latest Win32-OpenSSH using Scoop Source: https://github.com/scoopinstaller/scoop/wiki/SSH-on-Windows Installs the latest version of the Win32-OpenSSH package using Scoop. Use this if you need the most recent features or bug fixes. ```powershell scoop install win32-openssh ``` -------------------------------- ### Nginx Autoupdate Example Source: https://github.com/scoopinstaller/scoop/wiki/App-Manifest-Autoupdate A simple `autoupdate` configuration for Nginx, specifying a direct URL and extract directory. ```json "autoupdate": { "url": "https://nginx.org/download/nginx-$version.zip", "extract_dir": "nginx-$version" } ``` -------------------------------- ### Autoupdate Configuration for FossHub Source: https://github.com/scoopinstaller/scoop/wiki/App-Manifest-Autoupdate Example of autoupdate configuration for Calibre, leveraging the special FossHub handler for hash retrieval. ```json "autoupdate": { "url": "https://www.fosshub.com/Calibre.html/calibre-portable-installer-$version.exe" } ``` -------------------------------- ### Search for Applications with Scoop Source: https://github.com/scoopinstaller/scoop/wiki/Quick-Start Find applications available for installation using Scoop. You can search by app name or by the commands they provide. ```powershell scoop search ssh ``` ```powershell scoop search hg ``` -------------------------------- ### Add Scoop Java Bucket Source: https://github.com/scoopinstaller/scoop/wiki/Java Run this command to add the Scoop Java bucket, which provides access to JDK and JRE installations. ```shell scoop bucket add java ``` -------------------------------- ### Verify Updated Manifest Source: https://github.com/scoopinstaller/scoop/wiki/App-Manifest-Autoupdate After updating a manifest, it is recommended to verify its integrity by installing the app using the updated manifest file. This ensures the changes did not break the installation process. ```powershell scoop install bucket\.json ``` -------------------------------- ### Capture Groups for Date and SHA, with Replacement Source: https://github.com/scoopinstaller/scoop/wiki/App-Manifest-Autoupdate This example demonstrates capturing date components and a SHA hash using regex. The captured date components are then used in `checkver.replace` to construct a formatted version string. The SHA is available for autoupdate. ```json "checkver": { "url": "https://github.com/lukesampson/pshazz/commits/master.atom", "regex": "(\d+)-(\d+)-(\d+)[\S\s]*?(?[0-9a-f]{40})", "replace": "0.${1}.${2}.${3}" } ``` -------------------------------- ### Switch PHP Versions with Scoop Source: https://github.com/scoopinstaller/scoop/wiki/Switching-Ruby,-Python-and-PHP-Versions Install and switch between different PHP versions using `scoop reset`. This is useful for testing applications against various PHP environments. ```powershell scoop bucket add versions # add the 'versions' bucket if you haven't already scoop install php74 php php --version # -> PHP 8.0.2 # switch to PHP 7.4.x scoop reset php74 php --version # -> PHP 7.4.15 # switch back to latest version scoop reset php php --version # -> PHP 8.0.2 ``` -------------------------------- ### Listing App Directories with 'current' Alias Source: https://github.com/scoopinstaller/scoop/wiki/The-'Current'-Version-Alias Demonstrates the output of listing the contents of an app's directory, showing installed version directories and the 'current' alias which is a Directory Junction pointing to the latest version. ```powershell $ ls ~/scoop/apps/git Directory: C:\Users\luke\scoop\apps\git Mode LastWriteTime Length Name ---- ------------- ------ ---- d----- 24/11/16 8:17 am 2.10.2.windows.1 d----- 3/1/17 9:42 am 2.11.0.windows.1 d----l 3/1/17 9:42 am current ``` -------------------------------- ### ImageMagick Autoupdate Example Source: https://github.com/scoopinstaller/scoop/wiki/App-Manifest-Autoupdate Autoupdate configuration for ImageMagick, including architecture-specific URLs and a hash mode set to 'rdf'. ```json "autoupdate": { "architecture": { "64bit": { "url": "https://www.imagemagick.org/download/binaries/ImageMagick-$version-portable-Q16-x64.zip" }, "32bit": { "url": "https://www.imagemagick.org/download/binaries/ImageMagick-$version-portable-Q16-x86.zip" } }, "hash": { "mode": "rdf", "url": "https://www.imagemagick.org/download/binaries/digest.rdf" } } ``` -------------------------------- ### Basic App Manifest Structure Source: https://context7.com/scoopinstaller/scoop/llms.txt Defines a standard app manifest for a single architecture. Includes version, description, URL, hash, extraction details, executable paths, environment variables, persistence, and pre/post install scripts. ```json { "version": "3.5.0", "description": "A fast, cross-platform HTTP/2 web server", "homepage": "https://nginx.org", "license": "BSD-2-Clause", "url": "https://nginx.org/download/nginx-3.5.0.zip", "hash": "sha256:abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab", "extract_dir": "nginx-3.5.0", "bin": "nginx.exe", "env_add_path": ".", "env_set": { "NGINX_HOME": "$dir" }, "persist": [ "conf", "logs", ["html", "www"] ], "pre_install": [ "if (!(Test-Path \"$persist_dir\\conf\")) { New-Item -ItemType Directory \"$persist_dir\\conf\" | Out-Null }" ], "post_install": [ "Write-Host 'nginx installed. Run `nginx` to start.' -f green" ], "checkver": { "url": "https://nginx.org/download.html", "regex": "nginx-([\\d.]+)\.zip" }, "autoupdate": { "url": "https://nginx.org/download/nginx-$version.zip", "extract_dir": "nginx-$version", "hash": { "url": "$baseurl/nginx-$version.zip.sha256" } } } ``` -------------------------------- ### Add and Manage Scoop Buckets Source: https://context7.com/scoopinstaller/scoop/llms.txt Add a Git repository as a Scoop bucket for installing packages. Lists available buckets and searches for packages within them. ```powershell scoop bucket add my-bucket https://github.com//my-bucket ``` ```powershell scoop bucket list ``` ```powershell scoop search hello ``` -------------------------------- ### Add a Scoop Bucket Source: https://github.com/scoopinstaller/scoop/blob/master/README.md Use this command to add a new application bucket to your Scoop installation. Replace '' with the desired bucket name. ```console scoop bucket add ``` ```console scoop bucket add extras ``` -------------------------------- ### Autoupdate Configuration for SourceForge Source: https://github.com/scoopinstaller/scoop/wiki/App-Manifest-Autoupdate Example of autoupdate configuration for NSIS, utilizing the special SourceForge handler for hash retrieval and specifying an extract directory. ```json "autoupdate": { "url": "https://downloads.sourceforge.net/project/nsis/NSIS%20$majorVersion/$version/nsis-$version.zip", "extract_dir": "nsis-$version" } ``` -------------------------------- ### Configure Xdebug for PHP Source: https://github.com/scoopinstaller/scoop/wiki/Custom-PHP-configuration Set up Xdebug for remote debugging. Ensure Xdebug is installed via scoop and adjust the `zend_extension` path as necessary. ```ini zend_extension=C:\Users\\scoop\apps\php-xdebug\current\php_xdebug.dll [xdebug] xdebug.remote_enable=on xdebug.remote_autostart=on xdebug.remote_connect_back=on ``` -------------------------------- ### Switch Ruby Versions with Scoop Source: https://github.com/scoopinstaller/scoop/wiki/Switching-Ruby,-Python-and-PHP-Versions Add the 'versions' bucket, install multiple Ruby versions, and use `scoop reset` to switch between them. This command re-installs shims and updates environment variables. ```powershell scoop bucket add versions # add the 'versions' bucket if you haven't already scoop install ruby ruby19 ruby --version # -> ruby 1.9.3p551 (2014-11-13) [i386-mingw32] # switch to ruby 2.x scoop reset ruby ruby --version # -> ruby 2.3.3p222 (2016-11-21 revision 56859) [x64-mingw32] # switch back to 1.9.x scoop reset ruby19 ruby --version # -> ruby 1.9.3p551 (2014-11-13) [i386-mingw32] ``` -------------------------------- ### Get Help for a Specific Scoop Command Source: https://github.com/scoopinstaller/scoop/wiki/Commands To understand how to use a particular command, append the command name to 'scoop help'. This provides detailed usage information for that specific command. ```bash scoop help ``` -------------------------------- ### Switch Python Versions with Scoop Source: https://github.com/scoopinstaller/scoop/wiki/Switching-Ruby,-Python-and-PHP-Versions Manage multiple Python installations by adding the 'versions' bucket and using `scoop reset` to toggle between them. This ensures the correct Python interpreter is active. ```powershell scoop bucket add versions # add the 'versions' bucket if you haven't already scoop install python27 python python --version # -> Python 3.6.2 # switch to python 2.7.x scoop reset python27 python --version # -> Python 2.7.13 # switch back (to 3.x) scoop reset python python --version # -> Python 3.6.2 ``` -------------------------------- ### Autoupdate Hash URL with URL Variable Source: https://github.com/scoopinstaller/scoop/wiki/App-Manifest-Autoupdate Example of using a URL variable to specify the hash file location, common for projects hosted on sites like FossHub. ```json "hash": { "url": "$url_fossies.sha256" } ``` -------------------------------- ### Add a Custom Bucket to Scoop Source: https://github.com/scoopinstaller/scoop/wiki/Buckets Add a custom bucket by providing its name and the URL of its Git repository. This allows installation from any Git-hosted bucket. ```powershell scoop bucket add ``` -------------------------------- ### Add a Custom Bucket After Creation Source: https://github.com/scoopinstaller/scoop/wiki/Buckets After creating your own bucket repository, add it to Scoop using its name and Git repository URL. This makes apps from your bucket installable. ```powershell scoop bucket add my-bucket https://github.com//my-bucket ``` -------------------------------- ### Update Apps and Scoop Source: https://context7.com/scoopinstaller/scoop/llms.txt Run `scoop update` to refresh Scoop core and all bucket manifests. Use `scoop update ` to update a specific app, or `scoop update *` to update all installed apps. Global updates also require `sudo`. ```powershell # Update Scoop core and all bucket manifests scoop update # Update a specific app scoop update git # Update all installed apps scoop update * # Update a globally installed app sudo scoop update git -g ``` -------------------------------- ### Scoop `checkver.ps1` Script Usage Source: https://context7.com/scoopinstaller/scoop/llms.txt Scripts for checking and automatically updating app manifests. Supports checking specific apps, all apps in a bucket, forcing updates, and specifying custom directories. Includes a full maintenance workflow example. ```powershell # Check the current upstream version of a specific app .\bin\checkver.ps1 git # Check all apps in the bucket .\bin\checkver.ps1 * # Check and auto-update a manifest to the latest version .\bin\checkver.ps1 git -u # Force update even if already on latest .\bin\checkver.ps1 git -f # Update all outdated manifests in the bucket .\bin\checkver.ps1 * -u # Check apps in a non-standard directory .\bin\checkver.ps1 git .\TODO -u # Full maintenance workflow for a bucket cd scoop config debug $true .\bin\checkver.ps1 * -u # update all manifests git add . git commit -m "Updated apps" git push scoop update # pull updated manifests locally scoop status # verify update availability scoop update git # install a specific update ``` -------------------------------- ### Creating a Custom Scoop Bucket Source: https://context7.com/scoopinstaller/scoop/llms.txt Steps to create and initialize a custom Scoop bucket in a Git repository. Includes cloning the repository and writing a minimal app manifest. ```powershell # 1. Create a new GitHub repo named e.g. "my-bucket", then clone it git clone https://github.com//my-bucket cd my-bucket # 2. Write a minimal app manifest '{ "version": "1.0", "url": "https://example.com/hello.ps1", "bin": "hello.ps1" }' > hello.json ``` -------------------------------- ### Uninstall Scoop and Installed Programs Source: https://github.com/scoopinstaller/scoop/wiki/Uninstalling-Scoop Run this command to uninstall Scoop and all programs installed through it. It will prompt for confirmation before proceeding. ```powershell scoop uninstall scoop ``` -------------------------------- ### Display All Scoop Commands Source: https://github.com/scoopinstaller/scoop/wiki/Commands Run this command to see a list of all available Scoop commands and their brief descriptions. This is the primary way to discover Scoop's functionality. ```bash scoop help ``` -------------------------------- ### Query All App Versions in Bucket with checkver.ps1 Source: https://github.com/scoopinstaller/scoop/wiki/App-Manifest-Autoupdate Use `checkver.ps1` with a wildcard to query the current versions of all apps within a bucket. This is useful for a bulk check. ```powershell .\bin\checkver.ps1 * # or .\bin\checkver.ps1 -App * ``` -------------------------------- ### Create a New App Manifest for a Bucket Source: https://github.com/scoopinstaller/scoop/wiki/Buckets Manually create a JSON app manifest file (e.g., hello.json) for your bucket. This defines the app's version, download URL, and executable. ```powershell git clone https://github.com//my-bucket cd my-bucket '{ version: "1.0", url: "https://gist.github.com/lukesampson/6446238/raw/hello.ps1", bin: "hello.ps1" }' > hello.json git add . git commit -m "add hello app" git push ``` -------------------------------- ### Configure checkver with URL and RegEx Source: https://github.com/scoopinstaller/scoop/wiki/App-Manifest-Autoupdate When the version number is not on the `homepage`, specify a different `url` in the `checkver` object and use a `regex` to extract the version from that URL's content. ```json "homepage": "https://www.7-zip.org/", "checkver": { "url": "https://www.7-zip.org/download.html", "regex": "Download 7-Zip ([\\d.]+)" } ``` -------------------------------- ### Update an Individual Application Source: https://github.com/scoopinstaller/scoop/wiki/Quick-Start Update a specific installed application, like curl, to its latest version. ```powershell scoop update curl ``` -------------------------------- ### Check PowerShell Version Source: https://github.com/scoopinstaller/scoop/wiki/Quick-Start Verify that your PowerShell version is 5.1 or later. This is a prerequisite for installing Scoop. ```powershell $PSVersionTable.PSVersion # has to be >= 5.1 ``` -------------------------------- ### Create Docker Machine Source: https://github.com/scoopinstaller/scoop/wiki/Docker Provision a Docker base machine named 'default'. This requires a virtualization provider like Virtualbox, VMware, or Hyper-V. ```bash docker-machine create default ``` -------------------------------- ### Query App Version with checkver.ps1 Source: https://github.com/scoopinstaller/scoop/wiki/App-Manifest-Autoupdate Use `checkver.ps1` to query the current version of a specific app in the bucket. This command helps identify if an update is available. ```powershell .\bin\checkver.ps1 # or .\bin\checkver.ps1 -App ``` -------------------------------- ### Check for App Updates Source: https://context7.com/scoopinstaller/scoop/llms.txt Determine which installed applications have available updates. It's recommended to update manifests before checking the status. ```powershell scoop status ``` ```powershell scoop update scoop status ``` -------------------------------- ### Update Scoop and Apps Source: https://github.com/scoopinstaller/scoop/wiki/FAQ Update Scoop itself to get the latest manifests, then update a specific app or all apps using a wildcard. ```bash scoop update ``` ```bash scoop update git ``` ```bash scoop update * ``` -------------------------------- ### Enable PHP Extensions Source: https://github.com/scoopinstaller/scoop/wiki/Custom-PHP-configuration Enable specific PHP extensions by uncommenting or adding them. Ensure the `extension_dir` is correctly set and extensions are compatible. ```ini extension_dir=ext extension=bz2 extension=curl extension=fileinfo extension=gd2 ;extension=gettext ;extension=gmp extension=intl ;extension=imap ;extension=interbase ;extension=ldap extension=mbstring extension=exif ; Must be after mbstring as it depends on it ;extension=mysqli ;extension=oci8_12c ; Use with Oracle Database 12c Instant Client ;extension=odbc extension=openssl ;extension=pdo_firebird extension=pdo_mysql ;extension=pdo_oci ;extension=pdo_odbc extension=pdo_pgsql extension=pdo_sqlite extension=pgsql ;extension=shmop ; The MIBS data available in the PHP distribution must be installed. ; See http://www.php.net/manual/en/snmp.installation.php ;extension=snmp ;extension=soap ;extension=sockets ;extension=sodium extension=sqlite3 ;extension=tidy ;extension=xmlrpc ;extension=xsl ``` -------------------------------- ### Uninstall App with Scoop Source: https://github.com/scoopinstaller/scoop/wiki/FAQ Remove an application installed via Scoop by using the 'scoop uninstall' command followed by the app name. ```bash scoop uninstall git ``` -------------------------------- ### Set PowerShell Execution Policy Source: https://github.com/scoopinstaller/scoop/wiki/Quick-Start Ensure PowerShell can execute local scripts by setting the execution policy to RemoteSigned. This is required for installing Scoop. ```powershell Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser ``` -------------------------------- ### List of Scoop Commands Source: https://github.com/scoopinstaller/scoop/wiki/Commands This is the output of the 'scoop help' command, listing all available commands and a short explanation for each. It serves as a reference for Scoop's capabilities. ```text alias Manage scoop aliases bucket Manage Scoop buckets cache Show or clear the download cache cat Show content of specified manifest. If available, `bat` will be used to pretty-print the JSON. checkup Check for potential problems cleanup Cleanup apps by removing old versions config Get or set configuration values create Create a custom app manifest depends List dependencies for an app, in the order they'll be installed download Download apps in the cache folder and verify hashes export Exports installed apps, buckets (and optionally configs) in JSON format help Show help for a command hold Hold an app to disable updates home Opens the app homepage import Imports apps, buckets and configs from a Scoopfile in JSON format info Display information about an app install Install apps list List installed apps prefix Returns the path to the specified app reset Reset an app to resolve conflicts search Search available apps shim Manipulate Scoop shims status Show status and check for new app versions unhold Unhold an app to enable updates uninstall Uninstall an app update Update apps, or Scoop itself virustotal Look for app's hash or url on virustotal.com which Locate a shim/executable (similar to 'which' on Linux) ``` -------------------------------- ### List Docker Machines Source: https://github.com/scoopinstaller/scoop/wiki/Docker View a list of your Docker machines. ```bash docker-machine ls ``` -------------------------------- ### Configure checkver with RegEx Source: https://github.com/scoopinstaller/scoop/wiki/App-Manifest-Autoupdate Use a regular expression in the `checkver` field of a manifest to extract the version number from the `homepage` URL. This is the simplest method for version checking. ```json "homepage": "https://www.rust-lang.org", "checkver": "Version ([\\d.]+)" ``` -------------------------------- ### Remove Old App Versions Source: https://context7.com/scoopinstaller/scoop/llms.txt Free up disk space by removing outdated versions of installed applications. The '-k' flag also clears the download cache. ```powershell scoop cleanup git ``` ```powershell scoop cleanup * ``` ```powershell scoop cleanup * -k ``` -------------------------------- ### Update App Globally (Short Form) Source: https://github.com/scoopinstaller/scoop/wiki/Global-Installs Updates a globally installed application using the short form '-g' for the --global flag. Requires administrator privileges. ```powershell sudo scoop update git -g ``` -------------------------------- ### Multi-Architecture App Manifest Source: https://context7.com/scoopinstaller/scoop/llms.txt Specifies different download URLs, hashes, and extraction directories based on the CPU architecture (64bit, 32bit). Useful for applications with architecture-specific builds. ```json { "version": "21.0", "description": "OpenJDK Java Development Kit", "homepage": "https://openjdk.org", "license": "GPL-2.0-only", "architecture": { "64bit": { "url": "https://download.java.net/java/GA/jdk21/openjdk-21_windows-x64_bin.zip", "hash": "sha256:abc123...", "extract_dir": "jdk-21" }, "32bit": { "url": "https://download.java.net/java/GA/jdk21/openjdk-21_windows-x86_bin.zip", "hash": "sha256:def456...", "extract_dir": "jdk-21" } }, "env_set": { "JAVA_HOME": "$dir" }, "env_add_path": "bin", "checkver": "github", "autoupdate": { "architecture": { "64bit": { "url": "https://download.java.net/java/GA/jdk$version/openjdk-$version_windows-x64_bin.zip" }, "32bit": { "url": "https://download.java.net/java/GA/jdk$version/openjdk-$version_windows-x86_bin.zip" } }, "hash": { "url": "$url.sha256" }, "extract_dir": "jdk-$version" } } ``` -------------------------------- ### Re-apply Solarized Theme and Clean Registry Source: https://github.com/scoopinstaller/scoop/wiki/Theming-Powershell Re-applies the Solarized color theme and cleans registry settings. Use this if color settings are lost after starting a new console. ```powershell concfg import solarized small ``` -------------------------------- ### PowerShell Module Manifest Source: https://context7.com/scoopinstaller/scoop/llms.txt Installs a PowerShell module, making it automatically available in `$env:PSModulePath`. The module is resolved via a symlink structure within the Scoop apps directory. ```json { "version": "1.16.0", "description": "A PowerShell prompt theme engine", "homepage": "https://ohmyposh.dev", "license": "MIT", "url": "https://github.com/JanDeDobbeleer/oh-my-posh/releases/download/v1.16.0/oh-my-posh.zip", "hash": "sha256:abc123...", "psmodule": { "name": "oh-my-posh" }, "bin": "oh-my-posh.exe" } ``` ```powershell # After installation, the module is automatically available: scoop install oh-my-posh Import-Module oh-my-posh # Module resolves via: ~\scoop\modules\oh-my-posh -> ~\scoop\apps\oh-my-posh\current -> ~\scoop\apps\oh-my-posh\1.16.0 ``` -------------------------------- ### Connect to Docker Engine with CLI Source: https://github.com/scoopinstaller/scoop/wiki/Docker Connect to a Docker Engine instance using the Docker CLI by specifying the host and port. The Docker Engine daemon must be listening on a TCP socket. ```bash docker -H ``` -------------------------------- ### Configure Git Credential Helper Source: https://github.com/scoopinstaller/scoop/wiki/Github-with-SSH-key Configures Git to use the 'manager-core' credential helper, which integrates with Windows Credential Manager to securely store authentication tokens. ```powershell git config --global credential.helper manager-core ```