# The Advibly CLI

> Advibly from a terminal - install, log in, and make something.

Source: https://advibly.com/docs/cli



`advibly` is Advibly from a shell script. Every command is a tool of the
[MCP server](/agents/mcp), so anything an agent can do, you can do from a
terminal: brands, assets, image, video and audio generation, projects, social
publishing.

Use the CLI when a workflow starts with local files, must write results to
disk, or belongs in a script. Use MCP directly when the work is being planned
and reviewed inside an agent conversation.

## Install [#install]

```bash
npm i -g advibly
```

Or run it without installing:

```bash
npx advibly <command>
```

Needs Node 20 or later, and an Advibly account.

## Connect [#connect]

```bash
advibly login
```

This opens a browser for the same OAuth flow Claude Code and Cursor use. Tokens
are stored in `~/.config/advibly` with owner-only permissions. There is no API
key to manage.

```bash
advibly whoami     # confirm who you are signed in as
advibly logout     # sign out of this server (--all for every profile)
```

The connection is ready when `advibly whoami` prints the intended account and
`advibly list-brands` returns its brands.

## Make something [#make-something]

```bash
advibly list-brands
advibly config set brand_id <id>
advibly generate-image --prompt "..." --aspect-ratio 4:5
```

Setting `brand_id` as a default once saves passing it to every subsequent
command. See [Configuration](/cli/configuration).

The generation command waits for a terminal result by default. A successful
run ends with exit code `0` and prints the completed result; use `--json` when a
script will consume it.

## Move files [#move-files]

The two things a CLI can do that an agent cannot:

```bash
advibly upload ./product.png              # local file -> brand asset library
advibly download <generation-id> -o ./out # results -> disk
```

## It is an MCP client, not a second API [#it-is-an-mcp-client-not-a-second-api]

The CLI speaks to `https://advibly.com/mcp` and turns the server's `tools/list`
into subcommands. `advibly_generate_image` becomes `advibly generate-image`,
and each argument becomes a flag (`brand_id` → `--brand-id`).

The practical consequence: &#x2A;*a new tool becomes a new command with no CLI
upgrade.** The list is refreshed on login and with `advibly tools --refresh`.

## Credits [#credits]

Generation commands spend the connected account's credits. Read-only and
organisational MCP tools do not.

```bash
advibly check-credits
advibly buy-credits
```

Before a batch, check the balance once and estimate the number of billable
generation calls. A failed or rejected generation is refunded automatically.
