# Wiki.js recipe

URL: https://briq.cloud/cookbook/wiki

> A wiki the agent can write pages to and hand you a link into, instead of NOTES.md.

Tags: app, document, stack

## Run it

MCP:

```ts
briq_run({
  recipe: "wiki",
  params: {
    "size": "small",
    "diskGb": 2
  },
  wait: true
})
```

REST:

```bash
curl -X POST https://api.briq.cloud/v1/briqs \
  -H "Authorization: Bearer $BRIQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "recipe": "wiki",
    "params": {
      "size": "small",
      "diskGb": 2
    },
    "wait": true
  }'
# → { "briqs": [{ "id": "bq_…", … }], "outputs": { "WIKI_URL": "…" }, … }

# ... when done, for each briq id
curl -X DELETE https://api.briq.cloud/v1/briqs/<id> \
  -H "Authorization: Bearer $BRIQ_API_KEY"
```

## Parameters

| Name | Type | Options | Default | What it does |
| --- | --- | --- | --- | --- |
| `size` | enum | small, medium | "small" | — |
| `diskGb` | number | — | 2 | Volume size, in GB |

## Outputs

Returned by `briq_run` once the stack is healthy. Hosts resolve inside your team network; secrets are generated per run.

| Output | Value |
| --- | --- |
| `WIKI_URL` | `http://wiki.<stack>.internal:3000` |

## What it runs

| Briq | Image | Ports | Size | Volume |
| --- | --- | --- | --- | --- |
| postgres | `postgres:16` | 5432 | nano | 2 GB at /var/lib/postgresql/data |
| wiki | `requarks/wiki:2` | 3000 | small | — |

## When to use it

* Your repo has grown NOTES.md and one-off write-ups that nobody opens.
* The agent should write up an incident, a decision or a runbook as a page with a URL.
* You want to send a link to a page with search and history, not a markdown diff.

Two briqs: `wiki` serves it, `postgres` stores it.

## Tips

* **Expose only `wiki`**: `briq_run({ recipe: "wiki", expose: "private" })`.
* **Create the admin account** in the UI on the first visit, then an API token in the admin area.
* **The agent writes pages** through the GraphQL API with that token.
* **Content survives stops**, so keep the briqs between sessions.
* **Many pages and uploads**: the database volume starts small; pass `diskGb` for more. Set it when
  the briq is created, and it counts toward your [plan's disk](https://briq.cloud/docs/cost#plans).
