# Set up Windows for development

Recently I wiped my Windows computer because of my cluttered config, and I'm here to tell you how to set up an elegant environment.

## configure shell

At first, you need a terminal application, I choose [Windows Terminal](https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701?hl=en-us&gl=us).

Windows Terminal becomes the default terminal application in Windows Inside Preview these days. Compared to other terminal applications based on web technology (e.g. Electron), its interaction is natural and intuitive. If you use Windows, it is the best and the only choice.

### Scoop

Scoop is a package manager for Windows. Compared to other competitors, Scoop is strict and all app installations are regulated, as a result, scoop doesn't have as many packages as the other competitors, but it's more than enough.

It is very easy to install, open PowerShell, and run:

```powershell
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
irm get.scoop.sh | iex
```

### Oh My Posh

The default PowerShell is powerful enough to do anything I want, but it's not beautiful enough.

Oh My Posh is a prompt theme engine for PowerShell, to install it, just run:

```powershell
winget install JanDeDobbeleer.OhMyPosh -s winget
```

To choose a theme you like, run this command to show all themes:

```powershell
Get-PoshThemes
```

I choose `1_shell` theme, so I run:

```powershell
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH/1_shell.omp.json" | Invoke-Expression
```

## Install Apps

### PnPm

PnPm is a Fast, disk space efficient package manager for Node.js, **AND the universal Node.js environment manager**.

you can install PnPm even if you don't have Node.js installed, using the following script:

```powershell
iwr https://get.pnpm.io/install.ps1 -useb | iex
```

### Node.js

We can use PnPm to install Node.js:

```powershell
# In Administer PowerShell session
pnpm env use --global 16
```

### Git

The best source code management software in the world.

```powershell
scoop install git
```

### gsudo

`sudo` command for Windows

```powershell
scoop install gsudo
```

### OpenSSL

TLS/SSL toolkit

```powershell
scoop install openssl
```

### MySQL 5.7

The world's most popular open-source database.

```powershell
scoop install mysql57
```

### Others

For applications with a web version, I prefer to use the web version, e.g. Telegram / Twitter.

For the other Apps, I prefer to go to the official website to install these apps.

1. [Chrome](https://www.google.com/chrome/): Browsers for surfing the Internet.
2. [Firefox](https://www.mozilla.org/): Browsers for debugging websites.
3. [VSCode](https://code.visualstudio.com/): The only IDE I need for Web Dev.
4. [Postman](https://www.postman.com/): API test/document Tool.
5. [Github Desktop](https://desktop.github.com/): Git client with GUI.

## Code Fonts

I mainly use Jetbrain-Mono and FiraCode:

```powershell
scoop bucket add nerd-fonts
scoop install FiraCode
scoop bucket add nerd-fonts
scoop install JetBrains-Mono
```

