Loading...
Loading...
Print files on Mac or Linux using the `lp` command with sensible defaults (double-sided, black & white). Supports PDF, markdown (via md-to-pdf conversion), and common print options like copies, page ranges, color, and printer selection.
npx skill4agent add steveclarke/dotfiles printlp/md-to-pdf~/.claude/skills/md-to-pdf/scripts/md-to-pdf.mjs doc.md
~/.claude/skills/print/scripts/print doc.pdf
rm doc.pdf # Delete if PDF was just for printing/md-to-pdf| Setting | Default | Rationale |
|---|---|---|
| Duplex | Double-sided (long-edge) | Save paper |
| Color | Black & white | Save toner on color printers |
# Print a file with defaults (double-sided, b&w)
lp -o sides=two-sided-long-edge -o ColorModel=Gray <file>
# Or use the helper script
~/.claude/skills/print/scripts/print <file>| Option | Flag | Example |
|---|---|---|
| Printer | | |
| Copies | | |
| Pages | | |
| Single-sided | | Override duplex |
| Color | | Override b&w |
| Landscape | | Rotate 90° |
| Fit to page | | Scale to fit |
lpstat -p -dsystem default destination:lpstat -o # Show pending jobs
lpstat -W completed # Show completed jobscancel <job-id> # e.g., cancel HP_LaserJet_4001-852
cancel -a # Cancel all jobsprint~/.claude/skills/print/scripts/printlp# Basic usage
print document.pdf
# Specify printer
print document.pdf -d Brother_HL_L3280CDW_series
# Multiple copies
print document.pdf -n 3
# Single-sided color
print document.pdf --single-sided --color
# Page range
print document.pdf -P 1-5print --help--colorlpstat -plpstat -o # Check status
cancel <job-id> # Cancel stuck job
cupsenable <printer-name> # Re-enable if disabledlpoptions -p <printer-name> -l | grep -i sides