Skip to main content

The Command Line

Updated

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, then run:

    npm install -g maeve-cli

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

  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 fifteen more, mostly inbox actions and client review sends.

Runs on the first press

  • content:delete
  • media:delete
  • media:bulk-archive
  • media:bulk-move
  • media:bulk-restore
  • media:folders:delete
  • hashtags:delete
  • grid:reorder
  • campaigns:phases:replace

Deleting a post is here, not on the left.

Twenty-seven commands refuse to run without --yes. Deleting a post is not one of them, so the flag is a courtesy on the commands that have it rather than a rule across the tool.

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 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 or End a Login

CommandPurpose
maeve auth:statusInspect local credential configuration
maeve auth:whoamiAsk the server which account is authenticated
maeve auth:logoutSign 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.

Questions

How do I install the Maeve CLI?

Install Node.js 22 or newer and run npm install -g maeve-cli. You can also 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 can be used if no key is found.

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.