Skip to Content
agentic-yt

Quickstart

Install the CLI, sign in, and get a transcript, an MP3, a clip and a frame in five minutes.

1. Install the CLI

npm install -g agentic-yt

That installs one program under two names: agentic-yt and the short alias ayt, which these docs use throughout. To try it without installing, npx agentic-yt --help. A standalone binary (no Node required) is available too:

curl -fsSL https://raw.githubusercontent.com/crafter-station/agentic-yt/main/install.sh | sh

2. Sign in

ayt login

It prints a short code and opens the dashboard. Confirm the code there and the terminal is signed in — the token is saved to ~/.agentic-yt/config.json. Check with ayt whoami.

For CI, containers and agent sandboxes, skip the browser: create a token under Dashboard → Tokens and export it.

export AGENTIC_YT_TOKEN=ayt_pat_…

More in Authentication.

3. Give your agent the skill

npx skills add crafter-station/agentic-yt

Optional, but it is the difference between an agent that reads --help on every turn and one that already knows the surface. See Agent skills.

4. Ask for things

Every <ref> below can be a video id or any YouTube URL.

# Find a video
ayt search "never gonna give you up" --limit 3

# Read about it
ayt video dQw4w9WgXcQ --json

# Read what is said in it
ayt transcript dQw4w9WgXcQ --format txt

# Take the audio
ayt download dQw4w9WgXcQ --audio --format mp3 -o song.mp3

# Take forty seconds of video
ayt clip dQw4w9WgXcQ --start 1:30 --end 2:10 -o clip.mp4

# Look at one moment
ayt frames dQw4w9WgXcQ --at 0:42 -o shots/

download, clip and frames block until the file is on disk. Run the same command twice and the second run is a cache hit: nothing is fetched from YouTube again.

The same thing over HTTP

curl "https://api.agentic-yt.crafter.run/v1/videos/dQw4w9WgXcQ/transcript?format=txt" \
  -H "Authorization: Bearer $AGENTIC_YT_TOKEN"

A job that finishes inside wait answers 200 with status: "succeeded" and the files under result.assets[].url. One that is still running answers 202; keep waiting on its poll_url. Jobs and long-polling has the loop.

When something fails

The response is always { "error": { "code", "message", "hint", "docs_url" } }. Branch on code, follow hint. Errors lists the right move for every code.

On this page