BookStack API
/install bookstack-api
BookStack API Skill
Interact with a BookStack wiki through its REST API using the bundled Python script. No external dependencies beyond Python 3 standard library.
Configuration
Credentials live in ~/.clawdbot/clawdbot.json under the bookstack skill entry:
{
"skills": {
"entries": {
"bookstack": {
"env": {
"BOOKSTACK_URL": "https://your-bookstack.example.com",
"BOOKSTACK_TOKEN_ID": "your-token-id",
"BOOKSTACK_TOKEN_SECRET": "your-token-secret"
}
}
}
}
}
Generate a token from BookStack: Profile > API Tokens > Create Token. The user's role needs the "Access System API" permission enabled.
Usage
All commands follow the pattern:
python3 scripts/bookstack.py \x3Ccommand> [args] [options]
Pass the env vars from the config above when executing.
Quick Reference
| Action | Command |
|---|---|
| Search | search "query" [--type page|book|chapter] |
| List pages | list_pages [--count N] |
| Read page | get_page \x3Cid> [--content|--markdown] |
| Create page | create_page --book-id \x3Cid> --name "Title" --html "\x3Cp>content\x3C/p>" |
| Update page | update_page \x3Cid> --html "\x3Cp>new content\x3C/p>" |
| Delete page | delete_page \x3Cid> |
The same CRUD pattern applies to books, chapters, and shelves. For the full command list with all flags and options, see references/api-commands.md.
Important Notes
- Cloudflare protection: The script sends a
User-Agentheader because BookStack instances behind Cloudflare reject requests without one (HTTP 403). If you get a 403, this is likely why. - Content formats: Pages accept HTML by default. Use
--markdownfor Markdown input. When reading,get_page --contentreturns HTML,--markdownreturns Markdown. - Large HTML updates: For big page updates, prepare the HTML in a temp file and read it into the API call programmatically, rather than passing it inline on the command line.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install bookstack-api - 安装完成后,直接呼叫该 Skill 的名称或使用
/bookstack-api触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
BookStack API 是什么?
BookStack Wiki & Documentation API integration. Manage your knowledge base programmatically: create, read, update, and delete books, chapters, pages, and she... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 293 次。
如何安装 BookStack API?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install bookstack-api」即可一键安装,无需额外配置。
BookStack API 是免费的吗?
是的,BookStack API 完全免费(开源免费),可自由下载、安装和使用。
BookStack API 支持哪些平台?
BookStack API 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 BookStack API?
由 Federico Liva(@f-liva)开发并维护,当前版本 v1.0.2。