Reference

CLI reference

confluence-cli reads Confluence pages, searches via CQL, creates and edits pages, and manages comments. It supports Confluence Cloud and Data Center / Server, and emits agent-friendly JSON with structured errors.

Generated from the command tree, so it always matches --help.

Global flags

Persistent flags accepted by every command.

FlagDefaultDescription
--allow-writesfalseoverride read-only mode (defaults.read_only / CONFLUENCE_CLI_READ_ONLY) for this invocation
--base-urlConfluence site URL (overrides config)
--configconfig directory (default ~/.angelmsger/confluence, falling back to ~/.confluence when only that exists)
--fieldscomma-separated dot-path fields to keep
--flavorbackend flavor: cloud, datacenter or auto
--format, -foutput format: json, table or ndjson
--prettyfalsehuman-friendly mode: interactive TUI in `config init`, colorized JSON elsewhere
--timeoutrequest timeout, e.g. 30s
--use-contextuse a named context for this invocation
--verbose, -vfalseverbose diagnostics on stderr

confluence-cli attachmentcommand group

Upload, list, download and delete page attachments

confluence-cli attachment

confluence-cli attachment delete

Delete an attachment

confluence-cli attachment delete <attachment-id> [flags]

Delete an attachment by its content ID. Deletion requires --yes, or an interactive confirmation when stdin is a terminal.

Options

FlagDefaultDescription
--dry-runfalseprint the request without sending it
--yesfalseskip the deletion confirmation

Examples

  confluence-cli attachment delete att12345 --yes

confluence-cli attachment download

Download an attachment's content

confluence-cli attachment download <attachment-id> [flags]

Download an attachment by its content ID. Use --output - to stream to stdout.

Options

FlagDefaultDescription
--output, -ooutput path ('-' for stdout)

Examples

  confluence-cli attachment download att12345 --output spec.pdf
  confluence-cli attachment download att12345 --output -

confluence-cli attachment list

List the attachments of a page

confluence-cli attachment list <id|url> [flags]

Options

FlagDefaultDescription
--allfalsefetch every page of results
--cursorstart from this pagination cursor (the 'next' of a prior page)
--limit0page size (default from config)

Examples

  confluence-cli attachment list 123456

confluence-cli attachment update

Replace an attachment's content with a new version

confluence-cli attachment update <attachment-id> --file <PATH> [flags]

Upload new content for an existing attachment, creating a new version. The attachment keeps its name unless --name is given. Use --file - to read from stdin.

Options

FlagDefaultDescription
--commentversion comment for the update
--dry-runfalseprint the request without sending it
--filepath to the new content ('-' for stdin)
--minorfalsemark the update as a minor edit
--nameattachment file name (default: current name)

Examples

  confluence-cli attachment update att12345 --file diagram-v2.png
  confluence-cli attachment update att12345 --file report.pdf --comment "fix totals"

confluence-cli attachment upload

Attach a file to a page

confluence-cli attachment upload <page-id|url> --file <PATH> [flags]

Upload a file as a new attachment on a page. Use --file - to read the file from stdin (--name is then required). When an attachment with the same name already exists, Confluence stores the upload as a new version.

Options

FlagDefaultDescription
--commentversion comment for the attachment
--dry-runfalseprint the request without sending it
--filepath to the file to upload ('-' for stdin)
--minorfalsemark the upload as a minor edit
--nameattachment file name (default: base name of --file)

Examples

  confluence-cli attachment upload 123456 --file diagram.png
  confluence-cli attachment upload 123456 --file report.pdf --comment "Q3 figures"
  confluence-cli attachment upload 123456 --file - --name notes.txt --dry-run

confluence-cli authcommand group

Inspect and manage stored credentials

confluence-cli auth

confluence-cli auth login

Store a credential for the configured server

confluence-cli auth login

Prompt for a secret and store it securely. Run `config init --pretty` first if the server URL is not set.

Examples

  confluence-cli auth login
  confluence-cli --use-context staging auth login

confluence-cli auth logout

Remove the stored credential for the configured server

confluence-cli auth logout

confluence-cli auth status

Show whether a usable credential is configured

confluence-cli auth status

confluence-cli commentcommand group

Read and post page comments

confluence-cli comment

confluence-cli comment add

Post a comment on a page

confluence-cli comment add <id|url> [flags]

Post a footer comment on a page. Use --parent to reply to an existing comment.

Options

FlagDefaultDescription
--bodycomment body text
--body-fileread body from a file ('-' for stdin)
--body-formatstoragebody format: storage or wiki
--parentparent comment ID, to post a reply

Examples

  confluence-cli comment add 123456 --body "Looks good to me."

  # reply to a comment, reading the body from stdin
  echo "Agreed." | confluence-cli comment add 123456 --parent 789 --body-file -

confluence-cli comment delete

Delete a comment

confluence-cli comment delete <comment-id|url> [flags]

Delete a comment by its content ID. Deletion requires --yes, or an interactive confirmation when stdin is a terminal.

Options

FlagDefaultDescription
--dry-runfalseprint the request without sending it
--yesfalseskip the deletion confirmation

Examples

  confluence-cli comment delete 789 --yes

confluence-cli comment list

List the footer comments of a page

confluence-cli comment list <id|url> [flags]

Options

FlagDefaultDescription
--allfalsefetch every page of results
--asmarkdownrender comment bodies as markdown or text
--cursorstart from this pagination cursor (the 'next' of a prior page)
--limit0page size (default from config)

Examples

  confluence-cli comment list 123456
  confluence-cli comment list 123456 --all --as text

confluence-cli comment update

Edit a comment's body

confluence-cli comment update <comment-id|url> [flags]

Replace a footer comment's body. The new version is the current version + 1; pass --version to assert the version you last read.

Options

FlagDefaultDescription
--bodynew comment body text
--body-fileread body from a file ('-' for stdin)
--body-formatstoragebody format: storage or wiki
--dry-runfalseprint the request without sending it
--version0expected current version (fetched when omitted)

Examples

  confluence-cli comment update 789 --body "Updated: looks good."
  echo "Revised." | confluence-cli comment update 789 --body-file -

confluence-cli configcommand group

Manage confluence-cli configuration

confluence-cli config

confluence-cli config delete-context

Delete a context and its stored credential

confluence-cli config delete-context <name>

Examples

  confluence-cli config delete-context staging

confluence-cli config get-contexts

List the configured contexts

confluence-cli config get-contexts

List every context in the config file. The current context — the one used when --use-context is not given — is marked.

Examples

  confluence-cli config get-contexts
  confluence-cli config get-contexts --format table

confluence-cli config init

Interactively set up server URL and credentials

confluence-cli config init

Run the interactive setup wizard. It collects a server URL, detects the flavor, validates a credential and stores it. The wizard can also configure additional named contexts for working with several servers.

Examples

  confluence-cli config init --pretty   # interactive TUI (recommended)
  confluence-cli config init             # plain line-by-line wizard (scripts, non-TTY)

confluence-cli config path

Print the config file path

confluence-cli config path

confluence-cli config show

Show the resolved configuration

confluence-cli config show [flags]

Options

FlagDefaultDescription
--explainfalseannotate each value with its source

confluence-cli config use-context

Switch the current context

confluence-cli config use-context <name>

Set the current context — the server used by default. Override it for a single command with the global --use-context flag instead.

Examples

  confluence-cli config use-context staging

confluence-cli doctor

Diagnose configuration, credentials and connectivity

confluence-cli doctor [flags]

Options

FlagDefaultDescription
--no-update-checkfalseskip the check for a newer confluence-cli release

Examples

  confluence-cli doctor
  confluence-cli doctor --no-update-check

confluence-cli labelcommand group

List, add and remove page labels

confluence-cli label

confluence-cli label add

Add one or more labels to a page

confluence-cli label add <page-id|url> <label>... [flags]

Options

FlagDefaultDescription
--dry-runfalseprint the request without sending it

Examples

  confluence-cli label add 123456 release-notes
  confluence-cli label add 123456 q3 reviewed --dry-run

confluence-cli label list

List the labels on a page

confluence-cli label list <page-id|url> [flags]

Options

FlagDefaultDescription
--allfalsefetch every page of results
--cursorstart from this pagination cursor (the 'next' of a prior page)
--limit0page size (default from config)

Examples

  confluence-cli label list 123456

confluence-cli label remove

Remove a label from a page

confluence-cli label remove <page-id|url> <label> [flags]

Options

FlagDefaultDescription
--dry-runfalseprint the request without sending it

Examples

  confluence-cli label remove 123456 release-notes

confluence-cli pagecommand group

Read and write Confluence pages

confluence-cli page

confluence-cli page children

List the direct child pages of a page

confluence-cli page children <id|url> [flags]

Options

FlagDefaultDescription
--allfalsefetch every page of results
--cursorstart from this pagination cursor (the 'next' of a prior page)
--limit0page size (default from config)

Examples

  confluence-cli page children 123456
  confluence-cli page children 123456 --all --format table

confluence-cli page copy

Copy a page's title and body to a new page

confluence-cli page copy <id|url> --title <TITLE> [flags]

Create a new page from an existing one. The copy is shallow: it carries the title and body only, not child pages or attachments.

Options

FlagDefaultDescription
--dry-runfalseprint the request without sending it
--parentparent page for the copy (default: source parent)
--spacespace key for the copy (default: source space)
--titletitle for the copied page

Examples

  confluence-cli page copy 123456 --title "Copy of the spec"
  confluence-cli page copy 123456 --title Draft --space SANDBOX

confluence-cli page create

Create a new page

confluence-cli page create --space <KEY> --title <TITLE> [flags]

Create a page in a space. Use --parent to nest it under an existing page. The body may be storage-format XHTML, Confluence wiki markup or Markdown (--body-format markdown, converted on a best-effort basis).

Options

FlagDefaultDescription
--bodybody text
--body-fileread body from a file ('-' for stdin)
--body-formatstoragebody format: storage, wiki or markdown
--dry-runfalseprint the request without sending it
--parentparent page ID or URL
--spacespace key for the new page
--titlepage title

Examples

  # create a page from a Markdown file, nested under a parent
  confluence-cli page create --space ENG --title "Release Notes" \
    --parent 123456 --body-format markdown --body-file notes.md

  # preview the request without sending it
  confluence-cli page create --space ENG --title Draft --body "<p>hi</p>" --dry-run

confluence-cli page delete

Delete a page (move it to the trash)

confluence-cli page delete <id|url> [flags]

Move a page to the trash. With --purge the trashed page is then permanently removed. Deletion requires --yes, or an interactive confirmation when stdin is a terminal.

Options

FlagDefaultDescription
--dry-runfalseprint the request without sending it
--purgefalsepermanently delete (removes the trashed page)
--yesfalseskip the deletion confirmation

Examples

  confluence-cli page delete 123456 --yes
  confluence-cli page delete 123456 --purge --yes

confluence-cli page descendants

List all descendant pages of a page

confluence-cli page descendants <id|url> [flags]

Options

FlagDefaultDescription
--allfalsefetch every page of results
--cursorstart from this pagination cursor (the 'next' of a prior page)
--limit0page size (default from config)

Examples

  confluence-cli page descendants 123456 --all

confluence-cli page get

Fetch a page and render its body

confluence-cli page get <id|url> [flags]

Fetch a single page. Use --scope to read only part of the body: outline list the headings (start here when the structure is unknown) section one section, identified by --section <id> from the outline keyword blocks matching --keyword, with their heading for context full the entire body (default) Rendering to markdown/text drops content it cannot represent (macros, images); when that happens the result carries a render_notes field. Use --as raw to get the untouched source body instead.

Options

FlagDefaultDescription
--asmarkdownoutput form: markdown, text or raw (unrendered source)
--body-formatstoragesource body format: storage or view
--detailsimpleblock detail: simple, with-ids or full
--keywordkeyword (with --scope keyword)
--no-bodyfalsefetch metadata only, skip the body
--scopefullread scope: full, outline, section or keyword
--sectionsection ID (with --scope section)

Examples

  # render the whole page as Markdown
  confluence-cli page get 123456

  # list the headings, then read just one section
  confluence-cli page get 123456 --scope outline
  confluence-cli page get 123456 --scope section --section sec-2

  # get the untouched storage XHTML (macros and all)
  confluence-cli page get 123456 --as raw

  # a page URL works in place of an ID
  confluence-cli page get https://wiki.example.com/pages/viewpage.action?pageId=123456

confluence-cli page history

List a page's version history

confluence-cli page history <id|url> [flags]

Options

FlagDefaultDescription
--allfalsefetch every page of results
--cursorstart from this pagination cursor (the 'next' of a prior page)
--limit0page size (default from config)

Examples

  confluence-cli page history 123456
  confluence-cli page history 123456 --all --format table

confluence-cli page move

Move a page under a new parent and/or space

confluence-cli page move <id|url> [flags]

Options

FlagDefaultDescription
--dry-runfalseprint the request without sending it
--target-parentnew parent page ID or URL
--target-spacenew space key

Examples

  # reparent a page
  confluence-cli page move 123456 --target-parent 999

  # move a page into another space
  confluence-cli page move 123456 --target-space DOCS

confluence-cli page restore

Restore a page to an earlier version

confluence-cli page restore <id|url> --version <N> [flags]

Republish an earlier version's body as a new version. The restore is non-destructive: the version history is left intact. Run `page history` first to find the version number to restore.

Options

FlagDefaultDescription
--dry-runfalseprint the request without sending it
--messageversion comment for the restore
--version0the version number to restore

Examples

  confluence-cli page restore 123456 --version 3
  confluence-cli page restore 123456 --version 3 --message "roll back bad edit"

confluence-cli page unwatch

Stop watching a page

confluence-cli page unwatch <id|url> [flags]

Options

FlagDefaultDescription
--dry-runfalseprint the request without sending it

Examples

  confluence-cli page unwatch 123456

confluence-cli page update

Update a page's title and/or body

confluence-cli page update <id|url> [flags]

Update an existing page. Omitted fields are kept as-is. The new version is the current version + 1; pass --version to assert the version you last read (a mismatch fails with a conflict error).

Options

FlagDefaultDescription
--bodybody text
--body-fileread body from a file ('-' for stdin)
--body-formatstoragebody format: storage, wiki or markdown
--dry-runfalseprint the request without sending it
--messageversion comment for the edit
--minorfalsemark the edit as minor
--titlenew page title (kept when omitted)
--version0expected current version (fetched when omitted)

Examples

  # retitle a page, keeping its body
  confluence-cli page update 123456 --title "New Title"

  # replace the body from Markdown, asserting the version last read
  confluence-cli page update 123456 --body-format markdown --body-file body.md --version 7

confluence-cli page watch

Watch a page (subscribe to its notifications)

confluence-cli page watch <id|url> [flags]

Options

FlagDefaultDescription
--dry-runfalseprint the request without sending it

Examples

  confluence-cli page watch 123456

confluence-cli page watch-status

Report whether you watch a page

confluence-cli page watch-status <id|url>

Examples

  confluence-cli page watch-status 123456

confluence-cli skillcommand group

Install the companion Skill for coding agents (Claude Code, Codex)

confluence-cli skill

confluence-cli skill install

Deploy the embedded Skill into a coding agent's skills directory

confluence-cli skill install [flags]

Write the companion `confluence` Skill — bundled inside this binary — into a coding agent's skills directory. With no flags it probes for installed agents (Claude Code, Codex) and installs into each one found. Re-run it after upgrading the CLI to refresh the Skill to the matching version.

Options

FlagDefaultDescription
--agent[]target agents instead of auto-detecting (claude-code, codex)
--direxplicit skills base directory; installs into <dir>/confluence
--projectfalseinstall into the project (./.claude/skills, ./.agents/skills) instead of $HOME

confluence-cli skill path

Print where the Skill would be installed, and whether it is

confluence-cli skill path [flags]

Options

FlagDefaultDescription
--agent[]limit to specific agents (claude-code, codex)
--direxplicit skills base directory
--projectfalseuse the project skills directories instead of $HOME

confluence-cli skill show

Print the embedded SKILL.md to stdout

confluence-cli skill show

confluence-cli skill uninstall

Remove the companion Skill from a coding agent's skills directory

confluence-cli skill uninstall [flags]

Delete a previously installed `confluence` Skill. With no flags it probes for installed agents (Claude Code, Codex) and removes the Skill from each one found.

Options

FlagDefaultDescription
--agent[]target agents instead of auto-detecting (claude-code, codex)
--direxplicit skills base directory; removes <dir>/confluence
--projectfalseremove from the project (./.claude/skills, ./.agents/skills) instead of $HOME

confluence-cli spacecommand group

List and inspect Confluence spaces

confluence-cli space

confluence-cli space get

Fetch a single space by key

confluence-cli space get <key>

confluence-cli space list

List spaces

confluence-cli space list [flags]

Options

FlagDefaultDescription
--allfalsefetch every page of results
--cursorstart from this pagination cursor (the 'next' of a prior page)
--limit0page size (default from config)
--typefilter by type: global or personal

confluence-cli usercommand group

Discover Confluence users — the values --author / --contributor accept

confluence-cli user

confluence-cli user get

Show details of a single user (accountId on Cloud; username on DC)

confluence-cli user get <selector>

confluence-cli user me

Print the user the configured credentials authenticate as (alias for whoami)

confluence-cli user me

confluence-cli version

Print version information

confluence-cli version

confluence-cli whoami

Print the user the configured credentials authenticate as

confluence-cli whoami

Examples

  confluence-cli whoami