Skip to content

ZenUml/zenuml-cli

Repository files navigation

@zenuml/confluence-cli

CLI for managing ZenUML diagrams stored in Confluence Cloud.

Installation

npm install -g @zenuml/confluence-cli

Or run directly with npx:

npx @zenuml/confluence-cli auth whoami --site https://your-site.atlassian.net --email you@example.com --api-token YOUR_TOKEN

Authentication

Save credentials locally so you don't have to pass them every time:

zenuml auth login --site https://your-site.atlassian.net --email you@example.com --api-token YOUR_TOKEN

Credentials are stored in ~/.zenuml-cli.json. You can also use environment variables:

Variable Description
ZENUML_CLI_SITE Confluence site URL
ZENUML_CLI_EMAIL Atlassian account email
ZENUML_CLI_API_TOKEN Atlassian API token
ZENUML_CLI_ADDON_KEY Override addon key (skips auto-detection)
ZENUML_CLI_CONFIG Override config file path

Commands

Auth

zenuml auth login    # Save credentials
zenuml auth whoami   # Test authentication
zenuml auth logout   # Clear stored credentials

Diagrams

# List diagrams
zenuml diagram list [--space <key>] [--page <id>] [--type <type>] [--limit <n>] [--format json|text]

# Get a diagram
zenuml diagram get <id> [--format json|text]

# Create a diagram
zenuml diagram create --page <pageId> --type <type> [--title <title>] (--file <path> | --stdin)

# Update a diagram
zenuml diagram update <id> [--type <type>] [--title <title>] (--file <path> | --stdin)

# Delete a diagram
zenuml diagram delete <id> [--force]

# Export raw diagram content
zenuml diagram export <id> [--format raw|json] [--output <path>]

Diagram Types

sequence, mermaid, plantuml, graph (Draw.io), openapi

Variants

The CLI automatically detects which addon variant (full or lite) is installed on your Confluence site by probing for existing ZenUML content. No configuration needed.

If auto-detection isn't suitable, you can override with --addon-key:

zenuml diagram list --addon-key com.zenuml.confluence-addon-lite

Development

pnpm install
pnpm build
pnpm test

Live testing

bash scripts/test-live.sh

See docs/live-verification-whimet4.md for details.

License

MIT

About

CLI for managing ZenUML diagrams in Confluence

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors