---
title: Environment variables
description: The environment variables the invideo CLI and its install script read, and where the CLI keeps your sign-in.
---
The invideo CLI reads a few environment variables. Set them once in your shell or your CI job, instead of passing a flag on every command:

```bash
export INVIDEO_AS=scout
export INVIDEO_JSON=1
invideo project list
```

## Variables

Each variable below appears in the CLI's own help or in its install notes.

| Variable | What it does | Same as |
| --- | --- | --- |
| `INVIDEO_AS` | The name you registered in a project with `invideo agent register`. Every project command uses it. | `--as <name>` |
| `INVIDEO_JSON` | Set to `1` to print every answer as one JSON object, `next` included. | `--json` |
| `INVIDEO_NO_BROWSER` | Set to `1` to sign in with a device code. `invideo auth login` prints a link and a code, then waits for the approval. | None |
| `INVIDEO_INSTALL_DIR` | The folder the install script writes the binary to. | None |
| `INVIDEO_VERSION` | The release the install script installs. | None |

## INVIDEO_AS

Several agents can work in one project. Each one takes a name with `invideo agent register`, and people watching see who did what. Pass the name with `--as`, or set `INVIDEO_AS` once. Without it, a command acts as `invideo-cli-<username>`, which every unnamed command of yours shares.

```bash
invideo agent register <project-url> --name scout
export INVIDEO_AS=scout
invideo edit show <edit-url>
```

`<project-url>` comes from `invideo project new` or `invideo project list`. `<edit-url>` comes from `invideo edit new`.

## INVIDEO_JSON

With `INVIDEO_JSON=1`, every command prints its whole answer as one JSON object on stdout, for `jq`. Errors and notices still go to stderr. Without it, an answer is indented `key: value` text.

```bash
INVIDEO_JSON=1 invideo project list | jq -r '.projects[].url'
```

## INVIDEO_NO_BROWSER

`invideo auth login` opens a browser on this machine and waits for you to sign in. Where no browser can open, such as over ssh, in a container or on a cloud machine, set `INVIDEO_NO_BROWSER=1`. The command then prints a link and a code at once. Open the link on another device and enter the code. This signs in the CLI only. It does not sign in an MCP connection.

```bash
INVIDEO_NO_BROWSER=1 invideo auth login
```

Run it in the background or with a long timeout, since it waits for the approval. Your agent sends you the link and the code in one message. It never asks you for a password or for the code back.

## INVIDEO_INSTALL_DIR and INVIDEO_VERSION

The install script writes one file. On macOS and Linux it is `~/.local/bin/invideo`. On Windows it is `%LOCALAPPDATA%\invideo\bin\invideo.exe`. `INVIDEO_INSTALL_DIR` picks another folder, and `INVIDEO_VERSION` picks another release.

```bash
curl -fsSL https://agents.invideo.io | INVIDEO_INSTALL_DIR="$HOME/bin" sh
```

If the folder is not on your `PATH`, the script says so. Run the binary by its full path, or add the folder to `PATH`.

## Where the CLI keeps your sign-in

The CLI keeps your sign-in on this machine, outside your project folders, and `invideo auth logout` forgets it. There are no API keys and no key variable to set. `invideo auth status` shows who is signed in. `invideo auth logout` forgets this machine's sign-in.

## Related

- [CLI commands and flags](/reference/cli)
- [Exit codes](/reference/exit-codes)
- [Sign in, device codes and sessions](/account/sign-in)
- [Run invideo in CI and on servers](/how-to/ci-and-servers)