Back to list
terrylica

terminal-print

by terrylica

Claude Code Skills Marketplace: plugins, skills for ADR-driven development, DevOps automation, ClickHouse management, semantic versioning, and productivity workflows

7🍴 1📅 Jan 24, 2026

SKILL.md


name: terminal-print description: Print iTerm2 terminal output to HP network printer. Strips ANSI escape codes, wraps in monospace code block, generates PDF via pandoc/xelatex, previews, and prints. Invoke on - print terminal, terminal to printer, print session, lpr output, print command output, terminal PDF.

Terminal Print

Print terminal output from iTerm2 to your HP network printer with a single command.

Quick Start

  1. Copy terminal output in iTerm2 (Cmd+C)
  2. Invoke this skill
  3. Review PDF preview, press Enter to print

How It Works

Clipboard → Strip ANSI → Markdown code block → pandoc/xelatex → PDF → Preview → Print
  • ANSI codes stripped: Colors and escape sequences removed for clean B&W output
  • Monospace font: DejaVu Sans Mono for proper character alignment
  • Landscape orientation: Fits ~120 characters per line
  • US Letter paper: Auto-detected from printer settings

Execution

/usr/bin/env bash << 'PRINT_EOF'
SKILL_DIR="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/cc-skills/plugins/doc-tools}/skills/terminal-print"
bash "$SKILL_DIR/assets/print-terminal.sh"
PRINT_EOF

Options

Run with arguments by modifying the execution block:

/usr/bin/env bash << 'PRINT_EOF'
SKILL_DIR="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/marketplaces/cc-skills/plugins/doc-tools}/skills/terminal-print"
bash "$SKILL_DIR/assets/print-terminal.sh" --no-preview
PRINT_EOF
FlagDescription
--file FILERead from file instead of clipboard
--no-previewSkip PDF preview, print directly
--no-printGenerate PDF only, don't send to printer
-h, --helpShow help message

Examples

# Copy terminal output in iTerm2, then:
/usr/bin/env bash << 'EOF'
bash "${CLAUDE_PLUGIN_ROOT}/skills/terminal-print/assets/print-terminal.sh"
EOF
/usr/bin/env bash << 'EOF'
bash "${CLAUDE_PLUGIN_ROOT}/skills/terminal-print/assets/print-terminal.sh" --file ~/session.log
EOF

Generate PDF only (no print)

/usr/bin/env bash << 'EOF'
bash "${CLAUDE_PLUGIN_ROOT}/skills/terminal-print/assets/print-terminal.sh" --no-print
EOF

Prerequisites

All dependencies are already available on macOS with MacTeX:

ToolPurposeStatus
pandocMarkdown to PDFRequired
xelatexPDF engineRequired (MacTeX)
pbpasteClipboard accessBuilt-in
lprCUPS printingBuilt-in

Output

  • PDF location: /tmp/terminal-output-YYYYMMDD_HHMMSS.pdf
  • Markdown source: /tmp/terminal-YYYYMMDD_HHMMSS.md
  • Cleanup: macOS automatically cleans /tmp periodically

Troubleshooting

"No text in clipboard"

Copy terminal output first using Cmd+C in iTerm2.

"Missing pandoc" or "Missing xelatex"

Install MacTeX: brew install --cask mactex

Printer not found

Check printer status: lpstat -p -d

The default printer is HP_LaserJet_Pro_MFP_3101_3108. Edit the script to change.

Score

Total Score

65/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

1ヶ月以内に更新

+10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

Reviews

💬

Reviews coming soon