home / skills / openclaw / skills / bookstack

bookstack skill

/skills/xenofex7/bookstack

This skill helps you manage a BookStack knowledge base via its API, including books, chapters, pages, and shelves, for automation.

npx playbooks add skill openclaw/skills --skill bookstack

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
4.1 KB
---
name: bookstack
description: "BookStack Wiki & Documentation API integration. Manage your knowledge base programmatically: create, read, update, and delete books, chapters, pages, and shelves. Full-text search across all content. Use when you need to: (1) Create or edit wiki pages and documentation, (2) Organize content in books and chapters, (3) Search your knowledge base, (4) Automate documentation workflows, (5) Sync content between systems. Supports both HTML and Markdown content."
metadata:
  openclaw:
    requires:
      env:
        - BOOKSTACK_URL
        - BOOKSTACK_TOKEN_ID
        - BOOKSTACK_TOKEN_SECRET
---

# BookStack Skill

**BookStack** is an open-source wiki and documentation platform. This skill lets you manage your entire knowledge base via API – perfect for automation and integration.

## Features

- šŸ“š **Books** – create, edit, delete
- šŸ“‘ **Chapters** – organize content within books
- šŸ“„ **Pages** – create/edit with HTML or Markdown
- šŸ” **Full-text search** – search across all content
- šŸ“ **Shelves** – organize books into collections

## Quick Start

```bash
# List all books
python3 scripts/bookstack.py list_books

# Search the knowledge base
python3 scripts/bookstack.py search "Home Assistant"

# Get a page
python3 scripts/bookstack.py get_page 123

# Create a new page (Markdown)
python3 scripts/bookstack.py create_page --book-id 1 --name "My Page" --markdown "# Title\n\nContent here..."
```

## All Commands

### Books
```bash
python3 scripts/bookstack.py list_books                    # List all books
python3 scripts/bookstack.py get_book <id>                 # Book details
python3 scripts/bookstack.py create_book "Name" ["Desc"]   # New book
python3 scripts/bookstack.py update_book <id> [--name] [--description]
python3 scripts/bookstack.py delete_book <id>
```

### Chapters
```bash
python3 scripts/bookstack.py list_chapters                 # List all chapters
python3 scripts/bookstack.py get_chapter <id>              # Chapter details
python3 scripts/bookstack.py create_chapter --book-id <id> --name "Name"
python3 scripts/bookstack.py update_chapter <id> [--name] [--description]
python3 scripts/bookstack.py delete_chapter <id>
```

### Pages
```bash
python3 scripts/bookstack.py list_pages                    # List all pages
python3 scripts/bookstack.py get_page <id>                 # Page preview
python3 scripts/bookstack.py get_page <id> --content       # With HTML content
python3 scripts/bookstack.py get_page <id> --markdown      # As Markdown

# Create page (in book or chapter)
python3 scripts/bookstack.py create_page --book-id <id> --name "Name" --markdown "# Content"
python3 scripts/bookstack.py create_page --chapter-id <id> --name "Name" --html "<p>HTML</p>"

# Edit page
python3 scripts/bookstack.py update_page <id> [--name] [--content] [--markdown]
python3 scripts/bookstack.py delete_page <id>
```

### Search
```bash
python3 scripts/bookstack.py search "query"                # Search everything
python3 scripts/bookstack.py search "query" --type page    # Pages only
python3 scripts/bookstack.py search "query" --type book    # Books only
```

### Shelves
```bash
python3 scripts/bookstack.py list_shelves                  # List all shelves
python3 scripts/bookstack.py get_shelf <id>                # Shelf details
python3 scripts/bookstack.py create_shelf "Name" ["Desc"]  # New shelf
```

## Configuration

Set the following environment variables:

```bash
export BOOKSTACK_URL="https://your-bookstack.example.com"
export BOOKSTACK_TOKEN_ID="your-token-id"
export BOOKSTACK_TOKEN_SECRET="your-token-secret"
```

Or configure via your gateway config file under `skills.entries.bookstack.env`.

### Create an API Token

1. Log in to your BookStack instance
2. Go to **Edit Profile** → **API Tokens**
3. Click **Create Token**
4. Copy the Token ID and Secret

āš ļø The user needs a role with **"Access System API"** permission!

## API Reference

- **Base URL**: `{BOOKSTACK_URL}/api`
- **Auth Header**: `Authorization: Token {ID}:{SECRET}`
- **Official Docs**: https://demo.bookstackapp.com/api/docs

---

**Author**: xenofex7 | **Version**: 1.0.2

Overview

This skill provides a programmatic integration with BookStack, the open-source wiki and documentation platform. It enables creating, reading, updating, and deleting books, chapters, pages, and shelves, plus full-text search across your knowledge base. Use it to automate documentation workflows, synchronize content between systems, or embed wiki management into scripts and CI pipelines.

How this skill works

The skill talks to the BookStack API using token-based authentication (Token ID and Secret). It exposes commands to list and manage books, chapters, pages (HTML or Markdown), and shelves, and performs full-text search across selected content types. Environment variables or gateway config supply the BookStack URL and API credentials for authenticated requests.

When to use it

  • Automate creation or updates of documentation from CI/CD pipelines.
  • Programmatically import or export content between systems or backups.
  • Organize or restructure content into books, chapters, and shelves at scale.
  • Provide searchable documentation endpoints for internal tools or bots.
  • Generate or update pages from templates in HTML or Markdown.

Best practices

  • Store BOOKSTACK_TOKEN_ID and BOOKSTACK_TOKEN_SECRET securely as environment variables or in a secrets manager.
  • Use Markdown for editable content and HTML when fine-grained formatting is required.
  • Test changes in a staging BookStack instance before applying bulk updates to production.
  • Respect API rate limits and batch updates where possible to avoid overloading the server.
  • Assign the API token to a user with only the necessary role (Access System API) to follow the principle of least privilege.

Example use cases

  • CI job creates release notes page in the documentation automatically when a new release is published.
  • Migrate legacy docs by scripting imports into books and chapters with Markdown conversion.
  • Build a chatops command that searches BookStack and returns page links to team members.
  • Periodic backup script that lists and exports all pages and books to a storage bucket.
  • Automated content sync that updates product docs from a CMS into BookStack pages.

FAQ

What credentials are required to use this skill?

You need BOOKSTACK_URL plus an API Token ID and Secret. The token must belong to a user with the Access System API permission.

Can I create pages in Markdown and HTML?

Yes. The skill supports creating and updating pages using either Markdown or HTML content formats.

How do I search only pages or only books?

The search command accepts a type parameter (e.g., --type page or --type book) to restrict results to a specific content type.