> ## Documentation Index
> Fetch the complete documentation index at: https://docs.microsandbox.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Goose

> Run the native Goose coding agent against a project on your host

Goose publishes native Linux binaries for both `aarch64` and `x86_64`. Its installer detects the guest architecture, which makes it a relatively small agent setup compared with a large Python environment.

## Run Goose

**1. Start Goose**

Local-only (Writable host-directory mounts are local-only. On microsandbox cloud, use the isolated-copy alternative and omit replace-on-create.)

```sh macOS & Linux theme={null}
msb run -t --name goose-demo --replace \
  --cpus 2 --memory 2G --root-disk 3G \
  --mount-dir ./my-project:/workspace:rw \
  --workdir /workspace \
  debian:bookworm-slim -- sh -lc '
    apt-get update &&
    apt-get install -y --no-install-recommends ca-certificates curl bzip2 git &&
    curl -fsSL https://github.com/aaif-goose/goose/releases/download/v1.44.0/download_cli.sh |
      GOOSE_BIN_DIR=/usr/local/bin GOOSE_VERSION=v1.44.0 CONFIGURE=false bash &&
    exec goose session
  '
```

```powershell Windows theme={null}
msb run -t --name goose-demo --replace `
  --cpus 2 --memory 2G --root-disk 3G `
  --mount-dir ./my-project:/workspace:rw `
  --workdir /workspace `
  debian:bookworm-slim -- sh -lc '
    apt-get update &&
    apt-get install -y --no-install-recommends ca-certificates curl bzip2 git &&
    curl -fsSL https://github.com/aaif-goose/goose/releases/download/v1.44.0/download_cli.sh |
      GOOSE_BIN_DIR=/usr/local/bin GOOSE_VERSION=v1.44.0 CONFIGURE=false bash &&
    exec goose session
  '
```

On first launch Goose asks whether to share anonymous usage data, then walks through provider configuration. `GOOSE_BIN_DIR` installs the executable on the sandbox's normal `PATH`, including later `msb exec` sessions. Goose keeps its configuration, data, and session state on the sandbox's 3 GiB root disk.

> [!TIP]
>
> For an isolated workspace, or when using microsandbox cloud, replace `--mount-dir ./my-project:/workspace:rw` with `--copy-dir ./my-project:/workspace`. To test Goose without a project, use `--mkdir /workspace` instead.

**2. Start another session**

After leaving Goose, return to the same sandbox and workspace with:

```sh Shell theme={null}
msb exec -t goose-demo -- goose session
```

**3. Verify the installation**

Exit the session and run:

```sh Shell theme={null}
msb exec goose-demo -- goose --version
```

The pinned installer reports `1.44.0`.

**4. Review or export changes**

With the default writable mount, changes are already in the host checkout. Review them inside the sandbox:

```sh Shell theme={null}
msb exec goose-demo -- sh -lc 'cd /workspace && git status --short && git diff --stat && git diff'
```

If you chose the isolated `--copy-dir` alternative, create a patch inside the sandbox:

```sh Shell theme={null}
msb exec goose-demo -- sh -lc 'cd /workspace && git add -N . && git diff --binary > /tmp/goose.patch'
```

Copy the patch to the host:

```sh Shell theme={null}
msb cp goose-demo:/tmp/goose.patch ./goose.patch
```

Check that it applies cleanly before applying it:

```sh Shell theme={null}
git apply --check ./goose.patch
```

**5. Clean up**

Remove the sandbox:

```sh Shell theme={null}
msb rm -f goose-demo
```

Removing the sandbox also removes its Goose configuration and session data. Changes made through the default workspace mount remain in the host checkout.

## Reference

* [Goose repository and installer](https://github.com/aaif-goose/goose)
* [Goose environment variables](https://github.com/aaif-goose/goose/blob/main/documentation/docs/guides/environment-variables.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.