npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

confluencedc-cli

v1.0.31

Published

Command-line interface for [Confluence Data Center](https://developer.atlassian.com/server/confluence/confluence-rest-api-summary/). 26 commands across 7 domains — pages, comments, attachments, labels, search, users, and access tokens.

Readme

confluencedc-cli

Command-line interface for Confluence Data Center. 26 commands across 7 domains — pages, comments, attachments, labels, search, users, and access tokens.

Install

npm install -g confluencedc-cli

Setup

export CONFLUENCE_URL="https://confluence.example.com"   # Base URL of your Confluence instance
export CONFLUENCE_TOKEN="your-personal-access-token"      # HTTP Access Token from Confluence

The token commands are the exception: token management uses basic auth, not the PAT (--basic-username / --basic-password).

Argument conventions

  • One positional, and it is the group's subject — the page id for page, the comment id for comment, the CQL query for search.
  • Scope is a flag — --space <key>, --page-id <id>.
  • Prose is --body, and every prose flag has a --<name>-file <path|-> companion that reads a file or stdin.
  • Pagination is --limit (default 25) + --start.

Commands

All commands output JSON. Add --pretty to pretty-print.

page

| Command | Description | | ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | | confluencedc page get [pageId] | One page. Pass the id, or omit it and look the page up with --title + --space. --page-version reads an older version, --expand widens the response | | confluencedc page children <pageId> | The page's direct children | | confluencedc page history <pageId> | Its version history — who changed what, when | | confluencedc page create | Creates a page in --space with --title and --body. --format storage\|wiki, --parent <pageId> to nest it | | confluencedc page update <pageId> | Replaces the body and --title. The current version is fetched automatically; --comment records a change note, --minor-edit suppresses notifications | | confluencedc page delete <pageId> | Deletes the page |

comment

| Command | Description | | ----------------------------------------- | ---------------------------------------------------------------------------- | | confluencedc comment list <pageId> | Comments on the page. --depth includes replies, --expand widens each one | | confluencedc comment get <commentId> | One comment | | confluencedc comment create <pageId> | Adds a comment from --body/--body-file (wiki markup) | | confluencedc comment update <commentId> | Rewrites the comment; the version is fetched automatically | | confluencedc comment reply <commentId> | Replies in-thread. Requires --page-id <id> alongside the parent comment | | confluencedc comment delete <commentId> | Deletes the comment |

attachment

| Command | Description | | ----------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | | confluencedc attachment list <pageId> | Attachments on the page, with their ids and download urls. --filename filters | | confluencedc attachment download | Writes one attachment to --output, from the --url reported by attachment list | | confluencedc attachment download-all <pageId> | Writes every attachment on the page into the --output directory | | confluencedc attachment upload <pageId> | Uploads the files in --files (comma-separated paths). --comment annotates the version, --minor-edit suppresses notifications | | confluencedc attachment delete <attachmentId> | Deletes one attachment |

label

| Command | Description | | ---------------------------------- | ---------------------------------------- | | confluencedc label list <pageId> | Labels on the page | | confluencedc label add <pageId> | Adds the label named by --label <name> |

search

| Command | Description | | --------------------------- | --------------------------------------------------------------------------------------- | | confluencedc search <cql> | Content matching a CQL query. --expand pulls in body or version data with each result |

user

| Command | Description | | ---------------------------------- | ---------------------------------------------------------------------------------- | | confluencedc user me | The profile behind CONFLUENCE_TOKEN | | confluencedc user get <username> | One user by exact username, or by user key with --by-key | | confluencedc user search <query> | Users matching part of a display name. --cql takes a raw user CQL clause instead |

token

| Command | Description | | ------------------------------------- | ------------------------------------------------------------------------------------------------------------ | | confluencedc token list | Your tokens' names, ids and expiry — never the secrets | | confluencedc token create | Mints a token named --name, optionally --expiration-duration <days>. The secret is returned exactly once | | confluencedc token revoke <tokenId> | Revokes one token |

Pagination

List commands take --limit <n> (default 25) and --start. Responses carry a nextPage cursor — pass it back as --start for the next page. When nextPage is null, there are no more results.

Examples

# Read a page by id, or find it by title
confluencedc page get 12345
confluencedc page get --title "Architecture Overview" --space DOCS

# Walk the tree
confluencedc page children 12345
confluencedc page history 12345

# Create, including under a parent
confluencedc page create --space DOCS --title "New Page" --body "<p>Hello</p>" --format storage
confluencedc page create --space DOCS --title "Sub Page" --body "h1. Hello" --format wiki --parent 12345

# Update from a file, or from stdin
confluencedc page update 12345 --title "New Page" --body-file ./page.html --comment "Rewrote the intro"
cat page.html | confluencedc page update 12345 --title "New Page" --body-file -

# Comment, and reply in-thread
confluencedc comment create 12345 --body "Looks good, ship it"
confluencedc comment reply 67890 --page-id 12345 --body "Agreed"

# Search with CQL
confluencedc search 'space = "DOCS" AND type = "page" AND text ~ "deployment"'

# Attachments: list to get a download url, then fetch it
confluencedc attachment list 12345
confluencedc attachment download --url "https://confluence.example.com/download/attachments/12345/diagram.png" --output ./diagram.png
confluencedc attachment download-all 12345 --output ./downloads
confluencedc attachment upload 12345 --files ./diagram.png,./notes.txt

# Label a page
confluencedc label add 12345 --label runbook

# Who am I, and who is Jane
confluencedc user me
confluencedc user search "Jane Smith"

Content formats

Confluence supports two body formats:

  • storage — Confluence storage format (XHTML-like). Use for precise control.
  • wiki — Wiki markup. Simpler syntax, auto-converted to storage on save.

Comments always use wiki markup.

Error reporting

Confluence answers HTTP 404 both for content that does not exist and for content you are not allowed to see, and does not distinguish the two — so every 404 is reported as not_found (exit 3) with a recovery naming both causes, never as an auth failure.

An invalid or expired CONFLUENCE_TOKEN does not produce a 401 either: Confluence serves the request anonymously, and the status you get back depends on the endpoint (404, 403, or even 200). The CLI detects the anonymous case from the response headers and reports auth (exit 6) consistently.

Renamed in 2.0.0

The argument surface was unified across the whole CLI suite. There are no deprecation shims:

| Before | Now | | ------------------------------------------- | ---------------------------------------------------------------------------------------- | | comment reply <commentId> --page <pageId> | comment reply <commentId> --page-id <pageId> | | page update --message <text> | page update --comment <text> | | attachment upload --no-minor-edit | attachment upload --minor-edit (default is now a regular edit, matching page update) | | token revoke --id <tokenId> | token revoke <tokenId> |