Setting Up Codename Goose in WSL
Ok, so, I’ve heard about this CLI tool that allows you to use your preferred LLM provider, Goose, from Block (Square, payment thingy) which I think is officially called codename goose, but we all know everyone is going to refer to it as Goose. Anyway, Goose will allow you to run commands and interact with your computer and also use Model Context Protocol (MCP) tools.
So, super quick pre-amble there but essentially getting set up with Goose (as a WSL user) wasn’t as straight forward as I hoped.
Install Goose
These instructions will be going through the install on a fresh Ubuntu 24.04 install on WSL.
The installation for goose is essentially Linux, there’s Windows instructions but it’s to use WSL.
I want to make sure I’m all up to date first:
1sudo apt update -y && sudo apt upgrade -y && sudo apt autoremove -yI’ll open a new WSL terminal without sudo permissions applied and keep the sudo terminal open for the next steps.
I’ll run the install script.
1curl -fsSL https://github.com/block/goose/releases/download/stable/download_cli.sh | bashThis will attempt to install the CLI but there’s a missing dependency, here’s the output.
1$ curl -fsSL https://github.com/block/goose/releases/download/stable/download_cli.sh | bash
2Downloading stable release: goose-x86_64-unknown-linux-gnu.tar.bz2...
3Extracting goose-x86_64-unknown-linux-gnu.tar.bz2...
4tar (child): bzip2: Cannot exec: No such file or directory
5tar (child): Error is not recoverable: exiting now
6tar: Child returned status 2
7tar: Error is not recoverable: exiting nowSo, there’s a missing dependency bzip2 I’ll install the missing
dependency now in the terminal with sudo permissions:
1sudo apt install bzip2I’m now allowed to continue with the CLI setup!
1$ curl -fsSL https://github.com/block/goose/releases/download/stable/download_cli.sh | bash
2Downloading stable release: goose-x86_64-unknown-linux-gnu.tar.bz2...
3Extracting goose-x86_64-unknown-linux-gnu.tar.bz2...
4Creating directory: /home/username/.local/bin
5Moving goose to /home/username/.local/bin/goose
6
7Configuring Goose
8
9
10Welcome to goose! Let's get you set up with a provider.
11 you can rerun this command later to update your configuration
12
13┌ goose-configure
14│
15◆ Which model provider should we use?
16│ ○ Anthropic
17│ ○ Azure OpenAI
18│ ○ Databricks
19│ ○ Google Gemini
20│ ○ Groq
21│ ○ Ollama
22│ ○ OpenAI
23│ ● OpenRouter (Router for many model providers)
24└I’m going to go with OpenRouter for now as I can pick which model I
want to use, I’ll be using anthropic/claude-3.5-sonnet for now.
So, now I’m prompted to add my OpenRouter API key.
1Configuring Goose
2
3
4Welcome to goose! Let's get you set up with a provider.
5 you can rerun this command later to update your configuration
6
7┌ goose-configure
8│
9◇ Which model provider should we use?
10│ OpenRouter
11│
12◆ Provider OpenRouter requires OPENROUTER_API_KEY, please enter a value
13│
14└Paste in my OpenRouter API key, hit enter and get this:
1 Error Failed to access secure storage (keyring): Platform secure storage failure: DBus error: The name org.freedesktop.secrets was not provided by any .service files
2 Please check your system keychain and run 'goose configure' again.
3 If your system is unable to use the keyring, please try setting secret key(s) via environment variables.
4
5Warning: Goose installed, but /home/username/.local/bin is not in your PATH.
6Add it to your PATH by editing ~/.bashrc, ~/.zshrc, or similar:
7 export PATH="/home/username/.local/bin:$PATH"
8Then reload your shell (e.g. 'source ~/.bashrc', 'source ~/.zshrc') to apply changes.So keyring (what’s in the failure message) is part of Gnome, that’s present in the full Ubuntu GUI install, it’s not part of the WSL install.
I’m going to need to do this via environment variables!
API Key Management
Ok, so… remember my post about speeding up my zsh shell? Probably not I only posted it the other day, but it has some swish bits in there for loading the SSH agent! I’m using that same approach for managing API keys securely.
You don’t have to follow this! Add your keys directly into your shell config if you like, I’m writing this for future Scott essentially!
All the keys I want to use in Goose I’ll add to a ~/.goose_keys file, this could alternately go into a ~/.config/api-keys file but I
like things in home so I can poke around in there without having to go
digging elsewhere.
1touch ~/.goose_keys
2chmod 600 ~/.goose_keysThen add in my key and the environment-specific configuration:
1# Make sure to chmod 600 this file after creation
2
3# OpenRouter API configuration
4export OPENROUTER_API_KEY="secret-key-here"Great! I’ll update my current .zshrc config to load the keys:
1# Lazy load API keys and sensitive configurations
2function _load_api_keys() {
3 if [ -f ~/.goose_keys ]; then
4 if [ "$(stat -c %a ~/.goose_keys)" != "600" ]; then
5 echo "Warning: ~/.goose_keys has incorrect permissions. Run: chmod 600 ~/.goose_keys"
6 else
7 source ~/.goose_keys
8 fi
9 fi
10}
11
12autoload -U add-zsh-hook
13add-zsh-hook precmd _load_api_keysNow if I try the goose configure command I get this:
1$ goose configure
2
3Welcome to goose! Let's get you set up with a provider.
4 you can rerun this command later to update your configuration
5
6┌ goose-configure
7│
8◇ Which model provider should we use?
9│ OpenRouter
10│
11● OPENROUTER_API_KEY is set via environment variable
12│
13◆ Would you like to save this value to your keyring?
14│ ○ Yes / ● No
15└I’ll pick No, because there’s no keyring! Then I’m prompted for the model I want to use, the default is listed.
1$ goose configure
2
3Welcome to goose! Let's get you set up with a provider.
4 you can rerun this command later to update your configuration
5
6┌ goose-configure
7│
8◇ Which model provider should we use?
9│ OpenRouter
10│
11● OPENROUTER_API_KEY is set via environment variable
12│
13◇ Would you like to save this value to your keyring?
14│ No
15│
16◆ Enter a model from that provider:
17│ anthropic/claude-3.5-sonnet (default)
18└I’ll hit enter to accept the default.
Then a last little confirmation:
1◐ Checking your configuration...
2└ Configuration saved successfullyLooks like I’m all set!
To start a Goose session it’s goose session then I’m set to start
using it!
1$ goose session
2starting session | provider: openrouter model: anthropic/claude-3.5-sonnet
3 logging to /home/username/.config/goose/sessions/iNy1kNmS.jsonl
4
5Goose is running! Enter your instructions, or try asking what goose can do.
6
7( O)>Sweet! One last thing now is to check out what’s been configured, you
may have seen references to where the config is: /home/scott/.config/goose/config.yaml
I’ll pop that open now to check out what’s in there:
1GOOSE_MODEL: anthropic/claude-3.5-sonnet
2GOOSE_PROVIDER: openrouter
3extensions:
4 developer:
5 enabled: true
6 name: developer
7 type: builtinAnd right now, that’s not much!
What comes in the box? 📦
Ok, so Goose comes with some built-in extensions:
- Developer: Your basic dev tools - this one’s on by default
- Computer Controller: For web scraping and automation stuff
- Memory: Helps Goose remember your preferences
- JetBrains: For those IDE fans out there
- Google Drive: File management with Google Drive
The Developer extension is enabled by default, I want to enable the
Computer Controller and Memory now using the goose configure command:
1$ goose configure
2
3This will update your existing config file
4 if you prefer, you can edit it directly at /home/scott/.config/goose/config.yaml
5
6┌ goose-configure
7│
8◆ What would you like to configure?
9│ ○ Configure Providers
10│ ○ Toggle Extensions (Enable or disable connected extensions)
11│ ● Add Extension
12└Goose configure you’d think to enable existing extensions it’d be toggle extensions but it’s not add extension, then built in extension.
1┌ goose-configure
2│
3◇ What would you like to configure?
4│ Add Extension
5│
6◆ What type of extension would you like to add?
7│ ● Built-in Extension (Use an extension that comes with Goose)
8│ ○ Command-line Extension
9│ ○ Remote Extension
10└Now, instead of allowing me to select individual extensions to enable, all I can do is select one at a time then go through the config again for the next one! So, I’ll select the Computer Controller extension first:
1┌ goose-configure
2│
3◇ What would you like to configure?
4│ Add Extension
5│
6◇ What type of extension would you like to add?
7│ Built-in Extension
8│
9◆ Which built-in extension would you like to enable?
10│ ○ Developer Tools
11│ ● Computer Controller (controls for webscraping, file caching, and automations)
12│ ○ Google Drive
13│ ○ Memory
14│ ○ JetBrains
15└the CLI confirms it’s enabled then I’m back in the terminal!
If you know which extensions you want it’s quicker to edit the /home/username/.config/goose/config.yaml file directly!
This is for me next time so I can copy and paste the config from this post!
1GOOSE_PROVIDER: openrouter
2GOOSE_MODEL: anthropic/claude-3.5-sonnet
3extensions:
4 computercontroller:
5 enabled: true
6 name: computercontroller
7 type: builtin
8 developer:
9 enabled: true
10 name: developer
11 type: builtin
12 memory:
13 enabled: true
14 name: memory
15 type: builtinYou can check out the Goose extensions page where you can see some of the built in extensions and how to install other extensions.
The thing that got me excited about using Goose was the possibility to use your own extensions (MCP tools!) I’ve made some of my own MCP tools, you can see them on my GitHub or read about using them with Claude Desktop in my Using MCP Tools with Claude and Cline post.
Adding in my own MCP tools
So, I have a few MCP tools I’ve built that I like to use (you can see them here on GitHub if you like) the thing is, the config I’m used to for Claude Desktop and Cline is JSON but the config for Goose is YAML.
You can add in a MCP tool via the Goose CLI or just add them directly to the config file. There’s an example of the config on the Goose docs
I’ll follow that format and add them directly to the config file:
1GOOSE_PROVIDER: openrouter
2GOOSE_MODEL: anthropic/claude-3.5-sonnet
3extensions:
4 computercontroller:
5 enabled: true
6 name: computercontroller
7 type: builtin
8 developer:
9 enabled: true
10 name: developer
11 type: builtin
12 memory:
13 enabled: true
14 name: memory
15 type: builtin
16 mcp-tavily-search:
17 name: mcp-tavily-search
18 cmd: npx
19 args: [-y, mcp-tavily-search]
20 enabled: true
21 envs: { 'TAVILY_API_KEY': 'key-here' }
22 type: stdio
23 mcp-perplexity-search:
24 name: mcp-perplexity-search
25 cmd: npx
26 args: [-y, mcp-perplexity-search]
27 enabled: true
28 envs: { 'PERPLEXITY_API_KEY': 'key-here' }
29 type: stdio
30 mcp-jinaai-search:
31 name: mcp-jinaai-search
32 cmd: npx
33 args: [-y, mcp-jinaai-search]
34 enabled: true
35 envs: { 'JINAAI_API_KEY': 'key-here' }
36 type: stdio
37 mcp-jinaai-grounding:
38 name: mcp-jinaai-grounding
39 cmd: npx
40 args: [-y, mcp-jinaai-grounding]
41 enabled: true
42 envs: { 'JINAAI_API_KEY': 'key-here' }
43 type: stdio
44 mcp-jinaai-reader:
45 name: mcp-jinaai-reader
46 cmd: npx
47 args: [-y, mcp-jinaai-reader]
48 enabled: true
49 envs: { 'JINAAI_API_KEY': 'key-here' }
50 type: stdio
51 mcp-svelte-docs:
52 name: mcp-svelte-docs
53 cmd: npx
54 args: [-y, mcp-svelte-docs]
55 enabled: true
56 type: stdio
57 mcp-brave-search:
58 name: mcp-brave-search
59 cmd: npx
60 args: [-y, '@modelcontextprotocol/server-brave-search']
61 enabled: true
62 envs: { 'BRAVE_API_KEY': 'key-here' }
63 type: stdio
64 mcp-memory-libsql:
65 name: mcp-memory-libsql
66 cmd: npx
67 args: [-y, mcp-memory-libsql]
68 enabled: true
69 envs: { 'LIBSQL_URL': 'file:/home/scott/repos/memory-tool.db' }
70 type: stdio
71 mcp-sequentialthinking-tools:
72 name: mcp-sequentialthinking-tools
73 cmd: npx
74 args: [-y, mcp-sequentialthinking-tools]
75 enabled: true
76 type: stdio
77 mcp-wsl-exec:
78 name: mcp-wsl-exec
79 cmd: npx
80 args: [-y, mcp-wsl-exec]
81 enabled: true
82 type: stdioOk, I’m now set up with the built-in extensions and my own MCP tools!
I’m still exploring Goose’s features and practical use, so, still early days, from what I can glean from interactions is that it’s claude desktop in the terminal 😂
The specific Goose features I’m still trying out, like iterating on something in the terminal and a code editor.
What’s Next? 🚀
Ollama, I’ve downloaded DeepSeek model and tried that out with Goose but it’s not compatible there appears to be people working on deepseek-goose-models so I’ll be taking a look at that at some point.
That’s it! I’mm going to give this a good crack now and try incorporate it into my workflow!
Quick Reference
This is for me when I need to come back to this!!
- Config location:
~/.config/goose/config.yaml - API keys:
~/.goose_keys - Permissions:
- Key files:
chmod 600
- Key files:
List of Goose commands:
1# Session Management
2goose session # Start a new chat session
3goose session -r # Resume the last session
4goose session -n test # Start a new session named "test"
5goose session -r -n test # Resume a specific session named "test"
6
7# Extension Management
8goose session --with-builtin name # Add a builtin extension by name
9goose session --with-extension 'cmd' # Add a custom extension using command
10
11# Configuration
12goose configure # Configure Goose settings
13
14# Other Commands
15goose agents # List available agent versions
16goose run # Execute commands from instruction file/stdin
17goose help # Show help message
18goose help <command> # Show help for specific command
19
20# Version
21goose -v # Show version informationThis reference covers the main commands available in Goose. Each
command also has additional options that can be viewed using goose <command> --help for more detailed information.
That’s it! Hope this helps if you’re setting up Goose on WSL!
There's a reactions leaderboard you can check out too.
Sign up for the newsletter
Want to keep up to date with what I'm working on?
Join other developers and sign up for the newsletter.
I care about the protection of your data. Read the Privacy Policy for more info.