Skip to main content

A CLI tool that converts Markdown files into beautifully themed PDFs with syntax-highlighted code blocks.

Project description

codeDown

PyPI version Python License: MIT Release GitHub Release

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).

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

code_down-2.0.1.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

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

code_down-2.0.1-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file code_down-2.0.1.tar.gz.

File metadata

  • Download URL: code_down-2.0.1.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for code_down-2.0.1.tar.gz
Algorithm Hash digest
SHA256 5659b4a9a1a1ad315e46fb0be5ca194b3fd921d3c757f583fa357af766a26fc9
MD5 cd2764d8a593f0b1e3fa501ede791aa1
BLAKE2b-256 3350b447b978d2fe6af5569bb0c11a7e4dd436527ddb263ea286eb2d9007e295

See more details on using hashes here.

File details

Details for the file code_down-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: code_down-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for code_down-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 accc004ea33fff358a2cd66f46def0636da2c40faa1de92c8a00f4802c4f9093
MD5 c394b4f2c09275f104b01444a04cdb97
BLAKE2b-256 c6f4ae5f6ce4a09d700d818695c3607f2f091478801abdc104efcc2092615968

See more details on using hashes here.

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