본문으로 건너뛰기
cccskills
무료GitHub에 공개

heygen-cli

Create AI videos, manage avatars, translate videos, and download results via the HeyGen API. Use when an agent needs to generate videos from text prompts, create avatar-based videos, translate existing videos, or automate video production workflows.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(200)

  • SKILL.md8.1 KB
  • .agents/skills/changelog-cli/SKILL.md4.0 KB
  • .agents/skills/e2e-cli-test/SKILL.md9.5 KB
  • .agents/skills/README.md1.5 KB
  • .agents/skills/release-cli/SKILL.md7.3 KB
  • .gitattributes19 B
  • .github/dependabot.yml324 B
  • .github/GIT_CONVENTIONS.md1.6 KB
  • .github/ISSUE_TEMPLATE/bug.yml1015 B
  • .github/ISSUE_TEMPLATE/config.yml28 B
  • .github/ISSUE_TEMPLATE/feature.yml637 B
  • .github/PULL_REQUEST_TEMPLATE173 B
  • .github/scripts/check_pr_template.py1004 B
  • .github/scripts/cleanup-failed-release.sh3.3 KB
  • .github/scripts/find-run-draft.sh736 B
  • .github/scripts/install-goreleaser.sh792 B
  • .github/workflows/ci.yml8.6 KB
  • .github/workflows/dev-release.yml6.4 KB
  • .github/workflows/release-stable.yml10.0 KB
  • .gitignore85 B
  • .gitleaks.toml194 B
  • .golangci.yml908 B
  • .goreleaser.yaml999 B
  • AGENTS.md7.9 KB
  • cmd/heygen/aliases_brandkit_test.go1.1 KB
  • cmd/heygen/aliases_test.go3.2 KB
  • cmd/heygen/aliases.go3.9 KB
  • cmd/heygen/auth_login_device_test.go8.1 KB
  • cmd/heygen/auth_login_dispatch_test.go15.1 KB
  • cmd/heygen/auth_login_friendly_test.go7.7 KB
  • cmd/heygen/auth_login_oauth_test.go46.9 KB
  • cmd/heygen/auth_login_picker_test.go5.0 KB
  • cmd/heygen/auth_login_picker.go5.9 KB
  • cmd/heygen/auth_login.go40.7 KB
  • cmd/heygen/auth_logout_test.go5.6 KB
  • cmd/heygen/auth_logout.go4.0 KB
  • cmd/heygen/auth_status_friendly_test.go6.4 KB
  • cmd/heygen/auth_status_oauth_test.go8.6 KB
  • cmd/heygen/auth_status_test.go14.1 KB
  • cmd/heygen/auth_status.go8.6 KB
  • cmd/heygen/auth_test.go4.8 KB
  • cmd/heygen/auth.go2.0 KB
  • cmd/heygen/builder_test.go44.1 KB
  • cmd/heygen/builder.go16.8 KB
  • cmd/heygen/columns_test.go2.4 KB
  • cmd/heygen/columns.go4.6 KB
  • cmd/heygen/config_cmd_test.go6.3 KB
  • cmd/heygen/config_cmd.go4.1 KB
  • cmd/heygen/confirm_test.go1.0 KB
  • cmd/heygen/confirm.go861 B
  • cmd/heygen/context_test.go4.9 KB
  • cmd/heygen/context.go5.9 KB
  • cmd/heygen/deprecated_flags_test.go7.3 KB
  • cmd/heygen/feedback_test.go3.5 KB
  • cmd/heygen/feedback.go2.8 KB
  • cmd/heygen/formatter_select.go1.2 KB
  • cmd/heygen/generated_example_flags_test.go8.9 KB
  • cmd/heygen/generated_examples_test.go488 B
  • cmd/heygen/generated_root_test.go13.3 KB
  • cmd/heygen/go_version_pin_test.go4.8 KB
  • cmd/heygen/headers_test.go2.2 KB
  • cmd/heygen/help_flatten.go4.8 KB
  • cmd/heygen/hidden_commands_test.go2.5 KB
  • cmd/heygen/idempotency_key_test.go2.3 KB
  • cmd/heygen/instant_video_test.go2.7 KB
  • cmd/heygen/main_test.go3.3 KB
  • cmd/heygen/main.go4.7 KB
  • cmd/heygen/poll_configs_test.go470 B
  • cmd/heygen/poll_configs.go1.7 KB
  • cmd/heygen/root_test.go1.3 KB
  • cmd/heygen/root.go9.0 KB
  • cmd/heygen/testutil_test.go3.6 KB
  • cmd/heygen/timeouts_test.go1.5 KB
  • cmd/heygen/timeouts.go2.1 KB
  • cmd/heygen/update_notice_test.go20.3 KB
  • cmd/heygen/update_notice_unix.go1.3 KB
  • cmd/heygen/update_notice_windows.go1008 B
  • cmd/heygen/update_notice.go11.3 KB
  • cmd/heygen/update_test.go20.4 KB
  • cmd/heygen/update.go11.1 KB
  • cmd/heygen/video_download_test.go20.9 KB
  • cmd/heygen/video_download.go8.8 KB
  • cmd/heygen/video_list_test.go7.0 KB
  • CODE_OF_CONDUCT.md5.4 KB
  • codegen/examples_test.go1.6 KB
  • codegen/examples.go2.5 KB
  • codegen/examples/ai-clipping.yaml509 B
  • codegen/examples/asset.yaml2.8 KB
  • codegen/examples/audio.yaml453 B
  • codegen/examples/avatar.yaml1.8 KB
  • codegen/examples/background-removal.yaml1.1 KB
  • codegen/examples/batch.yaml855 B
  • codegen/examples/brand.yaml3.4 KB
  • codegen/examples/filler-word-removal.yaml1.3 KB
  • codegen/examples/folder.yaml222 B
  • codegen/examples/lipsync.yaml1.5 KB
  • codegen/examples/model.yaml2.3 KB
  • codegen/examples/template.yaml1.9 KB
  • codegen/examples/user.yaml92 B
  • codegen/examples/video-agent.yaml1.4 KB
  • codegen/examples/video-translate.yaml3.3 KB
  • codegen/examples/video.yaml2.3 KB
  • codegen/examples/voice.yaml1.4 KB
  • codegen/examples/webhook.yaml1.1 KB
  • codegen/generate_test.go2.8 KB
  • codegen/generate.go3.7 KB
  • codegen/grouper_test.go32.4 KB
  • codegen/grouper.go33.1 KB
  • codegen/main.go2.4 KB
  • codegen/schema_test.go6.0 KB
  • codegen/schema.go4.7 KB
  • codegen/surface_allowlist_test.go12.6 KB
  • codegen/templates/command.go.tmpl1.5 KB
  • codegen/templates/registry.go.tmpl723 B
  • codegen/testdata/golden/registry.go587 B
  • codegen/testdata/golden/upload.go1020 B
  • codegen/testdata/golden/widget.go6.6 KB
  • codegen/testdata/mini_spec.json8.3 KB
  • codegen/testdata/test_examples.yaml999 B
  • codegen/testdata/test_spec.yaml9.1 KB
  • CONTRIBUTING.md8.0 KB
  • docs/demo.gif86.3 KB
  • docs/demo.tape934 B
  • gen/ai-clipping.go25.9 KB
  • gen/asset.go40.1 KB
  • gen/audio.go5.1 KB
  • gen/avatar.go70.4 KB
  • gen/background-removal.go14.3 KB
  • gen/brand.go55.6 KB
  • gen/filler-word-removal.go10.5 KB
  • gen/folder.go8.9 KB
  • gen/lipsync.go38.9 KB
  • gen/model.go44.4 KB
  • gen/registry.go4.2 KB
  • gen/template.go319.3 KB
  • gen/user.go5.3 KB
  • gen/video-agent.go34.8 KB
  • gen/video-translate.go84.9 KB
  • gen/video.go322.3 KB
  • gen/voice.go28.8 KB
  • gen/webhook.go23.3 KB
  • go.mod2.7 KB
  • go.sum14.8 KB
  • internal/analytics/analytics_test.go22.3 KB
  • internal/analytics/analytics.go12.3 KB
  • internal/auth/chain_resolver_test.go4.3 KB
  • internal/auth/chain_resolver.go3.1 KB
  • internal/auth/chain_typed_test.go5.6 KB
  • internal/auth/constants.go822 B
  • internal/auth/credential.go2.2 KB
  • internal/auth/credentials_file.go4.1 KB
  • internal/auth/env_resolver_test.go805 B
  • internal/auth/env_resolver.go984 B
  • internal/auth/file_resolver_test.go14.0 KB
  • internal/auth/file_resolver.go12.0 KB
  • internal/auth/file_store_test.go7.5 KB
  • internal/auth/file_store.go1.2 KB
  • internal/auth/not_configured.go196 B
  • internal/auth/oauth_store.go6.8 KB
  • internal/auth/oauth/browser_test.go5.3 KB
  • internal/auth/oauth/browser.go3.7 KB
  • internal/auth/oauth/device_test.go8.2 KB
  • internal/auth/oauth/device.go7.1 KB
  • internal/auth/oauth/loopback_test.go10.7 KB
  • internal/auth/oauth/loopback.go12.1 KB
  • internal/auth/oauth/oauth_test.go21.2 KB
  • internal/auth/oauth/oauth.go20.0 KB
  • internal/auth/oauth/pkce_test.go1.9 KB
  • internal/auth/oauth/pkce.go1.4 KB
  • internal/auth/oauth/tokens_test.go1.9 KB
  • internal/auth/oauth/tokens.go2.0 KB
  • internal/auth/resolver.go1.1 KB
  • internal/auth/store.go143 B
  • internal/auth/user_store_test.go9.0 KB
  • internal/auth/user_store.go4.3 KB
  • internal/client/client_test.go8.6 KB
  • internal/client/client.go20.1 KB
  • internal/client/executor_test.go37.9 KB
  • internal/client/executor.go20.3 KB
  • internal/client/oauth_transport_test.go31.6 KB
  • internal/client/retry_test.go11.8 KB
  • internal/client/retry.go5.4 KB
  • internal/command/hidden.go1.3 KB
  • internal/command/spec_test.go18.5 KB
  • internal/command/spec.go13.3 KB
  • internal/config/config.go953 B
  • internal/config/env_provider_test.go1.6 KB
  • internal/config/env_provider.go1.4 KB
  • internal/config/file_provider_test.go4.2 KB
  • internal/config/file_provider.go1.7 KB
  • internal/config/layered_provider_test.go3.2 KB
  • internal/config/layered_provider.go1.6 KB
  • internal/errors/api_error.go334 B
  • internal/errors/codes_test.go7.9 KB
  • internal/errors/codes.go2.6 KB
  • internal/errors/errors_test.go12.8 KB
  • internal/errors/errors.go8.2 KB
  • internal/origin/origin_test.go6.5 KB
  • internal/origin/origin.go8.0 KB
  • internal/output/formatter.go1.6 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

HeyGen CLI

Official CLI for the HeyGen video generation API. 30+ commands auto-generated from the OpenAPI spec. All output is JSON by default.

For attended human setup in a remote/headless terminal, heygen auth login --device can provision the shared ~/.heygen/credentials OAuth session. Agents and CI must continue using HEYGEN_API_KEY; device login deliberately refuses unattended environments.

Key Commands

# Create video from prompt (simplest path — blocks until done)
heygen video-agent create --prompt "Make a 30-second product demo" --wait

# Create avatar video with full control
heygen video create -d '{"type":"avatar","avatar_id":"josh_lite","script":"Hello world","voice_id":"en_male"}'

# Check video status
heygen video get <video-id>

# Download completed video
heygen video download <video-id>

# Check for and install a newer release
heygen update

# Verify the active credential; API-key auth also returns its scopes and expiry
heygen auth status

# List resources
heygen video list --limit 5
heygen avatar list --limit 10
heygen voice list

# Translate a video
heygen video-translate create -d '{"video":{"type":"url","url":"https://..."},"output_languages":["es"]}'

Async Workflow

Video creation is asynchronous. Two patterns:

Block until done (recommended):

heygen video-agent create --prompt "Demo video" --wait
# stdout: final resource JSON with video_url when complete
# exit 4 on timeout — stdout has partial resource, stderr has the get command to poll manually

--wait exists only on some create commands. Check rather than assume: append --help to the exact command you intend to run, including any nested segments (e.g. heygen asset direct-uploads create --help), and use --wait only if that output lists it. Anything else needs manual polling.

Manual polling:

heygen video create -d '{"...}'       # stdout: JSON with video_id
heygen video get <video-id>           # stdout: JSON with status field
heygen video download <video-id>      # downloads file, stdout: JSON with path

Stop conditions — a poll loop MUST have all three:

  1. Poll the resource the create actually returned, and read its schema. The id in a create response may belong to another group, so that group's own get is not always the status command — a template render is polled with video get, not template get. Take the id from the create response, find the get that reads that resource, and run that exact command with --response-schema to see the status field's possible values.

    Do not assume the vocabulary. State names differ between resources and so do spellings (some use complete, others completed). Note also that the schema lists the values but usually does not say which ones mean "still working": a state that is really waiting on user action is enumerated exactly like an in-progress one. So continue polling only on a value you can positively confirm means in-progress, and treat everything else as terminal — including values you do not recognize and values whose meaning is ambiguous. Stop and report rather than spin.

  2. Stop on a terminal error — a non-zero exit is not "not ready yet". not_found / *_not_found (exit 1) means the id is wrong or the resource was deleted; it will never become ready. Same for unauthorized / forbidden (exit 3) and usage_error (exit 2). Retry only transient ones, with backoff: network_error, timeout (exit 4), rate_limit_exceeded, quota_exceeded, internal_error, unclassified_server_error.

    Retrying a create needs an idempotency key. A timed-out or 5xx create may already have been committed server-side, so a bare retry can bill a second resource. Generate one key per logical operation, pass it as --idempotency-key, and reuse that exact value on every retry of it: the server replays the original result rather than creating another. Replay lasts 24 hours, so a retry after that window creates and bills a second resource; reconcile instead of retrying if the original is older. A retry sent while the original is still in flight returns 409 request_in_progress, which means wait and poll, not retry again. Without a key, reconcile with the matching get/list before retrying. Only endpoints whose spec declares the header accept the flag, so check --help on the command. Keys are 1-255 characters from [A-Za-z0-9_:.-], and a UUID works:

    KEY=$(uuidgen)
    heygen video create -d '{...}' --idempotency-key "$KEY"   # retry with the same $KEY
    
  3. Cap the loop. Bound it by attempts or wall-clock and exit non-zero at the cap rather than looping forever.

Poll no faster than every 5-10s.

Discovering API Fields

Use --request-schema and --response-schema on any command to see the full JSON Schema. No auth required.

heygen video create --request-schema
heygen video-agent create --request-schema
heygen video get --response-schema

Output Contract

  • stdout: JSON (always). This is the only output agents should consume.
  • stderr: JSON error envelope on failure: {"error":{"code":"...","message":"...","hint":"...","doc_url":"...","param":"..."}} (hint/doc_url/param/request_id present when applicable)
  • Do not pass --human. It produces unstructured text that cannot be parsed.

Notes

  • The CLI automatically retries 429 and selected transient 5xx (500/502/503/504) on retry-eligible requests.
  • Diagnostics the CLI emits through its formatter go to stderr as one compact JSON envelope per line (JSON Lines, so parse line by line rather than as one document): {"error": {...}} on failure, {"warning": {"message"}} when the invocation was degraded or used a deprecated flag, and {"notice": {"code", "message"}} for informational messages. Only error affects the exit code, and stdout is unaffected by all three. Branch on notice.code, never on the prose. Dispatch on the top-level key you recognize and ignore kinds you do not, so a future diagnostic kind cannot break you. A single run can emit more than one line, for example a first-run notice followed by an error. Not everything on stderr is an envelope: interactive commands (auth login, destructive confirmations) write human prose there by design, so do not assume every stderr line parses.
  • Use heygen update to install a newer CLI release, or heygen update --check to report whether one exists without installing it. --check answers on stdout with update_available, current, latest, channel, install_method, and release_build. Branch on update_available, which means a newer release exists upstream, not that this install can fetch it: an install_method of homebrew or npm must update through that manager, and an empty one means the method could not be determined. When release_build is false the build is local and no update can be offered. Neither command needs an API key. If update_available is true, tell the user rather than updating unprompted: a new CLI version can change command output mid-task.
  • A release build may print {"notice": {"code": "cli_update_available", ...}} on stderr, at most once a day, when a newer stable release exists. Treat it like update_available: tell the user, do not update unprompted. It is off in CI and with HEYGEN_NO_UPDATE_CHECK=1.
  • Video download writes to {video-id}.mp4 by default. Override with --output-path. Errors if the file already exists; use --force to overwrite.
  • For the full API reference (concepts, limits, pricing), see https://developers.heygen.com

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Generate a user-facing changelog for the next stable release. Reads git log between the last stable tag and HEAD, categorizes changes, and outputs formatted release notes. Use before triggering a stable release. Takes the version as an optional argument (for example v0.0.6).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

heygen-com/heygen-cli1562026년 10월 19일 업데이트

End-to-end test of the heygen CLI against the live API. Builds the binary, then exercises auth, list, get, --human, schema, error handling, and the full create-poll-download-delete write path. Spends a small number of API credits per run. Use before cutting a stable release.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

heygen-com/heygen-cli1562026년 10월 19일 업데이트

Cut a stable (or dev) release of the heygen CLI end to end: run RELEASE.md's pre-release checklist, land pending PRs, check the command surface, run E2E, pick the version, write the changelog, trigger the release workflow, publish the notes, and verify the installer. Stops for the user at every decision. Use when asked to "cut a release", "ship a new version", or "release the CLI". Takes "stable" (the default) or "dev" as an optional argument.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

heygen-com/heygen-cli1562026년 10월 19일 업데이트

heygen-com의 스킬 모두 보기

이 스킬의 문제 신고