Skip to main content

Deploy Markdown as native ADF pages to Confluence Cloud

Project description

CCFM — Confluence Cloud Flavoured Markdown

A CLI tool that converts Markdown to Atlassian Document Format (ADF) and deploys pages to Confluence Cloud. Write documentation as Markdown, deploy it as native Confluence pages — no legacy conversions, no storage format hacks, full editor compatibility.

PyPI Docker Python 3.12 Code style: black Linting: ruff codecov Docs

  • Native ADF output — Pages open in the Confluence editor without any legacy conversion
  • Automatic page hierarchy — Directory structure maps directly to Confluence page hierarchy
  • CCFM extensions — Status badges, panels, expands, dates, smart page links, emoji, anchors, image width control
  • Dependency-ordered deployment — Pages deploy in topological order so linked pages exist before pages that reference them
  • Idempotent — Safe to run multiple times; creates or updates pages automatically
  • Remote state — Deployment state stored in Confluence itself, no local files to commit
  • Concurrent deploy protection — Terraform-style locking prevents conflicting deploys
  • CI/CD ready — Deploy documentation on every commit to your main branch

Full documentation | Syntax reference


Quick Start

1. Get an API token

Go to Atlassian API Tokens, create a token, and note your Atlassian email address.

2. Install

pip install ccfm-convert

Note: The pip package is ccfm-convert, but the CLI command is ccfm.

3. Initialise your space

ccfm \
  --domain your-domain.atlassian.net \
  --email your.email@example.com \
  --token YOUR_API_TOKEN \
  --space YOUR_SPACE_KEY \
  init

This is idempotent — safe to run multiple times. It creates the _ccfm management infrastructure that stores deployment state and lock information.

4. Write a page

---
page_meta:
  title: My First Page
  labels:
    - docs
deploy_config:
  ci_banner: false
---

# My First Page

This is **bold** text, this is *italic*.

> [!info]
> This is an info panel.

::In Progress::blue::   ::Stable::green::

5. Preview and apply

ccfm plan
ccfm apply --auto-approve

For the full CLI reference, configuration options, and deployment patterns, see the documentation site.


Page Hierarchy

Directories map directly to Confluence pages. A file at docs/Team/Engineering/api.md creates:

Team
└── Engineering
    └── api

To control a container page's title and content, add a .page_content.md file inside the directory.


Docker

docker pull ghcr.io/stevesimpson418/ccfm-convert:latest

docker run --rm \
  -e CONFLUENCE_DOMAIN=company.atlassian.net \
  -e CONFLUENCE_EMAIL=user@example.com \
  -e CONFLUENCE_TOKEN=your-token \
  -v $(pwd)/docs:/docs \
  ghcr.io/stevesimpson418/ccfm-convert:latest \
  apply --auto-approve

For GitHub Action usage and CI/CD pipeline examples, see Docker & CI/CD.


Development

Setup

python -m venv .env
source .env/bin/activate    # Windows: .env\Scripts\activate

# Install the package and dev/test dependencies
pip install -e .
pip install -r requirements-test.txt

# Install pre-commit hooks
pre-commit install

Running tests

pytest                              # All unit tests with coverage report
pytest tests/test_converter.py      # Single file
pytest -k "test_heading"            # Single test by name

Coverage runs automatically via pyproject.toml. The target is 100% line coverage on src/.

Smoke tests

End-to-end tests that deploy real pages to a Confluence space:

cp .env.smoke.example .env.smoke
# Edit .env.smoke with your values, then:
source .env.smoke
pytest tests/smoke/ --no-cov -v

Code style

  • Formatter: Black (line length 100)
  • Linter: Ruff
  • Python: 3.12
black src/                  # Format
ruff check src/             # Lint
pre-commit run --all-files  # All hooks

Contributing

  1. Fork the repository and create a feature branch
  2. Run pre-commit install to set up hooks
  3. Make your changes
  4. Run pytest — all tests must pass, coverage must be maintained
  5. Run pre-commit run --all-files
  6. Submit a pull request

Credits

Built on:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ccfm_convert-2.1.0.tar.gz (105.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ccfm_convert-2.1.0-py3-none-any.whl (52.0 kB view details)

Uploaded Python 3

File details

Details for the file ccfm_convert-2.1.0.tar.gz.

File metadata

  • Download URL: ccfm_convert-2.1.0.tar.gz
  • Upload date:
  • Size: 105.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ccfm_convert-2.1.0.tar.gz
Algorithm Hash digest
SHA256 29c5751746fdc1cbbc9cd645839a5501dbcba89a58994b5cb1b2ac29f2315a36
MD5 5ce68834405343380955e30ccd50ca83
BLAKE2b-256 d5fa4545be32b74178fc1d08c33f8e2d1e4dd680a7c13fb8950d03328542903c

See more details on using hashes here.

Provenance

The following attestation bundles were made for ccfm_convert-2.1.0.tar.gz:

Publisher: release.yml on stevesimpson418/ccfm-convert

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ccfm_convert-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: ccfm_convert-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 52.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ccfm_convert-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a1bc5f9d3e7c9bde85e84b61fde546025cd7c0f14e90d34c486b9444791ce227
MD5 7ade115ac8c97b435201a04eff3a4be8
BLAKE2b-256 4879931096f9794af49e7b2070ddb8122a1b65e3c60b2bd8c7ccedf33d6d29be

See more details on using hashes here.

Provenance

The following attestation bundles were made for ccfm_convert-2.1.0-py3-none-any.whl:

Publisher: release.yml on stevesimpson418/ccfm-convert

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page