Skip to content
/ lotl Public

lotl (like an axolotl 🦎) is a Node.js CLI tool for converting Markdown files to PDF with customizable themes. Simple, efficient, and just a little bit cute.

License

Notifications You must be signed in to change notification settings

poran-dip/lotl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🦎 lotl β€” Markdown to PDF with Axolotl Power

lotl is a fast, simple CLI tool to convert your Markdown files into beautiful PDFs β€” with themes, margins, headers, footers, and even recursive directory conversion. Powered by Puppeteer, marked, and a little axolotl magic. ✨


πŸš€ Installation

Install from npm:

npm install -g lotl

Local development/Contributions:

# clone the repo
git clone https://github.com/poran-dip/lotl.git
cd lotl

# install dependencies
npm install

# link the CLI globally for dev
npm link

πŸ“¦ Usage

lotl <input> [options]

Examples:

lotl README.md                    # Convert single file
lotl .                             # Convert all .md files in current directory
lotl docs/                         # Convert all .md files in docs/ folder
lotl . -r                          # Recursively convert all .md files
lotl docs.md -o output.pdf         # Custom output file
lotl . -o pdfs/                    # Batch convert to pdfs/ directory
lotl file.md --theme dark --format Letter
lotl doc.md --no-header --margin 30mm

βš™οΈ Options

Option Description Default
-o, --output Output PDF file (single) or directory (batch) auto
-t, --theme Theme (github, dark, minimal) github
-m, --margin Page margins (e.g., "20mm") 20mm
-f, --format Page format (A4, Letter, Legal) A4
--no-header Disable header enabled
--no-footer Disable footer enabled
-r, --recursive Process subdirectories recursively false

🎨 Themes

  • github – clean and familiar GitHub-style
  • dark – dark mode for night owls
  • minimal – clean, serif-based look

You can also import the theme list in JavaScript:

import { themes } from 'lotl';
console.log(Object.keys(themes)); // ['github', 'dark', 'minimal']

πŸ“œ Programmatic API

You can also use lotl directly in your Node.js code:

import { convertMdToPdf, themes } from 'lotl';

await convertMdToPdf('README.md', 'output.pdf', {
  theme: 'dark',
  format: 'Letter',
  margin: '25mm',
  header: false
});

πŸ›  Development

npm install       # install dependencies
npm link          # link CLI locally
npm start         # run CLI from source

🧾 License

MIT Β© 2025 Poran Dip


🦎 β€œBecause every PDF deserves a little axolotl love.”


Transparency Note: Most of this project was created using AI assistance. I (Poran Dip) wanted a MD to PDF converter CLI, and I wanted it yesterday, so AI was used to achieve that. I'm including this both for transparency and as a little flex in prompt engineering skills. 😎 However, that also means to expect bugs and things to break, and I'd love if you could open issues about them! I'll maintain this for a while and actually make proper changes myself, as needed.

About

lotl (like an axolotl 🦎) is a Node.js CLI tool for converting Markdown files to PDF with customizable themes. Simple, efficient, and just a little bit cute.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published