---
sidebar:
  order: 2
title: Configuration
---

Wall-E is configured through environment variables (`.env` file) and a JSON config file.

## Environment Variables

Copy `.env.example` to `.env` at the project root:

```bash
cp .env.example .env
```

### API Authentication

Wall-E needs access to the Claude API. Three options:

**Option A: Direct Anthropic API key**

The simplest setup — get a key from [console.anthropic.com](https://console.anthropic.com/settings/keys):

```env
ANTHROPIC_API_KEY=sk-ant-...
```

**Option B: Portkey / API gateway**

For teams using [Portkey](https://portkey.ai) or a corporate API gateway:

```env
ANTHROPIC_BASE_URL=https://your-gateway.example.com/v1
ANTHROPIC_AUTH_TOKEN=your-portkey-api-key
ANTHROPIC_CUSTOM_HEADERS_B64=<base64-encoded custom headers>
```

The custom headers carry your Portkey virtual key, provider config, and metadata. Encode them as base64:

```bash
echo -n 'x-portkey-api-key: YOUR_KEY
x-portkey-provider: anthropic
x-portkey-virtual-key: YOUR_VIRTUAL_KEY' | base64
```

**Option C: Corporate devbox (auto-detected)**

If your company manages Claude Code via devbox (`devbox ai -c claude`), Wall-E auto-reads the gateway credentials from `~/.devbox/secrets/claude/auth_headers` on startup. No configuration needed.

### Core Settings

| Variable | Required | Default | Description |
|---|---|---|---|
| `ANTHROPIC_API_KEY` | Yes* | — | Anthropic API key or Portkey key |
| `ANTHROPIC_BASE_URL` | No | — | API gateway URL (Portkey, corporate proxies) |
| `ANTHROPIC_AUTH_TOKEN` | No | — | Auth token when using a gateway |
| `ANTHROPIC_CUSTOM_HEADERS_B64` | No | — | Base64-encoded custom headers (Portkey virtual keys) |
| `WALLE_OWNER_NAME` | Auto | from `git config` | Your full name |

*Not required if using a gateway or devbox auto-detection.

### Server

| Variable | Default | Description |
|---|---|---|
| `CTM_PORT` | `3456` | Dashboard port |
| `WALL_E_PORT` | `CTM_PORT + 1` | Wall-E API port |
| `CTM_HOST` | `127.0.0.1` | Bind address |

### Data Storage

| Variable | Default | Description |
|---|---|---|
| `WALL_E_DATA_DIR` | `~/.walle/data` | Wall-E's brain database and backups |
| `CTM_DATA_DIR` | `~/.walle/data` | CTM's database, images, and backups |

### Slack Integration {#slack}

| Variable | Description |
|---|---|
| `SLACK_TOKEN` | Slack user or bot token (set via OAuth in the setup page) |
| `SLACK_OWNER_USER_ID` | Your Slack user ID (e.g., `U0XXXXXXXX`) — for message direction detection |
| `SLACK_OWNER_HANDLE` | Your Slack handle (e.g., `your.name`) — for search queries |

## Wall-E Config File

`wall-e/wall-e-config.json` controls the daemon behavior:

```json
{
  "owner": {
    "name": "Your Name",
    "first_name": "Your",
    "last_name": "Name",
    "timezone": "America/Los_Angeles"
  },
  "adapters": {
    "ctm": { "enabled": true },
    "slack": { "enabled": false }
  },
  "intervals": {
    "ingest": 60000,
    "think": 120000,
    "reflect": 3600000,
    "skills": 300000
  }
}
```

## Calendar Sync {#calendar}

Calendar sync uses macOS EventKit (the same framework as the Calendar app). It reads all calendars synced to your Mac — Google Calendar, iCloud, Outlook, etc.

**Setup:**

1. The first time the calendar skill runs, macOS will prompt for Calendar access
2. Grant access to your terminal app in **System Settings > Privacy & Security > Calendars**
3. Events are synced every 30 minutes automatically

No additional configuration needed — it reads whatever calendars are visible in the macOS Calendar app.

## Email Sync

Email sync reads sent messages from macOS Mail using JXA (JavaScript for Automation).

**Setup:**

1. Ensure the macOS Mail app is configured with your email accounts
2. Grant Accessibility access to your terminal if prompted
3. Sent emails are synced every 30 minutes automatically
