# OpenClaw ATF Plugin — Config Examples

Canonical config examples for the TruCore ATF OpenClaw plugin.

All examples use the canonical plugin ID: `trucore-atf`.

---

## Minimal Enable (recommended starting point)

**File:** [minimal-enable.json](minimal-enable.json)

```json
{
  "plugins": {
    "trucore-atf": {}
  }
}
```

Zero config keys needed. The plugin uses safe defaults:
- `prefer: "cli"` — uses ATF CLI subprocess
- `safety.allowExecuteSafe: true`
- `safety.allowNetwork: false`

This is the **fastest path** to enable ATF in OpenClaw.

---

## Prefer CLI (explicit)

**File:** [prefer-cli.json](prefer-cli.json)

```json
{
  "plugins": {
    "trucore-atf": {
      "prefer": "cli"
    }
  }
}
```

Same as minimal enable, but explicitly declares CLI preference.
Best for: local dev, offline environments, ATF CLI installed locally.

---

## Prefer API

**File:** [prefer-api.json](prefer-api.json)

```json
{
  "plugins": {
    "trucore-atf": {
      "prefer": "api",
      "atfBaseUrl": "https://api.trucore.xyz"
    }
  }
}
```

Routes tool calls through the ATF HTTP API.
Best for: hosted environments, shared infra, centrally deployed ATF API.

**Note:** `atfBaseUrl` is required when `prefer` is `"api"`.

---

## Full Config

**File:** [full-config.json](full-config.json)

```json
{
  "plugins": {
    "trucore-atf": {
      "prefer": "cli",
      "receiptsDir": "./atf_receipts",
      "safety": {
        "allowExecuteSafe": true,
        "allowNetwork": false
      }
    }
  }
}
```

Shows all commonly used keys. Only set keys you want to change from defaults.

---

## Disable Plugin

**File:** [disable-plugin.json](disable-plugin.json)

```json
{
  "plugins": {}
}
```

Remove the `"trucore-atf"` key from `plugins` and restart the gateway.
This has zero effect on ATF CLI or API operations.

---

## Config Reference

| Key | Type | Default | Description |
|---|---|---|---|
| `atfCli` | string | `"atf"` | CLI command name or absolute path |
| `atfBaseUrl` | string | — | ATF HTTP API URL (required for `prefer: "api"`) |
| `prefer` | `"cli"` \| `"api"` | `"cli"` | Backend preference |
| `receiptsDir` | string | — | Receipt storage directory |
| `safety.allowExecuteSafe` | boolean | `true` | Allow bootstrap execute-safe |
| `safety.allowNetwork` | boolean | `false` | Allow live manifest fetch |

No other keys are accepted (`additionalProperties: false`).

---

## Verify After Enabling

```bash
# Restart the gateway
openclaw gateway restart

# Run integration doctor
openclaw tool call atf_integration_doctor

# Expected: status = "ok", all 13 tools available
```
