Documentation Index
Fetch the complete documentation index at: https://docs.varg.ai/llms.txt
Use this file to discover all available pages before exploring further.
The varg CLI provides commands for authentication, rendering, and quick generation.
Installation
The CLI is included with the vargai package:
Or use directly with bunx:
Authentication Commands
Login
Sign in to varg.ai and save your API key:
Two modes:
- Email — enter email, receive a 6-digit code, verify. Creates account + API key automatically.
- API key — paste an existing key from the dashboard.
Credentials are saved to ~/.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:
This runs login (if needed), installs the varg-ai Agent Skill, creates hello.tsx, output directories, and .gitignore.
Create Hello World
Generate the hello world starter:
Creates hello.tsx with a minimal working example.
Render Video
Render a TSX file to video:
bunx vargai render <file.tsx>
Options:
| 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 |
Examples:
bunx vargai render video.tsx --preview # Free preview
bunx vargai render video.tsx --verbose # Full render
bunx vargai render video.tsx -o output/my-video.mp4 -v
bunx vargai render video.tsx --no-cache # Force regeneration
# Background rendering
nohup bunx vargai render video.tsx --verbose > output/render.log 2>&1 &
Generation Commands
Run individual generation actions:
bunx vargai run <action> [options]
Generate Image
bunx vargai run image --prompt "sunset over mountains"
bunx vargai run image --prompt "cute cat" --model nano-banana-pro --aspect-ratio 16:9
| 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
bunx vargai run video --prompt "ocean waves" --duration 5
bunx vargai run video --prompt "cat waving" --image media/cat.jpg --duration 5
| 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
bunx vargai run voice --text "Hello world" --voice rachel
| Flag | Description | Default |
|---|
--text, -t | Text to speak | required |
--voice, -v | Voice name | rachel |
--model, -m | TTS model | - |
--output, -o | Output path | - |
Generate Music
bunx vargai run music --prompt "upbeat electronic" --duration 30
Transcribe Audio
bunx vargai run transcribe audio.mp3
List Actions
Environment
The CLI reads VARG_API_KEY from:
- Environment variable:
export VARG_API_KEY=varg_xxx
.env file: VARG_API_KEY=varg_xxx
- Global credentials:
~/.varg/credentials
Default
[image] Generating with nano-banana-pro...
[image] Generated: output/image.png
Quiet (--quiet)
JSON (--json)
{
"url": "output/image.png",
"model": "nano-banana-pro",
"prompt": "sunset over mountains",
"duration_ms": 2340
}