Imagine today you are onboarding! You get a brand-new machine and want to get ready to start coding ASAP. If you want to speed up building a development environment, this post is for you.
Before you install Scoop, remember that the Scoop bucket needs git to function well, so if your local machine has not installed git yet, please install it manually or via the script.
Why Scoop
The package management tool has various choices on Windows: Chocolatey, Scoop, and winget.
Winget is the official tool that Microsoft provides. But it’s also the youngest of these tools, so the package is also the fewest.
Chocolatey is the oldest one and has the most plentiful applications. It includes packages relative to development or CLI tools and other software for non-developers. Even if you are not a developer, it is convenient to use. But it depends on .NET Framework 4.x or above.
Scoop, in the beginning, the package handled is less than Chocolatey; it focused on taking development environment building software such as developers. But now it has various bucket that includes many applications, which is helpful for non-developers. No special require dependencies like .NET framework vesion.
Point\Tool | Chocolatey | Scoop | winget |
---|---|---|---|
Owner | Chocolatey Software, Inc. | lukesampson | Microsoft Corp. |
Publish | Mar. 2011 | Sep. 2013 | May 2020 |
Packages | 9853 ref* | 5277 ref* | 4315 ref* |
Pricing | Apache v2.0 & PAID ref* | MIT License ref* | MIT License ref* |
Setup Scoop environment variable
For scoop there are three environment variables you can setup when you install.
For more detail you can check the scoop install script here
- $Env:SCOOP
- Default will locate at
$env:USERPROFILE\scoop
- Default will locate at
- $Env:SCOOP_GLOBAL
- Default will locate at
$env:ProgramData\scoop
- Default will locate at
- $Env:SCOOP_CACHE
- Default will locate at
$ScoopDir\cache
- Default will locate at
- $env:XDG_CONFIG_HOME
- This variable can’t config out side, can only config before you install. This variable affect where to save the scoop config file.
Install scoop
Take a look at the code snippet below:
|
|
If you just want to install scoop this code snippet is what you need.
Recommand buckets
scoop bucket add main
- main => default bucket, all CLI tools no GUI tools. No need to add this bucket. If you install scoop, this bucket will be add automatically.
scoop bucket add extras
- extras => basically all GUI relative tools.
scoop bucket add java
- java => Any JDK including Oracle’s version.
scoop bucket add nerd-fonts
- nerd-fonts => Many fonts that developer will love.
scoop bucket add versions
- versions => Including many kinds of version of APPs from night build to previous verions.
Install Git (If needed)
If you haven’t installed git yet, you can install it via Scoop—just a simple code.
scoop install main/git
Of course you can download executable file on official site. Then, you can follow the wizard to install git easily.
Create a .ssh folder (if needed)
You probably do not have a .ssh folder on a brain-new machine. This folder is the default location where OpenSSH gets the credential (ref*). You can place the private key here or have a file named config
to store the path where you place your private key. You can check what you can configure in the file here.
Here is example of a SSH config file
|
|
Create a ssh key (if needed)
Usually, Github/Gitlab or Bitbucket are the comment repositories and access repositories by an SSH key or GPG key. You can generate a key pair via the command below.
|
|
To generate a key pair for Github, you’d better use the Ed25519
type; OpenSSH provides different kinds. Take a look at the table:
Type of key | Minimum key size (bits) | Example |
---|---|---|
Ed25519 (ed25519) | 256 | ssh-keygen -t ed25519 -b 256 |
ECDSA (ecdsa) | 256 | ssh-keygen -t ecdsa -b 256 |
RSA (rsa) | 2048 | ssh-keygen -t rsa -b 2048 |
DSA / DSS (dsa) | 1024 | ssh-keygen -t dsa -b 1024 |
For more detail you can check here.
Install development language that you need
You can install various development languages via Scoop—E.g., Java, Python, NodeJS, Golang, PHP, Ruby, dotnet, and even Rust. All you need to do is a simple code snippet.
|
|
If you have multiple versions to switch, you can type:
scoop reset <app>
E.g.
|
|
Install container
I use podman as my container tool.
|
|
The reason I choose podman, you can reference this post.
Of course, you can choose Docker. Since its more popular and common. Install is simple as below:
|
|
Other APPs that I recommend
Here is the APPs that I installed and management via Scoop.
|
|
APPs can search here.
My script to speed up local environment
Finally, Here is the script to achieve the goal:
This script is MIT license, please feel free to use it and give some feed back to me.