Skip to main content

Overview

Knowledge Base (KB) commands let you manage your project’s wiki-style documentation directly from the terminal. All KB commands are scoped to a project via the -p/--project flag.
The Knowledge Base is a project-level resource. Every page belongs to exactly one project. Use Personal Notes for private, user-scoped content.

Commands

List Pages

# All pages in a project
apollo kb list -p "Apollo"

# Filter by folder
apollo kb list -p "Apollo" --folder "Architecture"

# Limit results
apollo kb list -p "Apollo" --limit 20
Options:
FlagDescription
-p, --project <name>Project name or ID (required)
--folder <name>Filter by folder name
--limit <n>Max results (default: 50)

View a Page

# By title (fuzzy match)
apollo kb view "deployment guide"

# By UUID
apollo kb view 550e8400-e29b-41d4-a716-446655440000
Shows the full page content, folder, version number, and metadata.

Search Pages

Search KB pages by title or content within a project:
apollo kb search "authentication" -p "Apollo"
apollo kb search "API design" -p "Apollo" --limit 10
Uses case-insensitive substring matching across both title and content fields.

Create a Page

# With inline content
apollo kb create -t "Deployment Guide" -p "Apollo" --content "## Steps\n1. Build\n2. Deploy"

# From a file
apollo kb create -t "API Reference" -p "Apollo" --file ./api-docs.md

# In a specific folder
apollo kb create -t "Auth Flow" -p "Apollo" --content "..." --folder "Architecture"
Options:
FlagDescription
-t, --title <title>Page title (required)
-p, --project <name>Project name or ID (required)
--content <text>Page content (markdown)
--file <path>Read content from a file instead
--folder <name>Place in a specific folder

Update a Page

# Update content
apollo kb update "Deployment Guide" --content "Updated deployment steps..."

# Update from file
apollo kb update "API Reference" --file ./api-docs-v2.md

# Move to a different folder
apollo kb update "Auth Flow" --folder "Security"

# Rename
apollo kb update "Deployment Guide" -t "Production Deployment Guide"

Delete a Page

Soft-deletes a page (can be restored later):
apollo kb delete "Old Draft"

List Folders

apollo kb folders -p "Apollo"
Shows all KB folders for the project with parent-child relationships.

JSON Output

# List as JSON
apollo kb list -p "Apollo" --json

# Search as JSON
apollo kb search "auth" -p "Apollo" --json

# View as JSON (full content)
apollo kb view "Deployment Guide" --json

Piping Examples

# Get all page titles
apollo kb list -p "Apollo" --json | jq '.[].title'

# Export a page to a file
apollo kb view "API Reference" --json | jq -r '.content' > api-reference.md