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

# Goose Integration Guide

> Configure Goose CLI from Block with Infercom's EU sovereign inference. Autonomous AI coding agent with custom provider setup for GDPR-compliant development.

[Goose](https://github.com/block/goose) is an open-source AI coding assistant from Block (Square). It runs in your terminal and can autonomously write code, run commands, and manage files.

<Info>
  **Setup time:** \~5 minutes
</Info>

## Prerequisites

* macOS with Homebrew, or Linux
* [Infercom API key](https://cloud.infercom.ai/apis)

## Installation

```bash theme={null}
brew install block-goose-cli
```

Verify installation:

```bash theme={null}
goose --version
```

## Configuration

### Option 1: Custom Provider (Recommended)

Create a custom provider file for Infercom.

#### Step 1: Create Provider Directory

```bash theme={null}
mkdir -p ~/.config/goose/custom_providers
```

#### Step 2: Create Provider File

Create `~/.config/goose/custom_providers/infercom.json`:

```json theme={null}
{
  "id": "infercom",
  "name": "Infercom (EU Sovereign)",
  "description": "EU sovereign AI inference",
  "api_format": "openai",
  "base_url": "https://api.infercom.ai/v1",
  "env_api_key": "INFERCOM_API_KEY",
  "default_model": "MiniMax-M2.7",
  "models": [
    {
      "id": "MiniMax-M2.7",
      "display_name": "MiniMax M2.5 (EU)",
      "context_window": 192000,
      "supports_tool_calling": true
    }
  ]
}
```

#### Step 3: Set API Key

```bash theme={null}
export INFERCOM_API_KEY="your-infercom-api-key"
```

Add to your shell profile (`~/.bashrc`, `~/.zshrc`) for persistence.

#### Step 4: Configure Goose

```bash theme={null}
goose configure
```

Select **Configure Providers** and choose **Infercom**.

### Option 2: OpenAI Compatible

Use the built-in OpenAI provider with custom endpoint:

```bash theme={null}
export OPENAI_API_KEY="your-infercom-api-key"
export OPENAI_HOST="https://api.infercom.ai/v1"
```

Then run `goose configure` and select OpenAI.

## Model

Use `MiniMax-M2.7` - optimized for agentic coding with 192K context and tool calling support.

<Warning>
  Goose relies heavily on tool calling. MiniMax-M2.7 fully supports this.
</Warning>

## Usage

### Interactive Session

```bash theme={null}
goose session
```

Then chat with Goose:

```
> Add input validation to the signup form
```

### Non-Interactive

```bash theme={null}
goose run --text "Write a Python function to parse CSV files"
```

### Useful Commands

| Command                  | Description                    |
| ------------------------ | ------------------------------ |
| `goose configure`        | Configure providers and models |
| `goose session`          | Start interactive session      |
| `goose run --text "..."` | Non-interactive execution      |
| `goose info`             | Show configuration paths       |

## Configuration Paths

| Item             | Path                                |
| ---------------- | ----------------------------------- |
| Config file      | `~/.config/goose/config.yaml`       |
| Custom providers | `~/.config/goose/custom_providers/` |
| Sessions         | `~/.local/share/goose/sessions/`    |
| Logs             | `~/.local/state/goose/logs/`        |

## Troubleshooting

### Provider Not Showing

1. Verify the JSON file is valid:
   ```bash theme={null}
   cat ~/.config/goose/custom_providers/infercom.json | python3 -m json.tool
   ```
2. Check the file location is correct
3. Re-run `goose configure`

### Authentication Failed

Verify your API key is set:

```bash theme={null}
echo $INFERCOM_API_KEY
```

Test the connection:

```bash theme={null}
curl -s https://api.infercom.ai/v1/models \
  -H "Authorization: Bearer $INFERCOM_API_KEY"
```

### Tool Calling Errors

MiniMax-M2.7 supports tool calling. If you see errors:

1. Ensure you're using `MiniMax-M2.7` (not other models)
2. Check the model configuration includes `"supports_tool_calling": true`

## Next Steps

* [Aider](/en/agentic-coding/aider) - Simpler terminal tool
* [OpenCode](/en/agentic-coding/opencode) - Terminal TUI alternative
* [Choosing a Tool](/en/agentic-coding/choosing-a-tool) - Compare all options
