Skip to content

bouajilaProg/CodeDown

Repository files navigation

codeDown

PyPI version Python versions License: MIT Build Status Docs

codeDown is a simple yet powerful CLI tool that converts Markdown (.md) files into beautiful themed PDFs — complete with syntax-highlighted code blocks.

Built for developers who love clean documentation, readable code snippets, and automated workflows.


Features

  • Syntax Highlighting for code blocks
  • Selectable Themes – interactive picker or CLI flag (light, dark)
  • Watch Mode – auto-regenerate PDF on file save
  • Self-Update – update from the CLI (code-down update)
  • Configurable – set a default theme via code-down config set-theme
  • Fast & Lightweight – converts Markdown to PDF in seconds

Installation

Via pip

pip install code-down

Via binary (Linux)

  1. Download the latest release Visit the Releases Page and download the latest Linux binary.

  2. Make it executable and move to PATH

    chmod +x code-down
    sudo mv code-down /usr/local/bin/

Usage

Convert a Markdown file into a themed PDF:

code-down input.md output.pdf -s dark

Watch mode

Automatically rebuild the PDF when the Markdown file changes:

code-down -w input.md

Options

Flag Description Default
-o, --output Output PDF file path Same as input with .pdf extension
-s, --style Theme style (e.g. light, dark) Config default or dark
-w, --watch Watch file and rebuild PDF on changes
-v, --version Print version and exit

Commands

Command Description
code-down themes Pick a theme interactively (sets as default)
code-down config show Show current configuration
code-down config set-theme Set the default theme (interactive or by name)
code-down update Update codeDown to the latest version

Examples

Quick test file:

code-down examples/example.md

Convert README.md to README.pdf using the default theme:

code-down README.md

Convert with a dark theme and custom output name:

code-down README.md -o README_dark.pdf -s dark

Watch a file and rebuild on every save:

code-down -w notes.md -s light

Pick a theme interactively:

code-down themes

Notes

  • Ensure your Markdown files are UTF-8 encoded for best results.
  • Supports syntax highlighting for most major programming languages.
  • Works completely offline — no internet connection required (except for update).

About

cli tool to convert markdown(.md) files into pdf with code highlighting and themes

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors