重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
terminal-print by terrylica/cc-skills
npx skills add https://github.com/terrylica/cc-skills --skill terminal-print通过一条命令,将 iTerm2 的终端输出打印到您的 HP 网络打印机。
在以下情况下使用此技能:
剪贴板 → 去除 ANSI 码 → Markdown 代码块 → pandoc/xelatex → PDF → 预览 → 打印
/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
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
通过修改执行块来添加参数运行:
/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
| 标志 | 描述 |
|---|---|
--file FILE | 从文件读取,而非剪贴板 |
--no-preview | 跳过 PDF 预览,直接打印 |
--no-print | 仅生成 PDF,不发送到打印机 |
-h, --help | 显示帮助信息 |
# 在 iTerm2 中复制终端输出,然后:
/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
/usr/bin/env bash << 'EOF'
bash "${CLAUDE_PLUGIN_ROOT}/skills/terminal-print/assets/print-terminal.sh" --no-print
EOF
所有依赖项在安装了 MacTeX 的 macOS 上均已可用:
| 工具 | 用途 | 状态 |
|---|---|---|
pandoc | Markdown 转 PDF | 必需 |
xelatex | PDF 引擎 | 必需 (MacTeX) |
pbpaste | 剪贴板访问 | 内置 |
lpr | CUPS 打印 | 内置 |
/tmp/terminal-output-YYYYMMDD_HHMMSS.pdf/tmp/terminal-YYYYMMDD_HHMMSS.md/tmp 目录请先在 iTerm2 中使用 Cmd+C 复制终端输出。
安装 MacTeX:brew install --cask mactex
检查打印机状态:lpstat -p -d
默认打印机是 HP_LaserJet_Pro_MFP_3101_3108。如需更改,请编辑脚本。
每周安装数
66
仓库
GitHub 星标
26
首次出现
Jan 24, 2026
安全审计
安装于
opencode63
gemini-cli62
codex61
cursor60
github-copilot60
amp59
Print terminal output from iTerm2 to your HP network printer with a single command.
Use this skill when:
Clipboard → Strip ANSI → Markdown code block → pandoc/xelatex → PDF → Preview → Print
/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
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
| Flag | Description |
|---|---|
--file FILE | Read from file instead of clipboard |
--no-preview | Skip PDF preview, print directly |
--no-print | Generate PDF only, don't send to printer |
-h, --help | Show help message |
# 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
/usr/bin/env bash << 'EOF'
bash "${CLAUDE_PLUGIN_ROOT}/skills/terminal-print/assets/print-terminal.sh" --no-print
EOF
All dependencies are already available on macOS with MacTeX:
| Tool | Purpose | Status |
|---|---|---|
pandoc | Markdown to PDF | Required |
xelatex | PDF engine | Required (MacTeX) |
pbpaste | Clipboard access | Built-in |
lpr | CUPS printing | Built-in |
/tmp/terminal-output-YYYYMMDD_HHMMSS.pdf/tmp/terminal-YYYYMMDD_HHMMSS.md/tmp periodicallyCopy terminal output first using Cmd+C in iTerm2.
Install MacTeX: brew install --cask mactex
Check printer status: lpstat -p -d
The default printer is HP_LaserJet_Pro_MFP_3101_3108. Edit the script to change.
Weekly Installs
66
Repository
GitHub Stars
26
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode63
gemini-cli62
codex61
cursor60
github-copilot60
amp59
LarkSuite Whiteboard CLI 工具:自动化生成专业图表与画板,支持DSL和Mermaid
40,700 周安装