Wiki.js CLI
by @hopyky
Command-line tool to manage Wiki.js content, pages, assets, templates, and backups via its GraphQL API with search, update, sync, and analysis functions.
clawhub install wikijsπ About This Skill
Wiki.js Skill v1.4
A complete CLI for managing Wiki.js via the GraphQL API.
Quick Start
# Install
npm install && npm linkConfigure
cp config/wikijs.example.json ~/.config/wikijs.json
Edit with your Wiki.js URL and API token
Test connection
wikijs health
Commands Reference
Reading
| Command | Description |
|---------|-------------|
| wikijs list | List all pages |
| wikijs search "query" | Search pages |
| wikijs get | Read a page |
| wikijs info | Show page metadata |
| wikijs grep "pattern" | Search within content |
| wikijs tree | Display page hierarchy |
Writing
| Command | Description |
|---------|-------------|
| wikijs create | Create a page |
| wikijs create ... --template doc | Create from template |
| wikijs update | Update a page |
| wikijs move | Move a page |
| wikijs delete | Delete a page |
Tags
| Command | Description |
|---------|-------------|
| wikijs tags | List all tags |
| wikijs tag | Add a tag |
| wikijs tag | Remove a tag |
Backup & Restore
| Command | Description |
|---------|-------------|
| wikijs backup | Create backup |
| wikijs restore-backup | Restore from backup |
| wikijs export | Export to files |
Versions
| Command | Description |
|---------|-------------|
| wikijs versions | Show history |
| wikijs revert | Restore version |
| wikijs diff | Compare versions |
Assets
| Command | Description |
|---------|-------------|
| wikijs images | List assets |
| wikijs upload | Upload asset |
| wikijs delete-image | Delete asset |
Bulk Operations
| Command | Description |
|---------|-------------|
| wikijs bulk-create | Create from files |
| wikijs bulk-update | Update from files |
| wikijs sync | Sync to local |
| wikijs sync --watch | Watch mode |
Analysis
| Command | Description |
|---------|-------------|
| wikijs tree | Page hierarchy tree |
| wikijs check-links | Find broken links |
| wikijs stats | Show statistics |
| wikijs lint | Lint markdown file |
| wikijs lint --id | Lint wiki page |
| wikijs orphans | Find pages with no incoming links |
| wikijs duplicates | Find similar/duplicate content |
| wikijs toc | Generate table of contents |
| wikijs validate | Validate page content |
| wikijs validate --all | Validate all pages |
| wikijs spellcheck | Check spelling |
Content Operations
| Command | Description |
|---------|-------------|
| wikijs clone | Duplicate a page |
| wikijs replace "old" "new" | Search/replace across pages |
| wikijs sitemap | Generate XML sitemap |
Interactive
| Command | Description |
|---------|-------------|
| wikijs shell | Interactive shell mode |
| wikijs watch | Watch page for changes |
Templates
| Command | Description |
|---------|-------------|
| wikijs template list | List templates |
| wikijs template show | Show template |
| wikijs template create | Create template |
| wikijs template delete | Delete template |
System
| Command | Description |
|---------|-------------|
| wikijs health | Check connection |
| wikijs cache clear | Clear cache |
| wikijs completion bash | Shell completion |
Global Options
| Option | Description |
|--------|-------------|
| -v, --verbose | Verbose output |
| -d, --debug | Debug output |
| --no-color | Disable colors |
| --rate-limit | API rate limiting |
Common Options
| Option | Description |
|--------|-------------|
| --format json\|table | Output format |
| --limit | Limit results |
| --force | Skip confirmations |
| --locale | Specify locale |
| --dry-run | Preview changes |
Examples
# Create page with template
wikijs template create doc --content "# {{title}}\n\n{{date}}"
wikijs create "/docs/api" "API Docs" --template docFind broken links in docs section
wikijs check-links --path "/docs"Bulk import with rate limiting
wikijs --rate-limit 500 bulk-create ./pages --path-prefix "/imported"Watch mode for continuous sync
wikijs sync --output ~/wiki-mirror --watch --interval 60Debug API issues
wikijs --debug listClone a page
wikijs clone 42 "/docs/new-page" --with-tagsFind orphan pages (no incoming links)
wikijs orphansSearch and replace across wiki
wikijs replace "oldterm" "newterm" --path "/docs" --dry-runGenerate table of contents
wikijs toc 42 --format markdownFind duplicate content
wikijs duplicates --threshold 80Generate sitemap for SEO
wikijs sitemap --output sitemap.xmlInteractive shell mode
wikijs shellWatch a page for changes
wikijs watch "/docs/api" --interval 60Spell check a page
wikijs spellcheck 42 --lang en --ignore "API,CLI,GraphQL"Validate all pages
wikijs validate --all --format json
Integration Notes
--format json for machine-readable output--force is used\n, \t) are interpreted in --content strings{{title}}, {{path}}, {{date}}π‘ Examples
# Create page with template
wikijs template create doc --content "# {{title}}\n\n{{date}}"
wikijs create "/docs/api" "API Docs" --template docFind broken links in docs section
wikijs check-links --path "/docs"Bulk import with rate limiting
wikijs --rate-limit 500 bulk-create ./pages --path-prefix "/imported"Watch mode for continuous sync
wikijs sync --output ~/wiki-mirror --watch --interval 60Debug API issues
wikijs --debug listClone a page
wikijs clone 42 "/docs/new-page" --with-tagsFind orphan pages (no incoming links)
wikijs orphansSearch and replace across wiki
wikijs replace "oldterm" "newterm" --path "/docs" --dry-runGenerate table of contents
wikijs toc 42 --format markdownFind duplicate content
wikijs duplicates --threshold 80Generate sitemap for SEO
wikijs sitemap --output sitemap.xmlInteractive shell mode
wikijs shellWatch a page for changes
wikijs watch "/docs/api" --interval 60Spell check a page
wikijs spellcheck 42 --lang en --ignore "API,CLI,GraphQL"Validate all pages
wikijs validate --all --format json