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 cast 파일 경로
--shell사용된 셸 (bash, zsh, fish)
--visibilitypublic (기본값) 또는 unlisted
--open업로드 후 브라우저에서 GIF 페이지 열기

Cast 파일과 함께 업로드

cast 파일을 포함하면 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 확장자의 tape와 같은 이름)
--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"