1. Read Pages
Retrieve page content in various formats:
```bash
# Read as text (default)
confluence read 123456789
# Read as HTML
confluence read 123456789 --format html
# Read as Markdown
confluence read 123456789 --format markdown
# Using page URL instead of ID
confluence read "https://yourcompany.atlassian.net/wiki/spaces/SPACE/pages/123456789"
```
Formats:
text - Plain text (default)html - HTML formatmarkdown - Markdown format (useful for documentation workflows)
2. Get Page Information
View metadata about a page:
```bash
# Get page metadata
confluence info 123456789
# Using URL
confluence info "https://yourcompany.atlassian.net/wiki/spaces/SPACE/pages/123456789"
```
Returns: Page ID, title, space, version, created/modified dates, authors, etc.
3. Search Content
Find pages using Confluence Query Language (CQL):
```bash
# Basic search
confluence search "API documentation"
# Search with result limit
confluence search "meeting notes" --limit 10
# Complex CQL queries
confluence search "type=page AND space=DEV AND title~'API'"
```
Common CQL Patterns:
type=page - Pages only (not attachments)space=SPACEKEY - Within specific spacetitle~'keyword' - Title contains keywordtext~'keyword' - Content contains keywordcreated >= now()-7d - Created in last 7 days
4. List Spaces
View all accessible spaces:
```bash
# List all spaces
confluence spaces
```
Returns: Space keys, names, types, and URLs
5. Find Pages by Title
Locate pages by exact or partial title:
```bash
# Find in all spaces
confluence find "Project Documentation"
# Find in specific space
confluence find "API Guide" --space DEV
```
6. Create Pages
Create new pages with content:
```bash
# Create with inline content
confluence create "My New Page" SPACEKEY --content "Hello World!"
# Create from file
confluence create "Documentation" SPACEKEY --file ./content.md --format markdown
# Create with HTML content
confluence create "Release Notes" SPACEKEY --content "Version 2.0
" --format html
# Create with storage format (Confluence native)
confluence create "Technical Doc" SPACEKEY --file ./doc.xml --format storage
```
Key options:
--content - Inline content string--file - Read content from file--format - Content format: markdown, html, or storage (default: storage)
7. Create Child Pages
Create pages under existing parent pages:
```bash
# Create child page with inline content
confluence create-child "Subsection" 123456789 --content "Child content"
# Create from file
confluence create-child "API Reference" 123456789 --file ./api-docs.md --format markdown
# Using parent page URL
confluence create-child "Details" "https://...pages/123456789" --content "Details here"
```
8. Update Pages
Modify existing pages:
```bash
# Update title only
confluence update 123456789 --title "Updated Title"
# Update content only
confluence update 123456789 --content "New content" --format markdown
# Update from file
confluence update 123456789 --file ./updated-content.md --format markdown
# Update both title and content
confluence update 123456789 --title "New Title" --content "New content"
```
Key options:
--title - Change page title--content - Inline content--file - Read content from file--format - Content format (markdown, html, storage)
9. Edit Workflow (Export β Modify β Update)
Export page for local editing:
```bash
# Export page to file in storage format
confluence edit 123456789 --output ./page.xml
# Edit the file locally with your preferred editor
# Then update back to Confluence
confluence update 123456789 --file ./page.xml --format storage
```
This workflow is useful for:
- Complex formatting changes
- Offline editing
- Version control integration
- Batch processing
10. Copy Page Trees
Duplicate page hierarchies with all children:
```bash
# Copy entire page tree
confluence copy-tree 123456789 987654321
# Copy with custom title for root page
confluence copy-tree 123456789 987654321 "Copied Documentation"
# Limit depth of copy
confluence copy-tree 123456789 987654321 --max-depth 2
# Exclude pages by pattern (wildcards supported)
confluence copy-tree 123456789 987654321 --exclude "temp,draft,obsolete*"
# Add delay between operations (for rate limiting)
confluence copy-tree 123456789 987654321 --delay-ms 500
# Dry run (preview without making changes)
confluence copy-tree 123456789 987654321 --dry-run
```
Key options:
--max-depth - Limit tree depth (default: unlimited)--exclude - Comma-separated wildcard patterns to skip--delay-ms - Milliseconds delay between API calls--dry-run - Preview what would be copied without making changes
Exclusion patterns:
* matches any characters? matches single character- Examples:
temp, draft*, archive-?
11. View Statistics
Check CLI usage analytics:
```bash
# View usage statistics
confluence stats
```
Disable analytics:
```bash
export CONFLUENCE_CLI_ANALYTICS=false
```