CLI 설치 및 사용
AgentGIF CLI를 사용하면 터미널에서 터미널 GIF를 업로드하고, 녹화하고, 검색하고, 관리할 수 있습니다. 5가지 언어로 제공 — 스택에 맞는 것을 선택하세요.
설치
CLI는 모든 주요 패키지 레지스트리에 배포됩니다. 각 구현은 동일한 핵심 명령어를 제공합니다.
| 언어 | 설치 명령어 | 레지스트리 |
|---|---|---|
| Python | pip install agentgif | PyPI |
| Node.js | npm install -g @agentgif/cli | npm |
| Go | go install github.com/agentgif/cli@latest | pkg.go.dev |
| Rust | cargo install agentgif | crates.io |
| Ruby | gem install agentgif | RubyGems |
설치 확인:
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"
업로드 옵션
| 플래그 | 설명 |
|---|---|
--title | GIF 제목 (필수) |
--command | 시연된 명령어 |
--tags | 쉼표로 구분된 태그 |
--description | 설명 텍스트 |
--cast | asciinema v2 cast 파일 경로 |
--shell | 사용된 셸 (bash, zsh, fish) |
--visibility | public (기본값) 또는 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
녹화 옵션
| 플래그 | 설명 |
|---|---|
--theme | Terminal 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_KEY | API 키 (설정 재정의) |
AGENTGIF_API_URL | API 기본 URL |
AGENTGIF_THEME | 기본 VHS 테마 |
CI/CD 파이프라인에서 유용합니다:
AGENTGIF_API_KEY=${{ secrets.AGENTGIF_KEY }} agentgif upload dist/demo.gif --title "CI Build"