Part of atlassian-cli

Confluence CLI

Manage pages, spaces, and exports from the terminal. CQL search, bulk backup, markdown sync, and attachment handling.

What is the Confluence CLI?

The Confluence CLI (atlassian-cli confluence) is a command-line tool for Atlassian Confluence Cloud. It covers the full page and space lifecycle — search with CQL, create/update/delete pages, manage attachments, export spaces for backup, bulk-label or bulk-delete pages, and synchronize Markdown repositories into Confluence. Output formats (JSON, CSV, YAML, table) make it easy to feed results into audits, dashboards, or other automation.

It ships as part of atlassian-cli, one open-source Rust binary that also handles Jira, Bitbucket, and Jira Service Management. Install via Homebrew or Cargo and authenticate with an Atlassian Cloud API token.

When to use a Confluence CLI

Confluence Features

Everything you need to manage Confluence from the command line

Space & Page Management

Create, update, move, and delete pages and spaces. Manage page hierarchies, labels, and permissions from the terminal.

CQL Search

Search pages and blog posts with full CQL support. Filter by space, type, label, contributor, and last modified date.

Bulk Export & Backup

Export entire spaces with pages, blog posts, and attachments. Create timestamped backups with manifest metadata.

Attachment Handling

List, upload, download, and delete attachments. Bulk download all attachments from a page or space backup.

Blog Post Management

Create, update, and export blog posts. Manage blog content alongside pages in automated documentation pipelines.

Page Analytics

Retrieve page view counts, contributor history, and version metadata. Track content freshness and engagement.

Real Commands

Actual CLI commands from production runbooks

Backup Space with Attachments

# Export all pages from a space
atlassian-cli confluence bulk export \
  --profile prod \
  --cql "space = DOCS AND type = page" \
  --output pages.json \
  --format json

# Get space metadata
atlassian-cli confluence space get \
  --profile prod \
  DOCS \
  --format json

# List and download attachments
atlassian-cli confluence attachment list \
  --profile prod \
  123456 \
  --format json

Sync Markdown to Confluence

# Search for existing page by title
atlassian-cli confluence search cql \
  --format json \
  "space = DOCS AND title = \"API Reference\""

# Create a new page in a space
atlassian-cli confluence page create \
  --profile prod \
  --space DOCS \
  --title "API Reference"

# Update page content from file
atlassian-cli confluence page update \
  --profile prod \
  123456 \
  --title "API Reference" \
  --body content.html

# Add labels for organization
atlassian-cli confluence page add-label \
  --profile prod \
  123456 \
  "auto-generated" "documentation"

Quick Start

Install and start managing Confluence in under a minute

1. Install

# Homebrew (macOS & Linux)
brew install omar16100/atlassian-cli/atlassian-cli

# Or via Cargo
cargo install atlassian-cli

2. Authenticate

# Add your Confluence instance
atlassian-cli auth login \
  --profile work \
  --base-url https://your-domain.atlassian.net \
  --email you@company.com

# Verify connection
atlassian-cli auth test --profile work

3. Start using

# Search your Confluence space
atlassian-cli confluence search cql \
  --profile work \
  "space = DOCS AND type = page"

Confluence command groups

Each group links into the full command reference.

Group Covers
confluence search cql / text / in-space CQL queries, full-text search, per-space search. Filter by type, label, contributor, or modified date.
confluence space Create, update, delete, list spaces. Manage space permissions and default settings.
confluence page Page CRUD, version history, labels, comments, restrictions. Works on any page you have access to.
confluence blog Blog post CRUD in any space.
confluence attachment Upload, download, list, and delete page attachments.
confluence bulk export / delete / add-labels Bulk operations with CQL filter + dry-run. Export a whole space to JSON, clean up stale content, retag at scale.
confluence analytics Page-view and space-stats analytics for reporting.

See the complete command reference for flags and output schemas. Auth setup is in the Authentication guide.

Frequently asked questions

How do I back up a Confluence space?

Run atlassian-cli confluence bulk export --cql "space = DEV" --format json --output backup.json. That pulls every page in the space into one JSON file you can store in S3 / Git / anywhere. Attach the matching attachments via the attachment group. End-to-end script in the Confluence backup runbook.

Can I sync Markdown files into Confluence?

Yes. The usual pattern is: render Markdown to Confluence storage format with pandoc, then pass the HTML to confluence page create or confluence page update. The markdown → Confluence runbook contains a production-ready script with idempotent upserts keyed by page title.

What is CQL and how do I use it?

Confluence Query Language. Same shape as Jira's JQL but with Confluence-specific fields: space = DEV, type = page, label = onboarding, lastmodified >= "2026-01-01". Combine clauses with AND / OR. The CLI accepts CQL directly: atlassian-cli confluence search cql "space = DEV AND type = page AND label = onboarding".

Is there dry-run mode for bulk operations?

Yes. Every confluence bulk subcommand accepts --dry-run, which prints the exact list of pages that would be affected without calling the mutating API. Run it first, sanity-check the list, then re-run without the flag.

Does it work with Confluence Data Center?

Primary target is Confluence Cloud. Some Data Center instances expose compatible v2 REST APIs, but support varies — check the GitHub repo for the current DC status.

Is it free?

Yes — MIT-licensed, open source. You need an Atlassian Cloud subscription for the Confluence instance itself, but the CLI is free for any use.

Confluence CLI FAQ

Managing Confluence from the command line

How do I manage Confluence from the command line?

atlassian-cli is a Confluence CLI for pages, spaces, folders, blog posts, CQL search, bulk export and attachments. After authenticating, run commands like atlassian-cli confluence page list --space DEV or atlassian-cli confluence search cql "space = DEV". See the full Confluence command reference.

Does the Confluence CLI support the v2 Folder API and Markdown?

Yes. Version 0.4 added a confluence folder command group for the Confluence v2 Folder API, plus Markdown-to-ADF conversion. See what's new in 0.4 or the changelog.

Is atlassian-cli the official Confluence CLI?

No. atlassian-cli is an independent, open-source tool and is not affiliated with, endorsed by, or maintained by Atlassian. Atlassian ships its own separate official CLI (acli).

Is the Confluence CLI free?

Yes. atlassian-cli is free and open source under the MIT License. Get it on the install page or GitHub.

Copied!