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

# resources

> Manage platform resources as version-controlled MDX files

`2501 resources` syncs a directory of MDX files with your platform. Each kind has its own subdirectory; each file declares one resource with YAML frontmatter (and a body where the kind has long-form text).

For the full reference, examples, and the resource file format, see [Configuration as Code](/0.8/configure/configuration-as-code).

## `2501 resources pull`

Export the platform's current state into a local directory.

```bash theme={null}
2501 resources pull -d ./config
```

`pull` is a true mirror: existing `.mdx` files in each kind folder are removed before writing, so deletes on the platform also disappear from your repo. Commit the result for an exact snapshot.

Credential **secret values are never exported** — only the metadata.

## `2501 resources sync`

Apply the directory back to the platform.

```bash theme={null}
2501 resources sync -d ./config
```

`sync` prints a plan (create / update / delete / unchanged) and applies in dependency-safe order. Stops on the first failure; resources already applied stay applied — re-run to continue.

### Deletes are opt-in

By default, resources on the platform that aren't in your directory are **reported, not deleted**. To prune them, pass `--prune`:

```bash theme={null}
2501 resources sync -d ./config --prune
```

A prune that would orphan dependents (a host with active tasks, a specialty referenced by agents) is flagged **BLOCKED** and skipped. To override, add `--force`:

```bash theme={null}
2501 resources sync -d ./config --prune --force
```

<Warning>
  `--prune --force` removes resources even when they have dependents. Review the printed plan carefully before approving.
</Warning>

### CI usage

```bash theme={null}
2501 resources sync -d ./config --dry-run    # print plan, don't apply
2501 resources sync -d ./config --auto-approve  # skip the y/N prompt
```

## Scope to one organization

```bash theme={null}
2501 resources pull -d ./config --org platform-team
2501 resources sync -d ./config --org platform-team
```

Always pair `pull --org` with `sync --org` so the two operations cover the same scope.

## Supported kinds

| Kind              | Subdirectory         | Body                     |
| ----------------- | -------------------- | ------------------------ |
| Agents            | `agents/`            | —                        |
| Hosts             | `hosts/`             | Host knowledge           |
| Specialties       | `specialties/`       | Specialty prompt         |
| Operational Rules | `operational_rules/` | Rule text                |
| Credentials       | `credentials/`       | — (secrets via `${ENV}`) |
| Gateways          | `gateways/`          | Inbound prompt           |
| Blacklist         | `blacklist/`         | —                        |
