Skip to content

Commit 320c689

Browse files
Docs: Add Windows installation instructions for Auth0 CLI using PowerShell. (#1020)
* Update Windows installation nstructions Add instructions to install via Powershell commands * Add windows powershell installation * Update syntax * Update syntax * Add fetch latest version * Fixed Issues * fix extra line spaces --------- Co-authored-by: Kunal Dawar <[email protected]> Co-authored-by: KunalOfficial <[email protected]>
1 parent 19529eb commit 320c689

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,20 @@ scoop bucket add auth0 https://github.com/auth0/scoop-auth0-cli.git
4949
scoop install auth0
5050
```
5151

52+
Install via [Powershell](https://learn.microsoft.com/en-us/powershell/)
53+
54+
```powershell
55+
#fetch latest release information
56+
$latestRelease = Invoke-RestMethod -Uri "https://api.github.com/repos/auth0/auth0-cli/releases/latest"
57+
$latestVersion = $latestRelease.tag_name
58+
$version = $latestVersion -replace "^v"
59+
# Download the binary to the current folder
60+
Invoke-WebRequest -Uri "https://github.com/auth0/auth0-cli/releases/download/${latestVersion}/auth0-cli_${version}_Windows_x86_64.zip" -OutFile ".\auth0.zip"
61+
Expand-Archive ".\auth0.zip" .\
62+
# To be able to run the binary from any directory, make sure you add it to your $PATH
63+
[System.Environment]::SetEnvironmentVariable('PATH', $Env:PATH + ";${pwd}")
64+
```
65+
5266
### Linux
5367

5468
Install via [cURL](https://curl.se/):

docs/index.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,21 @@ Install via [Scoop](https://scoop.sh/):
2222
scoop bucket add auth0 https://github.com/auth0/scoop-auth0-cli.git && scoop install auth0
2323
```
2424

25+
Install via [Powershell](https://learn.microsoft.com/en-us/powershell/)
26+
27+
```
28+
#fetch latest release information
29+
$apiUrl = "https://api.github.com/repos/auth0/auth0-cli/releases/latest"
30+
$latestRelease = Invoke-RestMethod -Uri $apiUrl
31+
$latestVersion = $latestRelease.tag_name
32+
$version = $latestVersion -replace "^v"
33+
# Download the binary to the current folder
34+
Invoke-WebRequest "https://github.com/auth0/auth0-cli/releases/download/${latestVersion}/auth0-cli_${version}_Windows_x86_64.zip" -OutFile ".\auth0.zip"
35+
Expand-Archive ".\auth0.zip" .\
36+
# To be able to run the binary from any directory, make sure you add it to your '$PATH'
37+
[System.Environment]::SetEnvironmentVariable('PATH', $Env:PATH + ";${pwd}")
38+
```
39+
2540
### Linux
2641

2742
Install via [cURL](https://curl.se/):

internal/cli/doc-gen.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,19 @@ Install via [Scoop](https://scoop.sh/):
5757
5858
{{ wrapWithBackticks "scoop bucket add auth0 https://github.com/auth0/scoop-auth0-cli.git && scoop install auth0" }}
5959
60+
Install via [Powershell](https://learn.microsoft.com/en-us/powershell/)
61+
62+
{{ wrapWithBackticks ` + "`" + `#fetch latest release information
63+
$apiUrl = "https://api.github.com/repos/auth0/auth0-cli/releases/latest"
64+
$latestRelease = Invoke-RestMethod -Uri $apiUrl
65+
$latestVersion = $latestRelease.tag_name
66+
$version = $latestVersion -replace "^v"
67+
# Download the binary to the current folder
68+
Invoke-WebRequest "https://github.com/auth0/auth0-cli/releases/download/${latestVersion}/auth0-cli_${version}_Windows_x86_64.zip" -OutFile ".\auth0.zip"
69+
Expand-Archive ".\auth0.zip" .\
70+
# To be able to run the binary from any directory, make sure you add it to your '$PATH'
71+
[System.Environment]::SetEnvironmentVariable('PATH', $Env:PATH + ";${pwd}")` + "`" + ` }}
72+
6073
### Linux
6174
6275
Install via [cURL](https://curl.se/):

0 commit comments

Comments
 (0)