Confluence CLI
A powerful command-line interface for Atlassian Confluence that allows you to read, search, and manage your Confluence content from the terminal.
Features
- 📖 Read pages - Get page content in text or HTML format
- 🔍 Search - Find pages using Confluence's powerful search
- ℹ️ Page info - Get detailed information about pages
- 🏠 List spaces - View all available Confluence spaces
- ✏️ Create pages - Create new pages with support for Markdown, HTML, or Storage format
- 📝 Update pages - Update existing page content and titles
- 🗑️ Delete pages - Delete (or move to trash) pages by ID or URL
- 📎 Attachments - List, download, upload, or delete page attachments
- 🏷️ Properties - List, get, set, and delete content properties (key-value metadata)
- 💬 Comments - List, create, and delete page comments (footer or inline)
- 📦 Export - Save a page and its attachments to a local folder
- 🛠️ Edit workflow - Export page content for editing and re-import
- 🔀 Profiles - Manage multiple Confluence instances with named configuration profiles
- 🔒 Read-only mode - Profile-level write protection for safe AI agent usage
- 🔄 Format conversion - Convert between Markdown, HTML, Storage, and text formats locally (no server required)
- 🔧 Easy setup - Simple configuration with environment variables or interactive setup
Installation
Homebrew (macOS/Linux)
brew install pchuri/tap/confluence-cli
npm
npm install -g confluence-cli
Or run directly with npx:
npx confluence-cli
Claude Code Integration
confluence-cli ships as a Claude Code plugin. Once installed, Claude Code understands all confluence-cli commands automatically and receives updates when the skill is improved.
Option 1: Install as Plugin (recommended)
Add the marketplace and install the plugin:
/plugin marketplace add pchuri/confluence-cli
/plugin install confluence@pchuri-confluence-cli
Option 2: Install Skill manually
If you prefer not to use the plugin system, copy the skill documentation into your project:
confluence install-skill
This creates .claude/skills/confluence/SKILL.md in your current directory. Claude Code picks it up automatically.
Quick Start
-
Initialize configuration:
confluence init
-
Read a page:
confluence read 123456789
-
Search for pages:
confluence search "my search term"
-
List child pages:
confluence children 123456789
-
Create a new page:
confluence create "My New Page" SPACEKEY --content "Hello World!"
-
Update a page:
confluence update 123456789 --content "Updated content"
Configuration
Option 1: Interactive Setup
confluence init
The wizard helps you choose the right API endpoint and authentication method. It recommends /wiki/rest/api for Atlassian Cloud domains (e.g., *.atlassian.net) and /rest/api for self-hosted/Data Center instances, then prompts for Basic (email/username + token/password) or Bearer authentication.
Option 2: Non-interactive Setup (CLI Flags)
Provide all required configuration via command-line flags. Perfect for CI/CD pipelines, Docker builds, and AI coding agents.
Complete non-interactive mode (all required fields provided):
confluence init \
--domain "company.atlassian.net" \
--api-path "/wiki/rest/api" \
--auth-type "basic" \
--email "user@example.com" \
--token "your-api-token"
Scoped API token (recommended for agents — least privilege):
# Replace <your-cloud-id> with your actual Cloud ID
confluence init \
--domain "api.atlassian.com" \
--api-path "/ex/confluence/<your-cloud-id>/wiki/rest/api" \
--auth-type "basic" \
--email "user@example.com" \
--token "your-scoped-token"
Named profile (save to a specific profile):
confluence --profile staging init \
--domain "staging.example.com" \
--api-path "/rest/api" \
--auth-type "bearer" \
--token "your-personal-access-token"
Hybrid mode (some fields provided, rest via prompts):
# Domain and token provided, will prompt for auth method and email
confluence init --domain "company.atlassian.net" --token "your-api-token"
# Email indicates basic auth, will prompt for domain and token
confluence init --email "user@example.com" --token "your-api-token"