CLI のインストールと使用方法

AgentGIF CLI を使用すると、ターミナルからターミナル GIF をアップロード、録画、検索、管理できます。5 つの言語で利用可能 — スタックに合ったものを選んでください。

インストール

CLI はすべての主要なパッケージレジストリに公開されています。各実装は同じコアコマンドを提供します。

言語インストールコマンドレジストリ
Pythonpip install agentgifPyPI
Node.jsnpm install -g @agentgif/clinpm
Gogo install github.com/agentgif/cli@latestpkg.go.dev
Rustcargo install agentgifcrates.io
Rubygem install agentgifRubyGems

インストールを確認:

agentgif --version
agentgif --help

認証

GIF をアップロードまたは管理する前に、GitHub アカウントで認証してください:

agentgif login

これにより GitHub OAuth 用のブラウザが開きます。認証後、CLI は API キーを ~/.config/agentgif/config.json にローカル保存します。

または、API キーを直接設定することもできます:

agentgif login --api-key YOUR_API_KEY

Get your API key from Settings → API Key.

認証ステータスを確認:

agentgif whoami
# → @yourname (authenticated)

アップロード

メタデータ付きで GIF をアップロード:

agentgif upload demo.gif \
  --title "Docker Compose Up" \
  --command "docker compose up -d" \
  --tags docker,compose,containers \
  --description "Starting services with Docker Compose"

アップロードオプション

フラグ説明
--titleGIF タイトル (必須)
--commandデモされたコマンド
--tagsカンマ区切りのタグ
--description説明テキスト
--castasciinema v2 キャストファイルへのパス
--shell使用したシェル (bash、zsh、fish)
--visibilitypublic (デフォルト) または unlisted
--openアップロード後にブラウザで GIF ページを開く

キャストファイルと一緒にアップロード

キャストファイルを含めると、AI エージェント向けの機械可読レイヤーが有効になります:

agentgif upload demo.gif --cast demo.cast --title "Git Rebase" --tags git

VHS で録画

The Python CLI can record terminal sessions directly using VHS (must be installed separately).

# Record from a VHS tape file
agentgif record demo.tape --theme dracula

# Record and immediately upload
agentgif record demo.tape --upload --title "My Demo" --tags demo

録画オプション

フラグ説明
--themeTerminal theme (see themes)
--output出力ファイルパス (デフォルト: テープと同じ名前に .gif を付けたもの)
--upload録画後すぐにアップロード
--title自動アップロード用タイトル
--tags自動アップロード用タグ

VHS must be installed separately: brew install vhs (macOS) or see the recording guide.

すべての公開 GIF を検索:

agentgif search "docker compose"

出力はフォーマットされたテーブルで GIF ID、タイトル、コマンド、ビュー数を表示します。

検索フィルター

# Filter by tag
agentgif search "build" --tag docker

# Filter by shell
agentgif search "alias" --shell zsh

# Sort by views instead of relevance
agentgif search "git" --sort views

GIF を管理

自分の GIF を一覧表示

agentgif list
agentgif list --limit 50

GIF の詳細を表示

agentgif info xK9mQ2pL

GIF を編集

agentgif edit xK9mQ2pL --title "New Title" --tags git,rebase

GIF を削除

agentgif delete xK9mQ2pL
# → Are you sure? (y/N)

設定

CLI は設定を ~/.config/agentgif/config.json に保存します:

{
  "api_key": "ag_xxxxxxxxxxxx",
  "api_url": "https://agentgif.com/api/v1",
  "default_theme": "catppuccin-mocha",
  "default_shell": "zsh",
  "auto_open": false
}

環境変数

環境変数は設定ファイルの設定を上書きします:

変数説明
AGENTGIF_API_KEYAPI キー (設定を上書き)
AGENTGIF_API_URLAPI ベース URL
AGENTGIF_THEMEデフォルト VHS テーマ

CI/CD パイプラインで役立ちます:

AGENTGIF_API_KEY=${{ secrets.AGENTGIF_KEY }} agentgif upload dist/demo.gif --title "CI Build"