Warning
This README is a temporary AI-generated draft focused on usability first. A human-edited version will follow.
cfl is a CLI for Confluence Cloud (REST API v2) with a Markdown-friendly workflow for page operations.
Output of cfl --help:
CLI tool for Confluence Cloud REST API v2
Usage:
cfl [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
config Manage configuration profiles
help Help about any command
init Initialize cfl configuration
migrate Migration commands
page Manage Confluence pages
use Switch to a profile
Flags:
-h, --help help for cfl
-o, --output string output format (json | table) (default "table")
-p, --profile string profile name (temporary override)
-v, --verbose verbose output
-V, --version version for cfl
Use "cfl [command] --help" for more information about a command.
- Install:
go install github.com/takymt/cflcli@latest
cfl --help- Set your Confluence API token:
export CFL_API_TOKEN="your_confluence_api_token"- Initialize config (creates a
defaultprofile interactively on first run):
cfl init- List pages (uses
space_keyfrom the selected profile if configured):
cfl page list --limit 25If you are working from a local checkout of this repo, you can run go run . instead of cfl.
Create a page from Markdown:
cfl page create --space-key TEST --title "Release Notes" --body-file ./docs/release-notes.mdUpdate a page from Markdown:
cfl page update 123456 --title "Release Notes v2" --body-file ./docs/release-notes.mdExport pages to Markdown (migration flow):
cfl migrate export --space-key TEST --out ./export- Default
--body-formatismarkdown. - Use
--body-format storageto send Confluence storage format as-is. - Frontmatter keys supported for create/update:
title,parent-id(alsoparent_id,parentid). - Local images in Markdown are uploaded as Confluence attachments and rewritten to
ri:attachmentreferences. - Mermaid fenced code blocks are rendered to images by default; disable with
--no-render-mermaid.
Frontmatter example:
---
title: Weekly Update
parent-id: "123456"
---
# SummaryConfig file:
$XDG_CONFIG_HOME/cflcli/config.toml- Default:
~/.config/cflcli/config.toml
Minimal example:
current = "work"
[[profiles]]
name = "work"
domain = "your-domain.atlassian.net"
user = "you@example.com"
space_key = "TEST"
output = "table"See TODO.md for planned features.