mirror of
https://github.com/aljazceru/goose.git
synced 2025-12-17 22:24:21 +01:00
attempt to build CLI native for Windows (#3058)
This commit is contained in:
@@ -142,7 +142,32 @@ import LinuxDesktopInstallButtons from '@site/src/components/LinuxDesktopInstall
|
||||
</div>
|
||||
</TabItem>
|
||||
<TabItem value="cli" label="Goose CLI">
|
||||
There isn't native installation support for Windows CLI, however you can run Goose using WSL (Windows Subsystem for Linux).
|
||||
Install the Goose CLI directly from the browser using our download script, or use WSL for a Linux-like experience.
|
||||
|
||||
<h3 style={{ marginTop: '1rem' }}>Option 1: Native Windows CLI (Recommended)</h3>
|
||||
Run the following command in **Git Bash**, **MSYS2**, or **PowerShell** to install the latest version of Goose natively on Windows:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://github.com/block/goose/releases/download/stable/download_cli.sh | bash
|
||||
```
|
||||
This script will fetch the latest version of Goose and set it up on your system.
|
||||
|
||||
If you'd like to install without interactive configuration, disable `CONFIGURE`:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://github.com/block/goose/releases/download/stable/download_cli.sh | CONFIGURE=false bash
|
||||
```
|
||||
|
||||
:::note Prerequisites
|
||||
- **Git Bash** (recommended): Comes with [Git for Windows](https://git-scm.com/download/win)
|
||||
- **MSYS2**: Available from [msys2.org](https://www.msys2.org/)
|
||||
- **PowerShell**: Available on Windows 10/11 by default
|
||||
|
||||
The script requires `curl` and `unzip` to be available in your environment.
|
||||
:::
|
||||
|
||||
<h3>Option 2: Windows Subsystem for Linux (WSL)</h3>
|
||||
If you prefer a Linux-like environment, you can run Goose using WSL:
|
||||
|
||||
1. Open [PowerShell](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows) as Administrator and install WSL and the default Ubuntu distribution:
|
||||
|
||||
@@ -193,7 +218,7 @@ Goose works with a set of [supported LLM providers][providers], and you'll need
|
||||
Upon installing, Goose will automatically enter its configuration screen. Here is where you can set up your LLM provider.
|
||||
|
||||
:::tip Windows Users
|
||||
Choose to not store to keyring when prompted.
|
||||
When using the native Windows CLI, choose to not store to keyring when prompted during initial configuration.
|
||||
:::
|
||||
|
||||
Example:
|
||||
@@ -221,6 +246,12 @@ Goose works with a set of [supported LLM providers][providers], and you'll need
|
||||
:::info Windows Users
|
||||
On initial run, you may encounter errors about keyrings when setting your API Keys. Set the needed environment variables manually, e.g.:
|
||||
|
||||
**For Native Windows CLI (Git Bash/MSYS2):**
|
||||
```bash
|
||||
export OPENAI_API_KEY={your_api_key}
|
||||
```
|
||||
|
||||
**For WSL:**
|
||||
```bash
|
||||
export OPENAI_API_KEY={your_api_key}
|
||||
```
|
||||
@@ -231,8 +262,17 @@ Goose works with a set of [supported LLM providers][providers], and you'll need
|
||||
● OPENAI_API_KEY is set via environment variable
|
||||
```
|
||||
|
||||
To make the changes persist in WSL across sessions, add the goose path and export commands to your `.bashrc` or `.bash_profile` file so you can load it later.
|
||||
**To make the changes persist across sessions:**
|
||||
|
||||
**For Native Windows CLI (Git Bash):**
|
||||
Add the goose path and export commands to your `~/.bashrc` or `~/.bash_profile` file:
|
||||
```bash
|
||||
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
|
||||
echo 'export OPENAI_API_KEY=your_api_key' >> ~/.bashrc
|
||||
source ~/.bashrc
|
||||
```
|
||||
|
||||
**For WSL:**
|
||||
```bash
|
||||
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
|
||||
echo 'export OPENAI_API_KEY=your_api_key' >> ~/.bashrc
|
||||
|
||||
Reference in New Issue
Block a user