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

confluence-ai-cli

v0.1.0

Published

CLI to export Confluence pages (with draw.io and inline-SVG diagrams) to Markdown

Readme

confluence-cli

A command-line tool for Confluence pages: exports a page with its diagrams to Markdown.

Features

  • Export a Confluence page to Markdown by pageId or page URL.
  • Diagrams are saved too:
    • draw.io — PNG is taken from page attachments by macro-id;
    • inline SVG (use-case, ER, sequence, etc.) — saved as files.
  • Page metadata in the output (title, source link).
  • Image format: SVG (default, vector) or PNG.
  • Authentication via Personal Access Token (PAT), read-only.

Requirements

  • Bun — the only dependency; no npm packages needed at runtime.

Installation

From npm (requires bun >= 1.0):

bun install -g confluence-ai-cli   # or: npm install -g confluence-ai-cli

From source:

git clone <repository-url>
cd confluence-cli
bun install   # dev types only
bun run build # builds the executable bundle ./bundle/confluence.ts

Usage

Run the built bundle ./bundle/confluence.ts, or run from source with bun start ....

confluence <cmd> <options> ...

The export command

Export a page (with diagrams) to Markdown:

confluence export <pageId|URL> [options]

Options:

| Option | Description | |---|---| | --out-dir <dir> | where to write the result (default: /tmp) | | --image-format <fmt> | svg (default, vector) or png (needs a converter) | | --base-url <url> | Confluence base URL (default: $CONFLUENCE_BASE_URL) | | --token-env <name> | name of the env variable with the PAT (default: CONFLUENCE_PAT) | | --insecure | skip TLS certificate verification | | -h, --help | show help |

Examples

export CONFLUENCE_BASE_URL=https://wiki.example.com
export CONFLUENCE_PAT=<your-personal-access-token>

confluence export 12345
confluence export 'https://wiki.example.com/pages/viewpage.action?pageId=12345'
confluence export 12345 --out-dir ./docs --image-format png

How to get a PAT

Confluence (Data Center / Server): profile → Settings → Personal Access Tokens → Create token. The token is sent in the Authorization: Bearer header and is used read-only.

Project structure

src/
  cli.ts              # entry point (shebang); the bundle is built from it
  main.ts             # CLI: argument parsing, help
  confluence-api/     # Confluence REST API client
  drawio/             # draw.io macro handling
  svg/                # inline SVG handling
  markdown/           # final Markdown assembly
.archi/               # architecture (archispec): use cases, API contracts
openspec/             # change specifications (openspec)

License

MIT