Guide
English
Search the docs⌘K
14.7

The CLI and open access

Beyond clicking around the canvas, DOTV's AI video generation also runs from a terminal: dotv is a command-line tool where every creation feature has a matching command — create projects and canvases, generate images, generate video, synthesize speech, look up models and their parameters, check your balance, manage keys and team spaces. Two ways people use it most: in bulk (one script covering dozens of shots) and letting an AI assistant do the work (install it as a skill and your agent can call it on its own). This section covers installing it, signing in, taking care of your keys, how commands are named, and spaces and credits.

Install it

Two ways to installInstall via an AI agent: hand that one prompt to your AI assistant and it installs the thing itself. This is the default tab.
1 / 2
The install card on /cli, with both routes laid out.

Open /cli — CLI in the left nav rail goes there too, in a new page — and take one of the two routes:

  • Install via an AI agent (the default tab) — copy the prompt on the card over to your AI assistant (Claude Code, Cursor and Codex all work) and it installs the skill for you.
  • Install by hand — two steps: run the npm command on the card, then sign in as described in the next section.

It ships as an npm package, so step one is the same command on every platform, as long as the machine has Node.js 20 or later:

npm i -g @dotv/cli

Doing it by hand installs the commands and nothing else. One more command installs the manual that describes them — it lands in ~/.claude/skills, which is where your AI assistant learns this command surface from (add --dir .claude/skills to install into the current project instead):

dotv skill install

The same command is also how you update the manual: when your copy is already current it writes nothing at all. Upgrading the CLI does not refresh it — so when the copy on your machine falls behind, dotv prints a line about it on your next command. Once it's installed, remember to restart your AI assistant so it picks up the new skill.

Sign in

Approving a deviceThe device code flow gives you a URL, and opening it on any machine with a browser lands you here. Check this code against the one in your terminal, then approve. If they do not match, hit Not me.
The screen you approve on, in a browser.

There's no browser in a terminal, and you shouldn't have to type your password into one, so this goes by device code — but the only thing you type is:

dotv login

It prints a URL carrying a short code and tries to open your browser for you. Check that the code on screen is the same string as the one in your terminal, and approve. You can open that URL on any machine that has a browser — which is exactly why this flow exists: a command line running on a server has no browser at all.

Once you approve, there is nothing left to do: it trades the session token for a long-lived key on its own and stores it in ~/.dotv/ (mode 0600), and every command uses that key from then on. (If an agent or CI needs to drive the device flow by hand, the four steps and the four polling outcomes are in auth.md.)

Take care of your keys

The key dotv login issues lives only in your own machine's ~/.dotv/; what we store is a hash of it.

  • It doesn't stop working when you sign out on the web, and it doesn't expire on its own.
  • dotv api-key list lists the ones you've issued (prefixes only, never the original), and dotv api-key delete --id <id> revokes one — revoking takes effect immediately, with no grace period and no undo.
  • dotv whoami tells you which site this machine talks to and which key it's using, and checks with the server there and then that the key still counts.
  • dotv logout only removes the copy stored on this machine from ~/.dotv/; the key itself stays valid — to kill it, use api-key delete above.
  • On another machine, run dotv login again; CI has no browser for the device flow, so hand it a ready-made key through the DOTV_API_KEY environment variable.

A key always belongs to you alone; nobody else on your team can see it. There is no way to create one on the web — this is a command-line-only thing.

Plug it into your AI assistant (MCP)

Besides installing it as a skill so an assistant types commands from the manual, dotv can run as an MCP server in its own right: Claude Code, Codex, Claude Desktop, Cursor and any other MCP-capable app use it as a tool directly, with no terminal in between.

dotv mcp --print-config
claude mcp add "dotv" -- npx -y @dotv/cli mcp

The first prints the snippet to paste into each app's config; the second is the one-liner for Claude Code. Once connected the assistant gets three tools — dotv (run one command, written exactly as on the command line), dotv_help (look up the reference) and dotv_wait (wait for a batch of nodes to finish generating) — and the manual itself is exposed as resources, so there is no skill to install. It uses the key dotv login stored; nothing else to configure.

With the desktop app open, nodes the assistant creates and projects it switches happen on the canvas in front of you, no different from your own clicks. Credit-consuming operations follow the confirmation rules in Agent settings — the assistant asks you there, rather than popping a window out of a minimized app. The first time a client connects, the desktop asks whether to allow it, and remembers the answer; Agent settings lists every connected client, and you can turn any one off.

Everything the assistant does also enters the canvas's Agent timeline: what it did, which node it changed and whether a generation finished are visible back on the canvas, and your other signed-in devices get a notification. With the desktop app closed, results are still saved to the cloud project and appear when you return to the canvas.

Give the assistant its own key with a cap; spending stops when the cap is reached:

dotv api-key post --name "claude-code" --budget-credits 500

How commands are named

dotv

The group says what the command works with, and the action says what it does: dotv canvas list, dotv generate post-image, dotv model. Option names are the field names with camelCase turned into hyphens: canvasId → --canvas-id.

The full reference is the lower half of the /cli page: which options each command takes, of what type, required or not, and what it returns (you can also open the command reference). This section doesn't repeat it — the command reference stays current with the CLI.

Looking up models and params

Two commands worth a look before you write a batch script:

  • dotv model (or dotv model list) — the models currently available: key, canonical name, and which node type they hang on. Add --node-type video to see one kind, or --keyword kling to filter by name.
  • dotv model --key <key> — which params this one model takes: each parameter's type, allowed values / range, default, and whether it's required — ready to copy into sync's data, or post-generate's --params (a one-off override).

The list is the same one as the model dropdown on the web composer's input bar (models and pricing in 14.8): what you can't pick in the interface, you won't find here either.

Spaces and credits

What the command line sees is scoped the same way (see 14.2):

  • no space argument = your personal space;
  • with --x-team-id <team id> = that team's space (the team ID is in the three-dot menu at the right end of the header in team management; one click copies it).

Generating from the command line comes out of the same wallet, priced exactly as on the web (see 14.8). Three commands help you reconcile:

  • dotv credits wallet — balance and history. The balance is the sum of the three buckets, and the response also reports the general bucket on its own (what the buckets are: 14.3);
  • dotv credits estimate — ask the price before deciding to run, and ask for a batch at once (pricing a whole shot sheet of dozens of shots in one go is the normal use);
  • dotv membership — what tier this space is on, until when, how many credits a month, and how many tasks it can run at once.

Every command takes --json, so the output can be piped straight into the next program.

Try it in DOTVReading only goes so far: open DOTV and make an AI video with the feature this section covers.