printing-press-catalog について
一般的な API 向けの既成 Go CLI を閲覧・インストールするスキルです。カタログの一覧表示、検索、生成に対応しますが、README では非推奨とされ、後継の `/printing-press` が案内されています。
主な機能
- 01カテゴリ別の CLI 閲覧
- 02カタログ項目の検索
- 03カタログ CLI のインストール
- 04Go CLI プロジェクトの生成
活用シーン
- 01API 向け既成 CLI の検索
- 02カタログ仕様から CLI を生成
インストール
コマンドをコピーしてターミナルで実行します。
npx skills add https:/ / github.com/ mvanhorn/ cli-printing-press --skill printing-press-catalogインストール後、Claude Code で/printing-press-catalogを入力して読み込まれたか確認します。
詳細
/printing-press-catalog
非推奨: このスキルはメインの
/printing-pressスキルに置き換えられました。メインのスキルでは、組み込みカタログが自動的に確認されます。代わりに/printing-press <API>を使用してください。カタログを閲覧するには、ターミナルでcli-printing-press catalog listを実行してください。
人気の API 用に事前構築された Go CLI を閲覧してインストールします。
クイックスタート
/printing-press-catalog
/printing-press-catalog install stripe
/printing-press-catalog search auth
前提条件
- Go 1.26.4 以降がインストールされていること
cli-printing-pressバイナリが PATH 上にあること(go install github.com/mvanhorn/cli-printing-press/v4/cmd/cli-printing-press@latestでインストール)
セットアップ
他のコマンドを実行する前に、セットアップコントラクトを実行して、cli-printing-press バイナリが PATH 上にあることを確認し、スコープ変数を初期化してください。
# min-binary-version: 4.0.0
# Derive scope first — needed for local build detection
_scope_dir="$(git rev-parse --show-toplevel 2>/dev/null || echo "$PWD")"
_scope_dir="$(cd "$_scope_dir" && pwd -P)"
# Prefer local build when running from inside the printing-press repo.
_press_repo=false
if [ -x "$_scope_dir/cli-printing-press" ] && [ -d "$_scope_dir/cmd/cli-printing-press" ]; then
_press_repo=true
export PATH="$_scope_dir:$PATH"
echo "Using local build: $_scope_dir/cli-printing-press"
elif ! command -v cli-printing-press >/dev/null 2>&1; then
if [ -x "$HOME/go/bin/cli-printing-press" ]; then
echo "cli-printing-press found at ~/go/bin/cli-printing-press but not on PATH."
echo "Add GOPATH/bin to your PATH: export PATH=\"\$HOME/go/bin:\$PATH\""
else
echo "cli-printing-press binary not found."
echo "Install with: go install github.com/mvanhorn/cli-printing-press/v4/cmd/cli-printing-press@latest"
fi
return 1 2>/dev/null || exit 1
fi
# Resolve and emit the absolute path the agent must use for every later
# `cli-printing-press` invocation. `export PATH` above only affects this one
# Bash tool call; subsequent calls open a fresh shell and resolve bare
# `cli-printing-press` against the user's default PATH, where a stale global
# can silently shadow the local build. The agent captures this marker and
# substitutes the absolute path into every later invocation.
if [ "$_press_repo" = "true" ]; then
PRINTING_PRESS_BIN="$_scope_dir/cli-printing-press"
else
PRINTING_PRESS_BIN="$(command -v cli-printing-press 2>/dev/null || true)"
fi
echo "PRINTING_PRESS_BIN=$PRINTING_PRESS_BIN"
PRESS_BASE="$(basename "$_scope_dir" | tr '[:upper:]' '[:lower:]' | sed -E 's/[^a-z0-9_-]/-/g; s/^-+//; s/-+$//')"
if [ -z "$PRESS_BASE" ]; then
PRESS_BASE="workspace"
fi
PRESS_SCOPE="$PRESS_BASE-$(printf '%s' "$_scope_dir" | shasum -a 256 | cut -c1-8)"
PRESS_HOME="${PRINTING_PRESS_HOME:-$HOME/printing-press}"
PRESS_RUNSTATE="$PRESS_HOME/.runstate/$PRESS_SCOPE"
PRESS_LIBRARY="$PRESS_HOME/library"
mkdir -p "$PRESS_RUNSTATE" "$PRESS_LIBRARY"
セットアップコントラクトの実行後、標準出力から PRINTING_PRESS_BIN=<abs-path> の行を取得してください。このスキルで以降に実行する cli-printing-press ... の呼び出しでは、すべてこの絶対パスを使用する必要があります($PRINTING_PRESS_BIN というトークンをそのまま使わず、取得した値に置き換えてください)。上記の export PATH が反映されるのは、そのコマンドを実行する単一の Bash ツール呼び出しに限られます。そのため、後続の呼び出しでは新しいシェルが起動し、cli-printing-press とだけ指定するとユーザーのデフォルトの PATH から解決され、古いグローバル版がローカルビルドを上書きする可能性があります。
バイナリのパスを取得したら、バイナリのバージョン互換性を確認してください。このスキルの YAML フロントマターから min-binary-version フィールドを読み取ります。<PRINTING_PRESS_BIN> version --json を実行し、出力からバージョンを解析します。セマンティックバージョニングの規則に従って、min-binary-version と比較してください。インストール済みのバイナリが最小バージョンより古い場合は、直ちに停止し、ユーザーに次のように伝えてください。「cli-printing-press バイナリ vX.Y.Z は、必要な最小バージョン vA.B.C より古いです。更新するには go install github.com/mvanhorn/cli-printing-press/v4/cmd/cli-printing-press@latest を実行してください。」
生成された CLI はリポジトリではなく、$PRESS_LIBRARY/ に公開されます。
ワークフロー
カタログの一覧表示(引数なし)
引数なしで呼び出された場合、利用可能なすべての CLI をカテゴリー別に一覧表示します。
- Glob + Read を使用して、catalog/ 内のすべての YAML ファイルを読み取ります
- 各ファイルの name、display_name、description、category フィールドを解析します
- カテゴリー別にグループ化して表示します。
Available CLIs (12 entries):
Payments:
stripe - Payment processing and financial infrastructure API
square - Payment processing and commerce API
Auth:
stytch - Authentication and user management API
Email:
sendgrid - Email delivery and marketing API
Communication:
discord - Chat and community platform API
twilio - Communication APIs for SMS, voice, and messaging
front - Customer communication platform API
Developer Tools:
github - Software development platform API
digitalocean - Cloud infrastructure and developer platform API
Project Management:
asana - Work management and project tracking API
CRM:
hubspot - CRM contacts API
Example:
petstore - Canonical OpenAPI example
Install any CLI: /printing-press-catalog install <name>
インストール(install )
install <name> で呼び出された場合:
- catalog/.yaml を読み取ります
- ファイルが存在しない場合は、エラー「カタログに '' のエントリーがありません。利用可能な CLI を確認するには /printing-press-catalog を実行してください。」を表示します
- カタログエントリーから spec_url を抽出します
- プレビュー「<display_name> CLI を <spec_url> からインストールしています」を表示します
- 仕様をダウンロードして生成します。
CATALOG_TMP_DIR="/tmp/printing-press/catalog" mkdir -p "$CATALOG_TMP_DIR" SPEC_TMP="$(mktemp "$CATALOG_TMP_DIR/<name>-spec-XXXXXX.yaml")" curl -sL -o "$SPEC_TMP" "<spec_url>" OUTPUT_BASE="$PRESS_LIBRARY/<name>-pp-cli" OUTPUT_DIR="$OUTPUT_BASE" i=2 while [ -e "$OUTPUT_DIR" ]; do OUTPUT_DIR="${OUTPUT_BASE}-$i" i=$((i + 1)) done cli-printing-press generate \ --spec "$SPEC_TMP" \ --output "$OUTPUT_DIR" \ --validate - すべての品質ゲートに合格した場合、結果を提示します。
Generated <name>-pp-cli with X resources. Try it: cd "$OUTPUT_DIR" go install ./cmd/<name>-pp-cli <name>-pp-cli --help <name>-pp-cli doctor - ゲートに失敗した場合は、エラーを表示し、「再試行に対応したカスタム生成を行うには、/printing-press <display_name> API をお試しください。」と提案します。
検索(search )
search <query> で呼び出された場合:
- catalog/ 内のすべての YAML ファイルを読み取ります
- name、display_name、description、category を対象に、クエリを大文字と小文字を区別せず検索します
- 一致するエントリーを表示します
制限事項
- Stripe、Discord、GitHub などの大規模な API 仕様は、生成とコンパイルに 30~60 秒かかります
- 生成される CLI は、50 個のリソース、またはリソースごとに 20 個のエンドポイントに制限されます
- カタログエントリーは変更される可能性のある外部 URL を参照しています