---
title: "The Command Line | Maeve Social"
description: "Install the Maeve CLI, sign in, discover a workspace, and create a draft from a JSON file."
url: "https://maevesocial.com/guides/api-cli-and-mcp/the-command-line"
---

On this page

1. [Home](https://maevesocial.com/)
2. [Guides](https://maevesocial.com/guides)
3. [API, CLI and MCP](https://maevesocial.com/guides/api-cli-and-mcp)
4. The Command Line

# The Command Line

Updated September 16, 2026

Use the `maeve` command to work with your social content from a terminal or script. Data commands return JSON, which you can read directly or process in your own code.

## Install and Sign In

1. 1

   ### Install the CLI

   Install Node.js 22 or newer and maeve-cli 0.12.4 or newer:

   ```
   npm install -g maeve-cli@latest
   ```

   To run without a global installation, replace `maeve` in the examples with `npx maeve-cli@latest`.

   The CLI is a maintained REST client with 216 manually registered commands across 16 groups. It calls Maeve's `/v1` API and is not generated from the OpenAPI document.

2. 2

   ### Approve the login

   ```
   maeve auth:login
   ```

   Approve the code in the browser window. The approval code expires after ten minutes. If the terminal cannot open a browser, use `maeve auth:login --no-browser` and open the displayed sign-in URL yourself.

3. 3

   ### Verify your account

   ```
   maeve auth:whoami
   ```

   Check the returned account and workspace access before running other commands.

Terminal

$ maeve auth:login

The command. Nothing is interactive from here on.

Signing a terminal in. The silence in the third frame is real: the CLI prints nothing while it waits for you to approve, and waits a further beat after you have.

To approve a CLI login, you need organization Owner or Admin access, or a Manager role in at least one workspace. The login lasts seven days without automatic refresh. Run `maeve auth:login` again when it expires.

## Find Your Workspace and Channel

List your workspaces:

```
maeve workspaces:list
```

Copy the workspace ID you want to use, then list its connected accounts:

```
maeve integrations:list --workspace <workspaceId>
```

Check the selected account's publishing requirements:

```
maeve integrations:capabilities --workspace <workspaceId> --integration <integrationId>
```

Replace angle-bracket placeholders with IDs from the responses. If a capability includes an `optionKey`, use `integrations:options` to retrieve the available values before setting that field.

## Create a Draft

Save this example as `create-content.json`. Replace the example `integrationId` with the selected account's ID and write your caption.

```
{
  "integrationId": "00000000-0000-4000-8000-000000000001",
  "captions": {
    "canonical": "Our new opening hours start on Monday."
  },
  "intent": "draft"
}
```

Then run:

```
maeve content:create --workspace <workspaceId> --json create-content.json
```

`--json` takes a file path, not inline JSON. The `draft` intent saves content without scheduling or publishing it. Check the returned content ID and status, and use the returned `appUrl` to open the draft in Maeve.

The example supplies a caption only. Add any media and platform fields required for your chosen account before scheduling or publishing.

## Upload a Local File

```
maeve media:upload ./image.png --workspace <workspaceId>
```

The CLI accepts `.jpg`, `.jpeg`, `.png`, `.gif`, `.webp`, `.avif`, `.mp4`, and `.mov`. Use the uploaded media ID when attaching the file to content.

## Check Command Options

Commands use an area and action, such as `content:list` or `media:upload`. Most workspace commands require `--workspace`.

```
maeve --help
maeve content:create --help
```

Check a command's help before adding it to a script, particularly for commands that publish, delete, or send messages.

The --yes rail

$ maeve content:publish -w \<workspaceId> --id \<contentId>

content:publish requires --yes because it queues an external publish.

Stops without the flag

* content:publish
* content:published-caption
* content:request-approval
* client-reviews:send
* inbox:reply
* inbox:moderate
* media:delete-permanent
* media:bulk-delete
* tasks:delete
* campaigns:phases:delete
* grid:promote
* analytics:report

And twenty more, including inbox actions and client review sends.

Runs on the first press

* content:delete
* content:retry
* content:revert-to-draft
* media:delete
* media:restore
* media:bulk-move
* media:folders:delete
* media:labels:delete
* hashtags:delete
* grid:reorder
* campaigns:delete
* campaigns:phases:replace

Confirm risky work even when the CLI does not enforce the flag.

Thirty-two commands enforce --yes. The flag is not a complete safety boundary: content deletion has no CLI restore path, while media deletion moves items to the Bin for restoration until permanent deletion.

Some commands require `--yes` and fail without it. The CLI does not pause for an interactive confirmation. For example, `content:publish` requires `--yes` because it queues a post for publishing.

Not every mutation requires this flag. Commands such as `content:delete` and `media:delete` can run without it. Review the command and target IDs before executing them.

## Choose the Credential for a Script

For unattended jobs, configure a workspace-scoped [API key](https://maevesocial.com/guides/api-cli-and-mcp/api-keys) in `MAEVE_API_KEY`. You can name another variable with `--api-key-env <name>`.

The CLI checks an explicit `--api-key` first, then the named environment variable, or `MAEVE_API_KEY` when no named variable was requested. If no key is found, it can use a stored browser login.

Check named variables before running a job

If `--api-key-env` names an unset variable, the CLI fails instead of falling back to a stored browser login. Check that the variable is set and inspect `maeve auth:status` before running the job. Do not print the secret itself.

## Check or End a Login

| Command             | Purpose                                       |
| ------------------- | --------------------------------------------- |
| `maeve auth:status` | Inspect local credential configuration        |
| `maeve auth:whoami` | Ask the server which account is authenticated |
| `maeve auth:logout` | Sign out and remove the local login token     |

Local status does not confirm that a token is still accepted by the server. Use `auth:whoami` to check that.

To revoke a terminal remotely, open **Settings > Developer > Command line**, find its login, and revoke it. There are ten active CLI logins per person. If you sign out while offline, also revoke the login in Settings because the local logout may not have reached the server.

CLI and MCP sign-ins are separate

Signing into the CLI does not connect your AI client's MCP server. Signing out of either connection leaves the other unchanged.

## Questions

### How do I install the Maeve CLI?

Install Node.js 22 or newer and maeve-cli 0.12.4 or newer. Run npm install -g maeve-cli\@latest, or use npx maeve-cli\@latest.

### How do I sign in?

Run maeve auth:login and approve the code in your browser. Use --no-browser if you need to open the sign-in URL yourself.

### Why was my CLI login refused?

Approval requires organization Owner or Admin access, or a Manager role in at least one workspace.

### How long does a CLI login last?

Seven days. Run auth:login again when it expires.

### What does a command look like?

Use an area and action, for example maeve content:list --workspace \<workspaceId>. Data commands return JSON.

### How do I pass complicated input?

Save the payload in a JSON file and pass its path with --json. Use the command's --help output to check its options.

### Why does a command want --yes?

Some commands require explicit confirmation through --yes. Without it, they fail instead of showing an interactive prompt.

### Does every destructive command ask for --yes?

No. Check each command before running it. Some content and media deletion commands do not require --yes.

### Which credential does the CLI use?

An explicit --api-key takes priority, followed by the named environment variable or the default MAEVE\_API\_KEY variable. A stored browser login is used only when no explicit or named key source was requested and no default key is available.

### Does signing into the CLI connect my AI assistant?

No. The CLI and MCP use separate connections.

### Can the CLI upload files?

Yes. Use maeve media:upload \<file> --workspace \<workspaceId>. Supported extensions are jpg, jpeg, png, gif, webp, avif, mp4, and mov.

### How do I sign a terminal out remotely?

Open Settings > Developer > Command line, find the terminal login, and revoke it.

In Maeve Social

* [REST API](https://maevesocial.com/features/api)
* [CLI](https://maevesocial.com/features/cli)
* [MCP Server](https://maevesocial.com/features/mcp)
