Skip to content
More

For agents

An agent or a CI can drive spredr just like you: every command answers in JSON, every error says how to fix it and the exit codes do not change. This page is what an agent needs to know.

the whole documentation

In a single text file

All of this documentation, in Markdown and in English, is at /llms-full.txt. The short index, with one link per page, is at /llms.txt.

terminal
$curl -fsSL https://spredr.cloud/llms-full.txt
mcp

spredr as your agent's own tools

spredr mcp turns the CLI into an MCP server, so Claude Code, Cursor or any client that speaks MCP can deploy, roll back, read logs and status, and set variables and domains on its own. It signs in the way this terminal does (spredr login, or SPREDR_TOKEN), and every tool answers with the same JSON a script gets.

terminal
$claude mcp add spredr -- spredr mcp
deploy · rollback · logs · status · releases · settings · vars · domains · agentsyour agentClaude Code, Cursor orany MCP clientMCPspredr mcpon your machine, signed inas this terminalwhat its token may doreaddeployfullhttpsspredrbuilds, runs and rescuesyour servicessigning in, signing out and deleting a service are not tools: they stay with a person
your agentClaude Code, Cursor or any MCP clientMCPspredr mcpon your machine, signed inas this terminalwhat its token may doreaddeployfullhttpsspredrbuilds, runs and rescues your servicessigning in, signing out and deleting aservice stay with a person

In Claude Desktop, Cursor and other desktop apps: add it to their MCP settings with spredr's full path, because those apps do not read your terminal's PATH. Put your user name in place of you; which spredr (or where spredr on Windows) gives the exact path.

mcp.json · spredr's full path
mac{"mcpServers":{"spredr":{"command":"/Users/you/.spredr/bin/spredr","args":["mcp"]}}}
linux{"mcpServers":{"spredr":{"command":"/home/you/.spredr/bin/spredr","args":["mcp"]}}}
win{"mcpServers":{"spredr":{"command":"C:/Users/you/AppData/Local/spredr/bin/spredr.exe","args":["mcp"]}}}
shipdeploy, rebuild, rollback, start, stop, create_service
watchlist_services, service_status, logs, build_log, releases, usage, risks, activity
configuresettings, vars_list, vars_set, vars_unset, domains_list, domain
agentsagents_list, agent_info, ask_agent, answer_question
The token decides what the tools can do: with a read token, deploy answers that it needs more access. Signing in, signing out and deleting a service are not tools: they stay with a person.
no browser

A token instead of spredr login

spredr login needs a person to approve it in the browser. For an agent, create a token in your account, under Tokens: you choose what it may do and until when (or no end), and it is shown once. Pass it in SPREDR_TOKEN.

terminal
$export SPREDR_TOKEN=<your token>
$spredr whoami --json
readLook only: services, state, logs, usage and activity.
deployWhat read does, plus deploying. It doesn't change variables, domains or services.
fullEverything, variables, domains and services too. No token can create or see other tokens.
Give each agent the smallest scope that works for it, and a token of its own: you can revoke it without touching the others.
json

Everything in JSON

With --json, every command prints one stable JSON object. While it follows something (a deploy, logs -f) it prints one per line. An error is JSON too, with three fields.

terminal
$spredr deploy mi-api --json
$spredr risks --json
errorWhat happened, in one sentence.
hintHow to fix it: the next step worth taking.
exitThe same code the command exits with.
exit codes

To decide without reading the text

0It worked.
1It failed: the deploy didn't go live, the network didn't answer, something broke.
2The command is wrong: a missing argument or a flag that does not exist.
3No permission: no token, it expired, its scope isn't enough or the approval was denied.
5It doesn't exist: the service, release or domain you named.
no prompts

So it never waits on a prompt

-y, --yesSkips confirmations. Never skips a browser approval.
rm --confirmspredr rm asks you to type the name; --confirm <service> gives it up front.
SPREDR_SERVICEThe service for every command, without typing it.
SPREDR_APIAnother control (local, staging).
SPREDR_SECRETS=fileKeeps the session in a file: for CI and containers with no keyring.
SPREDR_NO_BROWSER=1Never opens the browser.
SPREDR_NO_UPDATE_CHECK=1Doesn't check for new versions (with CI it doesn't either).
asking the CLI

The help for your version

spredr help <command> gives the exact flags and examples of the installed version, and spredr doctor checks what can go wrong on that machine.

terminal
$spredr help deploy
$spredr doctor --json