> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vidguy.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI

> Run VidGuy from your terminal or a coding agent with the vidguy command.

The `vidguy` CLI wraps the API in short commands. It is handy in scripts, in CI and inside coding agents, and it waits for jobs for you. It uses the same `vf_live_` key and spends the same credits.

## Install

Needs Node.js 18 or newer.

```bash npx theme={null}
npx @vidguy_ai/cli --help
```

```bash npm theme={null}
npm i -g @vidguy_ai/cli
```

## Sign in

```bash theme={null}
vidguy auth login     # paste your vf_live_ key, saved to ~/.config/vidguy/config.json
vidguy auth whoami    # shows your plan and credit balance
```

In CI or an agent, set the key as an environment variable instead:

```bash theme={null}
export VIDGUY_API_KEY=vf_live_YOUR_KEY
```

## Commands to start with

**Check your credits**

```bash theme={null}
vidguy credits get
```

**Make a video and wait for it**

```bash theme={null}
vidguy --json --wait video create --topic "3 standup tips" --duration 30 --platform tiktok
```

**Make a snack pack for a brand**

```bash theme={null}
vidguy brand create --name "Acme" --industry "SaaS" \
  --description "Acme builds time tracking software for remote teams."
vidguy --json --wait snack create --brand <brandId> --render
```

**Check on any job**

```bash theme={null}
vidguy job get <jobId>
```

Run `vidguy capabilities` to see every command group.

## Useful flags

* **`--json`** prints machine readable output you can pipe to `jq`.
* **`--wait`** polls the job until it finishes.
* **`--yes`** skips the confirm on commands that spend credits or delete things. Scripts need it.

> [!WARNING]
>
> `vidguy social post` and `vidguy social retry` publish to live accounts. They are never retried for you. Do not run them twice for the same content.

## Exit codes

| Code | Meaning |
| - | - |
| `0` | OK |
| `1` | Something went wrong |
| `2` | Wrong usage |
| `3` | Key problem (`401`) |
| `4` | Plan has no API access (`403`) |
| `5` | Rate limited (`429`) |
| `6` | Not enough credits (`402`) |
| `7` | Not found (`404`) |

## Use it from a coding agent

The package ships a `SKILL.md` with recipes and the full command list. Copy it into your agent's skills folder, for example `.claude/skills/vidguy/SKILL.md`, and the agent can drive the CLI on its own. If your agent speaks MCP, you can also connect it to the [MCP server](https://docs.vidguy.ai/mcp/introduction.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.