Archbee CLI Command Examples
Archbee CLI Command Examples
This guide shows common Archbee CLI workflows with practical command examples.
Most local development commands can run without authentication. Commands that interact with content on the Archbee platform usually require both an API key and a space ID.
Local Development
Use these commands while writing or testing documentation locally.
Preview your docs with live reload during development:
archbee devExample output:
Archbee local server running at http://localhost:3000
Watching files for changes...The local site typically runs on:
http://localhost:3000Validate your documentation structure and configuration:
archbee validateExample output:
✓ Configuration valid
✓ No structural issues foundThis command helps detect missing config files, invalid structures, and other common setup issues.
Check for broken internal links:
archbee broken-linksExample output:
Scanning documentation...
✓ No broken links foundThis is useful before publishing changes.
Managing Documents
Most document management commands require:
- --api-key
- --doc-space-id
Search for documents inside a documentation space:
archbee search-docs --api-key YOUR_API_KEY --doc-space-id SPACE_IDExample output:
Found 12 matching documentsRetrieve a document by ID:
archbee get-doc DOC_ID --format markdown --api-key YOUR_API_KEY --doc-space-id SPACE_IDExample output:
Document exported successfullyThe --format flag supports formats such as markdown, html, json, and source.
Create a new document or update an existing one from a local markdown file:
archbee create-doc ./doc.md --api-key YOUR_API_KEY --doc-space-id SPACE_IDExample output:
Document created successfullyDelete a document from a space:
archbee delete-doc DOC_ID --api-key YOUR_API_KEY --doc-space-id SPACE_IDExample output:
Document deleted successfullyUse delete commands carefully because they directly affect published documentation.
OpenAPI Workflows
The Archbee CLI can import and synchronize OpenAPI specifications to generate API reference documentation.
Sync an OpenAPI file into a documentation space:
archbee sync-openapi openapi.yaml --api-key YOUR_API_KEY --doc-space-id SPACE_IDExample output:
OpenAPI sync completed successfullyRetrieve information about an existing OpenAPI documentation tree:
archbee info-openapi TREE_ID --api-key YOUR_API_KEY --doc-space-id SPACE_IDExample output:
OpenAPI tree contains 24 endpointsIf synchronization fails, validate the OpenAPI schema before retrying.
File Manager Commands
The CLI can also manage uploaded files directly from the terminal.
Upload a file:
archbee upload ./logo.png --api-key YOUR_API_KEYExample output:
File uploaded successfullyList uploaded files and folders:
archbee list-files --api-key YOUR_API_KEYExample output:
Found 42 filesReplace an existing file while keeping the same public URL:
archbee replace-file FILE_ID ./new-logo.png --api-key YOUR_API_KEYExample output:
File replaced successfullyThe replace-file command updates a file while preserving the same public URL, which helps avoid broken links in documentation.
Publishing Changes
Publish documentation updates to production:
archbee publish-space --api-key YOUR_API_KEY --doc-space-id SPACE_IDExample output:
Space published successfullyMake sure the API key has write permissions before publishing.
Getting Command Help
Every CLI command supports the --help flag.
archbee <command> --helpExample:
archbee create-doc --helpExample output:
Usage: archbee create-doc [options]This displays all supported flags, arguments, and usage examples for the selected command.