# Remixing

Source: https://crabtalk.ai/docs/guides/remix

> Run another account's service as your own, with its code and your own README, settings and tool text, from the browser, an agent or a folder.

A remix runs another account's service code under your account, with its own README, var values, storage size, schedules and tool text. Its secrets, storage and bill are its own, and it reaches none of the publisher's data.

## Making one

```sh
crab remix crabtalk/docs
cd docs
crab remix
```

`crab remix owner/name [dir]` writes a folder, `./name` by default: `crab.remix.toml`, the publisher's `README.md` and its `skills/`. It refuses a directory that is not empty, and `--var NAME=VALUE` fills a var as it writes. Edit both, then run `crab remix` in the folder.

`crab remix` with no image deploys the folder. It sends only what differs from the image, and refuses while a required var is empty. A CLI session prints an approval link and waits; an API key with `deployments:write` deploys directly with `--yes`. It works on the local host and on Cloud.

Its author must set `[image] public = true` and `remix = true` and keep it deployed for another account to remix it. Its page at `/OWNER/NAME` shows its README and tools.

## In the browser

The Remix button on its page at `/OWNER/NAME` shows a prompt to hand your agent and the `crab.remix.toml` your remix starts from. Its Edit it here link, like a link to `https://crabtalk.ai/remix?image=OWNER/NAME` in any page or README, opens the remix's draft as steps: name, vars and storage, README, tool text, skills, then approve. Each step starts from the publisher's version and may be left as it is; nothing deploys until you approve.

## Through MCP

An agent connected to [CrabTalk's MCP](/docs/guides/mcp) calls `remix` with `{image, service}` and any of `vars`, `text`, `schedules`, `public` and `size`. It returns the draft's `url`, for the person to review and approve, and its `code`. Calling `remix` with `{code, service, …}` replaces everything that draft holds, while it waits. `text` takes `readme`, `tools` by name with `title`, `description` and `prompts`, and `skills` by name, each its files' text by path.

## crab.remix.toml

```toml
[remix]
base = "crabtalk/docs:0.1.12"
name = "acme/docs"
public = true

[vars]
site = "https://acme.com/docs/"

[storage]
size = "512MiB"

[schedules]
crawl = "0 */6 * * *"

[tools.search]
prompts = ["How do I rotate an API key?"]
```

| Key | Sets |
|---|---|
| `[remix] base` | The image it runs, `owner/name:version`. |
| `[remix] name` | The remix, `owner/name` on Cloud or `name` on the local host. |
| `[remix] public` | Its visibility. |
| `[vars]` | Each var's value. A var the image leaves empty is required. |
| `[storage] size` | Bytes its database may hold. |
| `[schedules]` | A cron expression for a cron tool of the image. |
| `[tools.<name>]` | A tool's `title`, `description` and `prompts`. |

- `crab remix owner/name` writes the image's settings and tool text commented out; uncomment one to change it.
- A key left out keeps the image's. Text left out takes the publisher's new text when `base` moves to a newer version.
- A tool table naming a tool the image lacks is refused.
- A skill in `skills/` whose files differ from the image's replaces it whole; a new one is added. A remix's own skill files are text, 1 MiB at most together.
- The image's code stays the publisher's: tool names and schemas, access, prices, budgets, migrations and `[http]`. Secrets are set on the deployment; see [Secrets](/docs/guides/secrets).

## Upgrading

Set `base` to a newer version and run `crab remix`. A version that breaks a caller's recent calls is refused, as for any deploy.
