productivity
Confluence CLI for Headless Automation
Use the Confluence CLI for headless automation with headless JSON commands, schema discovery, credentials, and permission controls.
12 functions 7 read 5 write API token auth
Confluence CLI for Headless Automation
Use KosmoKrator as a non-interactive integration runtime for local automations and wrappers.
Use headless automation when another tool needs a stable local command surface. The Confluence CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.
Command Shape
# Confluence CLI for Headless Automation
kosmokrator integrations:configure confluence --set api_token="$CONFLUENCE_API_TOKEN" --set base_url="$CONFLUENCE_BASE_URL" --enable --read allow --write ask --json
kosmo integrations:call confluence.confluence_create_page '{"space_key":"example_space_key","title":"example_title","body":"example_body","parent_id":"example_parent_id","type":"example_type"}' --json Discovery Before Execution
Agents and scripts can inspect Confluence docs and schemas before choosing a function.
kosmo integrations:docs confluence --json
kosmo integrations:docs confluence.confluence_create_page --json
kosmo integrations:schema confluence.confluence_create_page --json
kosmo integrations:search "Confluence" --json
kosmo integrations:list --json Useful Confluence CLI Functions
| Function | Type | Parameters | Description |
|---|---|---|---|
confluence.confluence_create_page | Write | space_key, title, body, parent_id, type | Create a new page in a Confluence space. Requires space_key, title, and body (HTML). Optionally specify a parent page ID. |
confluence.confluence_get_page | Read | page_id, expand | Get details for a specific Confluence page by ID. Returns title, body, version, space, and other metadata. |
confluence.confluence_update_page | Write | page_id, title, body, version, status | Update an existing Confluence page. Requires page_id, title, body, and the new version number (current version + 1). |
confluence.confluence_delete_page | Write | page_id | Delete a Confluence page by its ID. This action moves the page to the trash. |
confluence.confluence_search_pages | Read | cql, limit, start, expand | Search for Confluence content using CQL (Confluence Query Language). Examples: 'title = "My Page"', 'space = "DEV" and type = "page"'. |
confluence.confluence_get_page_ancestors | Read | page_id | Get the ancestor (parent) pages of a Confluence page by its ID. Returns the full ancestor hierarchy. |
confluence.confluence_get_page_children | Read | page_id, limit, start, expand | Get the child pages of a Confluence page by its ID. Supports pagination and property expansion. |
confluence.confluence_add_comment | Write | page_id, body | Add a comment to a Confluence page. Requires the page ID and comment body in HTML. |
confluence.confluence_get_spaces | Read | limit, start, type, status | List Confluence spaces accessible to the authenticated user. Supports pagination and filtering by type and status. |
confluence.confluence_get_space | Read | space_key | Get details for a specific Confluence space by its key. |
confluence.confluence_get_labels | Read | page_id | Get the labels attached to a Confluence page by its ID. |
confluence.confluence_add_labels | Write | page_id, labels | Add one or more labels to a Confluence page. Labels are provided as an array of name strings. |
Automation Notes
- Use
--jsonfor machine-readable output. - Keep credentials out of argv by using environment variables or stored KosmoKrator configuration.
- Configure read/write policy before unattended runs; use
--forceonly for trusted automation. - Use the MCP gateway instead when the agent needs dynamic tool discovery inside a conversation.