doc-helper

Concatenate markdown files and sync to Confluence with ease.

bash
$ curl -fsSL https://raw.githubusercontent.com/onurkerem/doc-helper/main/packages/cli/install.sh | bash

Core Capabilities

description

Markdown Concatenation

Combine multiple markdown files into a single, cohesive document. Easily copy the output to your clipboard for quick sharing.

sync

Confluence Sync

Push your documentation directly to Confluence. The tool automatically maps your local directory hierarchy to Confluence pages.

track_changes

Smart Updates

doc-helper uses hash tracking to ensure only modified files are uploaded, saving time and API calls during updates.

Usage

Point doc-helper at a directory. It concatenates all markdown files and copies the result to your clipboard. Use flags to exclude directories, sync to Confluence, or dry-run.

check_circle

Concatenate and copy all markdown in a directory.

check_circle

Exclude specific directories from the scan.

Terminal
# Concatenate all markdown in a directory
$ doc-helper ~/my-docs
# Exclude directories
$ doc-helper ~/my-docs --exclude node_modules,.git
# Sync to Confluence (dry-run preview)
$ doc-helper ~/my-docs --confluence --dry-run

Hierarchy Mapping

doc-helper reads your local folder structure and mirrors it in Confluence. Directories become container pages; each markdown file becomes a child page with its title from the first # Heading.

Local Directory

folder my-docs/
description overview.md
folder getting-started/
description installation.md
description configuration.md
folder guides/
description api-usage.md

Confluence Pages

article Documentation (parent, existing)
article Overview (overview.md)
folder_open getting-started (container)
article Installation
article Configuration
folder_open guides (container)
article API Usage

Simple Configuration

Create ~/.doc-helper/config.json with your Confluence credentials and the path to your docs directory.

{
  "syncs": [
    {
      "path": "/Users/you/my-docs",
      "confluence_base_url": "https://yourcompany.atlassian.net/wiki",
      "email": "you@company.com",
      "api_token": "YOUR_API_TOKEN",
      "parent_page_id": "123456"
    }
  ]
}

Get your API token at id.atlassian.com/manage-profile/security/api-tokens open_in_new