Skip to main content

Documentation Index

Fetch the complete documentation index at: https://developer.zapsterapi.com/llms.txt

Use this file to discover all available pages before exploring further.

The CLI is designed to be set up by an agent. Paste the block below into Claude Code, Codex, OpenClaw, or any agent that runs shell commands, and it will handle the rest:
You are going to set up the Zapster CLI (`@zapsterapi/cli`). Follow strictly, and stop immediately if any step fails.

1. Check Node.js 22+ is installed: `node --version`. If < 22, ask the user to upgrade and stop.
2. Install the CLI globally: `npm i -g @zapsterapi/cli`. If it fails with EACCES, suggest `sudo npm i -g @zapsterapi/cli` or an nvm-managed Node.
3. Confirm with `zapsterapi --version`.
4. Ask the user for a Zapster API token (they can generate one at https://app.zapsterapi.com/tokens). DO NOT assume any value.
5. Authenticate: `zapsterapi auth login --token <provided-token>`.
6. Validate with `zapsterapi auth whoami`. If it fails, ask for a new token and retry.
7. List instances: `zapsterapi instance list --json`. If empty, instruct the user to create one in the dashboard before continuing.
8. Confirm: "CLI configured. Ready to send messages."

After setup, use the CLI like this:

```bash
zapsterapi message send --recipient 5511999999999 --text "hello"
zapsterapi recipient fetch --recipient 5511999999999 --json
zapsterapi instance list --json
```

If the user has multiple accounts, pass `--profile <name>` to every command.

Why this works well with agents

  • JSON output for every command (--json). Agents prefer structured JSON over text parsing.
  • Stable error codes in the JSON envelope (error.code). The agent can branch on them without text heuristics.
  • Multi-profile via ~/.zapsterapi/credentials. Tokens never have to live in env vars or flags.
  • Privacy-safe telemetry that helps us improve the CLI without exposing user data.

Copy-paste shortcuts for agents

  • llms.txt (download): full docs index in llmstxt.org format, ready to drop in as initial context for any agent.
  • SKILL.md (copy-paste in the docs): a Claude Code-format skill — paste it at ~/.claude/skills/zapsterapi-cli/SKILL.md and the agent picks up the CLI conventions automatically.