conflu-exporter
v1.4.1
Published
A TypeScript library for exporting Confluence content
Maintainers
Readme
Confluence Exporter
🎯 Choose Your Tool
| Feature | Browser Extension | CLI / Library |
| :--- | :--- | :--- |
| Best For | Manual exports, quick tasks, non-technical users | CI/CD, Bulk operations, Scheduled backups |
| Usage | 1-Click via Chrome Toolbar | Terminal or Node.js scripts |
| Setup | Install from Store | npm install -g |
| Auth | Log in via Browser (Cookies) | API Token / Environment Variables |
| Fidelity | ⭐⭐⭐⭐⭐ (Hybrid Extraction) | ⭐⭐⭐⭐ (API Content) |
| Attachments | ✅ Downloads with file | ✅ Downloads to folder |
🧩 Browser Extension
The easiest way to export pages. Just navigate to a page and click export.
- Download: Chrome Web Store (Link pending)
- Documentation: Read Extension Docs
- Source:
/extension
💻 CLI Tool
A powerful command-line interface for exporting Confluence pages and spaces to Markdown. Ideal for migration scripts and backups.
Installation
# Global Install
npm install -g conflu-exporter
# Local Install
npm install conflu-exporterQuick Usage
1. Set Credentials (Optional but recommended)
export CONFLUENCE_BASE_URL="https://your-domain.atlassian.net"
export CONFLUENCE_EMAIL="[email protected]"
export CONFLUENCE_TOKEN="your-api-token"2. Export a Page
conflu export page 1234563. Export a Space
conflu export space ENGINEERING --include-attachments4. Batch Export from file
conflu export batch list-of-pages.json✨ Core Features (Both Versions)
- Mermaid Diagrams: automatically converts Confluence Mermaid plugins into native Markdown
mermaidcode blocks. - Smart Code Blocks: Preserves syntax highlighting, newlines, and spacing from
codeandnoformatmacros. - Table Handling: Converts complex Confluence tables into standard GFM Markdown tables.
- Metadata: Adds YAML frontmatter (author, date, labels) to every exported file.
- Secure: Your data stays local. We communicate directly with your Confluence instance.
📦 Library Usage (for Developers)
You can use the core logic as a library in your own Node.js applications.
import { ConfluenceExporter } from 'conflu-exporter'
const exporter = new ConfluenceExporter({
baseUrl: 'https://my-org.atlassian.net',
auth: {
username: '[email protected]',
token: process.env.API_TOKEN
}
})
// Export a page properly
const page = await exporter.exportPage('123456')
console.log(page.markdown)🛠 Project Structure
This is a monorepo containing both the Core logic and the Extension.
conflu-exporter/
├── bin/ # CLI Entry point
├── src/ # Core Library & CLI Logic
├── extension/ # Browser Extension Source
├── dist/ # Compiled Library
├── dist-extension/ # Compiled Extension
└── docs/ # Detailed Documentation🤝 Contributing
Contributions are welcome! Please read our Contributing Guide to get started.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📝 License
Distributed under the MIT License. See LICENSE for more information.
