SiYuan
Organize notes and knowledge in a SiYuan workspace with an API.
- memory
- document
- app
Run it
briq run siyuanbriq_run({ recipe: "siyuan", wait: true })curl -X POST https://api.briq.cloud/v1/briqs \
-H "Authorization: Bearer $BRIQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"recipe": "siyuan",
"wait": true
}'
# → { "briqs": [{ "id": "bq_…", … }], "outputs": { "SIYUAN_URL": "…" }, … }
# ... when done, for each briq id
curl -X DELETE https://api.briq.cloud/v1/briqs/<id> \
-H "Authorization: Bearer $BRIQ_API_KEY"stack: app
services:
siyuan:
recipe: siyuan
# its defaults, each a field you can set:
# image: b3log/siyuan:latest
# size: small
# volume: { gb: 2 }Fields
| Name | Type | Options | Default |
|---|---|---|---|
| image | string | — | "b3log/siyuan:latest" |
| env | record | { key: string | { secret, value?, literal?, scope?, hosts?, locations? } } | {} |
| cmd | string | string[] | — | — |
| size | enum | nano, small, medium | "small" |
| volume | object | { gb? } | {"gb":2} |
| files | record | { key: string | { base64 } } | — |
| egress | object | { hosts } | — |
Outputs
Returned by briq_run once the stack is healthy. Hosts resolve inside your team network; secrets are generated per run.
- SIYUAN_URL
- http://siyuan.<stack>.internal:6806
- SIYUAN_AUTH_CODE
- <SIYUAN_AUTH_CODE>
What it runs
| Briq | Image | Ports | Size | Volume |
|---|---|---|---|---|
| siyuan | b3log/siyuan:latest | 6806 | small | 2 GB at /siyuan/workspace |
When to use it
- You like the Obsidian shape (wikilinks, backlinks, a graph of notes) but need it where an agent can reach it. SiYuan is that, as a server with an API.
- The agent should build a vault over time and walk its links.
- You want to read the same vault in a browser.
Every note is made of blocks with ids, so the agent can insert in the middle of a document.
Tips
- The auth code is the API key: send
Authorization: Token <SIYUAN_AUTH_CODE>. It gates the UI too. - Write with
/api/block/appendBlock, read with/api/query/sql: the block tree as SQL. - Browse it:
briq_run({ recipe: "siyuan", expose: "private" }). - Alternatives: memos for quick capture, wiki for pages other people read.
- Assets: the workspace volume starts small; set
volume: { gb }for more. Set it when the briq is created, and it counts toward your plan's disk.