Skip to content

SPREVA opens soon.

Join the waitlist and we'll email you once, when your account is ready.

No newsletter. Just one email when SPREVA opens.

Reference

CLI

SPREVA on the command line: for agents that work in a terminal, for scripts, and as a local MCP server for apps that only start servers on your machine.

Install

It needs Node.js 20 or later. Install it once:

Terminal
npm i -g @spreva/cli

Or run any command without installing it:

Terminal
npx -y @spreva/cli overview

Your API key

Create a key in SPREVA under Developer, then API keys, and put it in the environment the CLI runs in:

Terminal
export SPREVA_API_KEY=POST_API_KEY_...
export SPREVA_URL=https://dev-app.spreva.ai

SPREVA_URL points the CLI at another SPREVA address, such as a test one, and SPREVA_CONNECTOR=publishing limits it to SPREVA Publishing. Leave both out to use SPREVA with every tool.

Commands

spreva overview
The workspace at a glance: time zone and clock, what needs attention, what goes out next, accounts, queues and campaigns.
spreva search <query...> [key=value ...]
Finds posts, files, campaigns, accounts and more, by words or by what a picture shows.
spreva search "launch teaser"
spreva fetch <link-or-id>
Reads one thing in full from its link or id.
spreva tools
Lists the tools your key can call, with what each one takes.
spreva call <tool> [--json '<object>'] [key=value ...] [--raw]
Calls any tool, with its arguments as key=value pairs or as JSON, and prints its answer. It exits with 1 when the answer is an error.
spreva call save_post caption="Winter Blend is here" accounts=instagram when=draft request_id=wb-1
spreva docs [page]
Prints a page of SPREVA's reference for agents, such as what a network accepts.
spreva docs platforms/tiktok
spreva mcp [--publishing]
Runs a local MCP server over stdio that passes every call on to SPREVA, for apps that only start servers on your machine. --publishing uses SPREVA Publishing.
spreva skill install [--target <agent>] [--dir <path>]
Installs SPREVA's Agent Skill where your agent looks for skills. Without --target, it installs it for every agent it finds on this machine.
spreva skill install --target claude
spreva skill print
Prints the skill, to install it by hand.
spreva whoami
Shows the workspace and the connector your key reaches.
spreva doctor
Checks your key and the connection to SPREVA, and says what to fix.

As a local MCP server

spreva mcp speaks MCP over stdio. Add it to the configuration of an app that only starts local servers:

JSON
{
  "mcpServers": {
    "spreva": {
      "command": "npx",
      "args": [
        "-y",
        "@spreva/cli",
        "mcp"
      ],
      "env": {
        "SPREVA_API_KEY": "POST_API_KEY_...",
        "SPREVA_URL": "https://dev-app.spreva.ai"
      }
    }
  }
}

It lists the same tools as the connector URL, with the same permissions.

With the Agent Skill

spreva skill install puts SPREVA's Agent Skill where your agent looks for skills, so it knows when to use the CLI and how. See Agent Skill.

Check the setup

When something doesn't work, start here. It checks your key and the connection to SPREVA, and says what to fix.

Terminal
spreva doctor