Skip to content

Commit c663145

Browse files
committed
Add Windows fda install script, update docs
Signed-off-by: Karakatiza666 <bulakh.96@gmail.com>
1 parent 2e1ace3 commit c663145

File tree

3 files changed

+141
-22
lines changed

3 files changed

+141
-22
lines changed

docs.feldera.com/docs/interface/cli.md

Lines changed: 77 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import Tabs from '@theme/Tabs';
2+
import TabItem from '@theme/TabItem';
3+
14
# Command line tool (fda)
25

36
`fda` is a command line utility for interacting with the Feldera Manager's REST API.
@@ -6,7 +9,10 @@ It allows you to create, manage, and monitor pipelines. It also features an inte
69

710
## Installation
811

9-
### Quick Install (Linux)
12+
### Quick Install
13+
14+
<Tabs groupId="os">
15+
<TabItem value="linux" label="Linux">
1016

1117
```bash
1218
curl -fsSL https://feldera.com/install-fda | bash
@@ -19,24 +25,73 @@ curl -fsSL https://feldera.com/install-fda | bash
1925

2026
Requires glibc >= 2.39 (Ubuntu 24.04+, Debian 13+, Fedora 40+, RHEL 10+).
2127

28+
</TabItem>
29+
<TabItem value="windows" label="Windows">
30+
31+
```powershell
32+
powershell -ExecutionPolicy Bypass -NoProfile -c "irm https://feldera.com/install-fda.ps1 | iex"
33+
```
34+
35+
| Supported platforms |
36+
|---|
37+
| windows-x86_64 |
38+
| windows-arm64 (via emulation) |
39+
40+
Requires Windows 10 or later with PowerShell 5.1+.
41+
Installs `fda.exe` to `%USERPROFILE%\.feldera\bin` and adds it to user's `PATH`.
42+
43+
:::note
44+
Corporate environments may block `irm | iex` via network or execution policy restrictions.
45+
In that case, download the zip directly from the
46+
[GitHub releases page](https://github.com/feldera/feldera/releases) and extract `fda.exe` manually.
47+
:::
48+
49+
</TabItem>
50+
</Tabs>
2251

2352
### Installing a Specific Version
2453

2554
Since `fda` is a single binary, you can update or install older versions by re-running the installer script.
2655

2756
To install a specific version, pass the release git tag to the install script:
2857

58+
<Tabs groupId="os">
59+
<TabItem value="linux" label="Linux">
60+
2961
```bash
30-
curl -fsSL https://feldera.com/install-fda | FDA_VERSION=v0.247.0 bash
62+
curl -fsSL https://feldera.com/install-fda | FDA_VERSION=v0.270.0 bash
63+
```
64+
65+
</TabItem>
66+
<TabItem value="windows" label="Windows">
67+
68+
```powershell
69+
powershell -c "$env:FDA_VERSION='v0.270.0'; irm https://feldera.com/install-fda.ps1 | iex"
3170
```
3271

72+
</TabItem>
73+
</Tabs>
74+
3375
To install to a custom directory:
3476

77+
<Tabs groupId="os">
78+
<TabItem value="linux" label="Linux">
79+
3580
```bash
36-
curl -fsSL https://feldera.com/install-fda | FDA_VERSION=v0.247.0 FELDERA_INSTALL=/opt/feldera bash
81+
curl -fsSL https://feldera.com/install-fda | FDA_VERSION=v0.270.0 FELDERA_INSTALL=/opt/feldera bash
3782
```
3883

39-
### Using Cargo (Windows, MacOS)
84+
</TabItem>
85+
<TabItem value="windows" label="Windows">
86+
87+
```powershell
88+
powershell -c "$env:FELDERA_INSTALL='C:\tools\feldera'; irm https://feldera.com/install-fda.ps1 | iex"
89+
```
90+
91+
</TabItem>
92+
</Tabs>
93+
94+
### Using Cargo (macOS, other platforms)
4095

4196
To install `fda` with Cargo, you need a working Rust environment. You can install Rust by following
4297
the instructions on the [Rust website](https://www.rust-lang.org/tools/install).
@@ -66,36 +121,37 @@ cargo install --path .
66121
Once the `fda` binary is installed, you can enable shell command completion for `fda`
67122
by adding the following line to your shell init script.
68123

69-
* Bash
124+
<Tabs groupId="os">
125+
<TabItem value="linux" label="Linux">
70126

71127
```bash
128+
# Bash
72129
echo "source <(COMPLETE=bash fda)" >> ~/.bashrc
73-
```
74130

75-
* Elvish
76-
77-
```bash
131+
# Elvish
78132
echo "eval (COMPLETE=elvish fda)" >> ~/.elvish/rc.elv
79-
```
80-
81-
* Fish
82133

83-
```bash
134+
# Fish
84135
echo "source (COMPLETE=fish fda | psub)" >> ~/.config/fish/config.fish
85-
```
86136

87-
* Powershell
88-
89-
```bash
90-
echo "COMPLETE=powershell fda | Invoke-Expression" >> $PROFILE
137+
# Zsh
138+
echo "source <(COMPLETE=zsh fda)" >> ~/.zshrc
91139
```
92140

93-
* Zsh
141+
</TabItem>
142+
<TabItem value="windows" label="Windows">
94143

95-
```bash
96-
echo "source <(COMPLETE=zsh fda)" >> ~/.zshrc
144+
```powershell
145+
# Powershell
146+
mkdir -Force (Split-Path $PROFILE)
147+
'$env:COMPLETE="powershell"; (fda | Out-String) | Invoke-Expression; Remove-Item Env:\COMPLETE -ErrorAction SilentlyContinue' >> $PROFILE
148+
# To activate autocomplete without restarting the terminal:
149+
. $PROFILE
97150
```
98151

152+
</TabItem>
153+
</Tabs>
154+
99155
## Connecting & Authentication
100156

101157
To connect to the Feldera manager, you need to provide the URL of the manager. You can either provide the URL as an

docs.feldera.com/static/install-fda

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Feldera fda CLI installer
33
# Usage:
44
# curl -fsSL https://feldera.com/install-fda | bash
5-
# curl -fsSL https://feldera.com/install-fda | FDA_VERSION=v0.247.0 bash
5+
# curl -fsSL https://feldera.com/install-fda | FDA_VERSION=v0.270.0 bash
66
# curl -fsSL https://feldera.com/install-fda | FELDERA_INSTALL=/opt/feldera bash
77

88
set -eu
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Feldera fda CLI installer for Windows
2+
# Usage:
3+
# irm https://feldera.com/install-fda.ps1 | iex
4+
# $env:FDA_VERSION="v0.270.0"; irm https://feldera.com/install-fda.ps1 | iex
5+
# $env:FELDERA_INSTALL="C:\tools\feldera"; irm https://feldera.com/install-fda.ps1 | iex
6+
7+
$ErrorActionPreference = 'Stop'
8+
9+
$FelderaInstall = if ($env:FELDERA_INSTALL) { $env:FELDERA_INSTALL } else { "$env:USERPROFILE\.feldera" }
10+
$BinDir = "$FelderaInstall\bin"
11+
12+
# AddressWidth is OS bitness, not CPU arch: blocks 32-bit Windows only.
13+
# arm64 passes and gets the x86_64 binary, which runs via Windows emulation.
14+
$Arch = (Get-CimInstance Win32_Processor).AddressWidth
15+
if ($Arch -ne 64) {
16+
Write-Error "Unsupported OS: only 64-bit Windows is supported."
17+
exit 1
18+
}
19+
$Target = "x86_64-pc-windows-msvc"
20+
21+
if ($env:FDA_VERSION) {
22+
$Version = $env:FDA_VERSION
23+
$DownloadUrl = "https://github.com/feldera/feldera/releases/download/$Version/fda-$Target.zip"
24+
Write-Host "Installing fda $Version"
25+
} else {
26+
$DownloadUrl = "https://github.com/feldera/feldera/releases/latest/download/fda-$Target.zip"
27+
Write-Host "Installing fda (latest)"
28+
}
29+
30+
$TmpDir = [System.IO.Path]::GetTempPath() + [System.Guid]::NewGuid().ToString()
31+
New-Item -ItemType Directory -Path $TmpDir | Out-Null
32+
33+
try {
34+
$TmpZip = "$TmpDir\fda.zip"
35+
36+
Write-Host "Downloading from $DownloadUrl"
37+
Invoke-WebRequest -Uri $DownloadUrl -OutFile $TmpZip -UseBasicParsing
38+
39+
Write-Host "Extracting fda binary"
40+
Expand-Archive -Path $TmpZip -DestinationPath $TmpDir -Force
41+
42+
New-Item -ItemType Directory -Force -Path $BinDir | Out-Null
43+
Move-Item -Force "$TmpDir\fda.exe" "$BinDir\fda.exe"
44+
45+
Write-Host "Installed fda to $BinDir\fda.exe"
46+
} finally {
47+
Remove-Item -Recurse -Force $TmpDir -ErrorAction SilentlyContinue
48+
}
49+
50+
# Add to PATH (user scope) if not already present
51+
$UserPath = [Environment]::GetEnvironmentVariable('PATH', 'User')
52+
if ($UserPath -notlike "*$BinDir*") {
53+
[Environment]::SetEnvironmentVariable('PATH', "$BinDir;$UserPath", 'User')
54+
Write-Host "Added $BinDir to PATH (user). Restart your shell for it to take effect."
55+
}
56+
57+
Write-Host ""
58+
Write-Host "fda was installed successfully!"
59+
& "$BinDir\fda.exe" --version 2>$null
60+
61+
Write-Host ""
62+
Write-Host "To enable shell completions, see:"
63+
Write-Host " https://docs.feldera.com/docs/interface/cli#optional-shell-completion"

0 commit comments

Comments
 (0)