Read-only Confluence Data Center / Server CLI for humans and AI agents. It talks directly to the Confluence REST API — no MCP gateway or long-running service required.
The command set mirrors the five read tools of atlassian-confluence-mcp-server plus the attachment download capability that upstream lacks:
cfb command
MCP equivalent
page <id|url>
confluence_get_page_by_url
body <pageId>
confluence_get_page_body_chunk
attachments <pageId>
confluence_get_page_attachments
comments <pageId>
confluence_get_page_comments
comment-attachments <id>
confluence_get_comment_attachments
download <attachmentId>
confluence_download_attachment (local injection)
search <cql>
confluence_search
Install
npm install npm run build npm link# optional: puts cfb on PATH
Configure
One Confluence instance, one flat config. Create cfb.config.json (see cfb.config.example.json):
spaces is an allow-list. Omit it to allow every space. When the allow-list is restricted and a command cannot determine the content’s space, it fails closed (exit 3).
allowInsecureHttp must be true for http:// base URLs (credentials travel in plaintext).
Auth: username + password / passwordEnv, or pat / patEnv. Server/DC PATs use Bearer; Cloud API tokens (*.atlassian.net) use Basic email:token.
Config discovery: --config > $CFB_CONFIG > ./cfb.config.json > %APPDATA%\cfb\config.json / ~/.config/cfb/config.json. Only flags and environment variables are required — the file itself is optional if you set CFB_BASE_URL and credentials.
cfb search 'type=page AND space=DEV' --limit 10 cfb search --text "deployment checklist" --space DEV
Output formats: auto|table|json|csv|tsv (auto = table on TTY, JSON when piped). body prints raw chunk text in table mode; use --format json for offsets/metadata.
Exit codes: 0 ok, 1 HTTP/network, 2 usage/config, 3 blocked by space allow-list, 4 timeout, 130 interrupted.
Notes
Read-only: no create/update/delete commands.
Secrets are never printed.
Page URLs are accepted as numeric ids, ?pageId=ID, /spaces/SPACE/pages/ID/, /display/SPACE/Title, and /x/ID tiny links.
List commands return at most 100 rows. When more results exist, a warning is printed; narrow the query to see the rest.
Downloads are capped by download.maxBytes (default 50 MB) and written to download.dir (default ./downloads next to the config file).