Goose is Open Source!
We welcome Pull Requests for general contributions! If you have a larger new feature or any questions on how to develop a fix, we recommend you open an issue before starting.
Goose includes rust binaries alongside an electron app for the GUI. To work on the rust backend, you will need to install rust and cargo. To work on the App, you will also need to install node and npm - we recommend through nvm.
We provide a shortcut to standard commands using just in our justfile
.
First let's compile goose and try it out
cargo build
when that is done, you should now have debug builds of the binaries like the goose cli:
./target/debug/goose --help
If you haven't used the CLI before, you can use this compiled version to do first time configuration:
./target/debug/goose configure
And then once you have a connection to an LLM provider working, you can run a session!
./target/debug/goose session
These same commands can be recompiled and immediately run using cargo run -p goose-cli
for iteration.
As you make changes to the rust code, you can try it out on the CLI, or also run checks and tests:
cargo check # do your changes compile
cargo test # do the tests pass with your changes.
Now let's make sure you can run the app.
just run-ui
The start gui will both build a release build of rust (as if you had done cargo build -r
) and start the electron process.
You should see the app open a window, and drop you into first time setup. When you've gone through the setup,
you can talk to goose!
You can now make changes in the code in ui/desktop to iterate on the GUI half of goose.
To ensure a smooth integration of your contributions, it's important that your fork is kept up-to-date with the main repository. This helps avoid conflicts and allows us to merge your pull requests more quickly. Here’s how you can sync your fork:
-
Add the Main Repository as a Remote (Skip if you have already set this up):
git remote add upstream https://github.com/block/goose.git
-
Fetch the Latest Changes from the Main Repository:
git fetch upstream
-
Checkout Your Development Branch:
git checkout your-branch-name
-
Merge Changes from the Main Branch into Your Branch:
git merge upstream/main
Resolve any conflicts that arise and commit the changes.
-
Push the Merged Changes to Your Fork:
git push origin your-branch-name
This process will help you keep your branch aligned with the ongoing changes in the main repository, minimizing integration issues when it comes time to merge!
Before you submit a pull request, please ensure your fork is synchronized as described above. This check ensures your changes are compatible with the latest in the main repository and streamlines the review process.
If you encounter any issues during this process or have any questions, please reach out by opening an issue here, and we'll be happy to help.
You may want to make more frequent changes to your provider setup or similar to test things out as a developer. You can use environment variables to change things on the fly without redoing your configuration.
Tip
At the moment, we are still updating some of the CLI configuration to make sure this is respected.
You can change the provider goose points to via the GOOSE_PROVIDER
env var. If you already
have a credential for that provider in your keychain from previously setting up, it should
reuse it. For things like automations or to test without doing official setup, you can also
set the relevant env vars for that provider. For example ANTHROPIC_API_KEY
, OPENAI_API_KEY
,
or DATABRICKS_HOST
. Refer to the provider details for more info on required keys.
Enable traces in Goose with locally hosted Langfuse
- Run
just langfuse-server
to start your local Langfuse server. It requires Docker. - Go to http://localhost:3000 and log in with the default email/password output by the shell script (values can also be found in the
.env.langfuse.local
file). - Set the environment variables so that rust can connect to the langfuse server
export LANGFUSE_INIT_PROJECT_PUBLIC_KEY=publickey-local
export LANGFUSE_INIT_PROJECT_SECRET_KEY=secretkey-local
Then you can view your traces at http://localhost:3000
This project follows the Conventional Commits specification for PR titles. Conventional Commits make it easier to understand the history of a project and facilitate automation around versioning and changelog generation.