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, HTML, storage, or Markdown format
- 🔍 Search - Find pages using Confluence's powerful search
- ℹ️ Page info - Get detailed information about pages
- 🏠 List spaces - View 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, or a whole page tree/space with
--recursive
- 🛠️ 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
- 🌐 Raw API requests - Make arbitrary authenticated requests to any Confluence endpoint (like
gh api)
- 🔄 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
Homebrew 5.1.15+ warns that third-party taps are "not trusted". To trust the tap and silence the warning (required in a future Homebrew release):
brew trust pchuri/tap
npm
npm install -g confluence-cli
Or run directly with npx:
npx confluence-cli
Note: npm does not automatically install the optional typebox dependency. Loading the bundled Pi extension from an npm-installed copy requires installing typebox alongside confluence-cli; the documented local-checkout npm ci already includes it.
Pi Coding Agent: local package with protected writes
Install this local checkout into Pi without globally installing confluence. Install the clone's dependencies first because Pi does not install dependencies for local-path packages:
cd /absolute/path/to/confluence-cli
npm ci
pi install /absolute/path/to/confluence-cli
For a Server/Data Center instance at confluence.example.com, start Pi from a shell configured like this when protected writes are intended:
export CONFLUENCE_DOMAIN=confluence.example.com
export CONFLUENCE_API_PATH=/rest/api
export CONFLUENCE_AUTH_TYPE=bearer
export CONFLUENCE_API_TOKEN='<personal-access-token>'
export CONFLUENCE_READ_ONLY=false
export CONFLUENCE_PI_WRITES=true
export CONFLUENCE_PI_WRITE_SPACES='SAFE1,SAFE2'
pi
The package does not persist these values in Pi settings or session files. Changing registration variables (CONFLUENCE_PI_WRITES or CONFLUENCE_PI_WRITE_SPACES) after Pi starts requires /reload so the extension can re-register the correct tool set. Leaving writes disabled exposes read tools only.
Write tool registration depends only on CONFLUENCE_PI_WRITES=true plus a valid non-empty CONFLUENCE_PI_WRITE_SPACES allowlist. CONFLUENCE_READ_ONLY=true does not hide registered write tools; it blocks every write execution even if those tools remain visible.
Pi read tools are: confluence_read, confluence_search, confluence_info, confluence_spaces, confluence_children, confluence_export, confluence_convert, confluence_find, confluence_versions, confluence_comments, confluence_attachments, confluence_property_list, and confluence_property_get.
When CONFLUENCE_PI_WRITES=true and CONFLUENCE_PI_WRITE_SPACES is a non-empty comma-separated allowlist without wildcards, Pi also registers these protected mutation tools: confluence_create, confluence_create_child, confluence_update, confluence_move, confluence_delete, confluence_copy_tree_preview, confluence_copy_tree, confluence_comment_create, confluence_comment_delete, confluence_property_set, confluence_property_delete, confluence_attachment_upload, confluence_attachment_delete, confluence_version_delete, confluence_versions_purge_preview, and confluence_versions_purge.
The generic API escape hatch remains unavailable: this package does not register confluence_api or any api, argv, or raw HTTP method tool. Use the typed tools above rather than model-controlled Bash for supported Confluence operations.