Installation
The CLI is included with thevargai package:
bunx:
Authentication Commands
Login
Sign in to varg.ai and save your API key:- Email — enter email, receive a 6-digit code, verify. Creates account + API key automatically.
- API key — paste an existing key from the dashboard.
~/.varg/credentials.
Logout
Clear saved credentials:Check Balance
View your credit balance:Top Up
Open the billing page to add credits:Project Commands
Initialize Project
Set up a new varg project:hello.tsx, output directories, and .gitignore.
Create Hello World
Generate the hello world starter:hello.tsx with a minimal working example.
Render Video
Render a TSX file to video:| Flag | Description | Default |
|---|---|---|
--output, -o | Output file path | output/video.mp4 |
--preview | Free preview with placeholders | - |
--verbose, -v | Show detailed progress | - |
--no-cache | Skip cache (regenerate everything) | - |
--cache | Cache directory | .cache/ai |
Generation Commands
Run individual generation actions:Generate Image
| Flag | Description | Default |
|---|---|---|
--prompt, -p | Image description | required |
--model, -m | Model name | nano-banana-pro |
--aspect-ratio, -a | Output ratio | 1:1 |
--output, -o | Output path | - |
Generate Video
| Flag | Description | Default |
|---|---|---|
--prompt, -p | Video description | required |
--image, -i | Input image (image-to-video) | - |
--duration, -d | Duration in seconds | 5 |
--model, -m | Model name | kling-v3 |
--output, -o | Output path | - |
Generate Voice
| Flag | Description | Default |
|---|---|---|
--text, -t | Text to speak | required |
--voice, -v | Voice name | rachel |
--model, -m | TTS model | - |
--output, -o | Output path | - |
Generate Music
Transcribe Audio
List Actions
Environment
The CLI readsVARG_API_KEY from:
- Environment variable:
export VARG_API_KEY=varg_xxx .envfile:VARG_API_KEY=varg_xxx- Global credentials:
~/.varg/credentials