> ## Documentation Index
> Fetch the complete documentation index at: https://microsanbox-staging-toks-cloud-snapshot-contracts.mintlify.site/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

<Steps>
  <Step title="Start Goose">
    <Tooltip tip="Writable host-directory mounts are local-only. On microsandbox cloud, use the isolated-copy alternative and omit replace-on-create."><span className="msb-badge-local">Local-only <Icon icon="circle-info" size={11} /></span></Tooltip>

    <CodeGroup>
      ```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
        '
      ```
    </CodeGroup>

    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.
    </Tip>
  </Step>

  <Step title="Start another session">
    After leaving Goose, return to the same sandbox and workspace with:

    ```sh theme={null}
    msb exec -t goose-demo -- goose session
    ```
  </Step>

  <Step title="Verify the installation">
    Exit the session and run:

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

    The pinned installer reports `1.44.0`.
  </Step>

  <Step title="Review or export changes">
    With the default writable mount, changes are already in the host checkout. Review them inside the sandbox:

    ```sh 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 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 theme={null}
    msb cp goose-demo:/tmp/goose.patch ./goose.patch
    ```

    Check that it applies cleanly before applying it:

    ```sh theme={null}
    git apply --check ./goose.patch
    ```
  </Step>

  <Step title="Clean up">
    Remove the sandbox:

    ```sh 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.
  </Step>
</Steps>

## 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)
