ranla-cli
v0.19.1
Published
Ranla CLI — drive Ranla from your terminal or coding agent: browser sign-in, Ranla's commands, approvals, and the email API
Maintainers
Readme
ranla-cli
Drive Ranla from your terminal or coding agent (Claude Code, Codex, Cursor…): sign in through the browser, run Ranla's commands, handle approvals, and send email with the Ranla API.
npx -y ranla-cli@latest login # prints a link: approve it in the browser
npx -y ranla-cli@latest whoami
npx -y ranla-cli@latest run help # Ranla's commands: campaign, segment, page, …No API key to copy: login prints a link and a code, you approve it in the browser for the workspace you pick, and the CLI saves its own key in ~/.config/ranla/config.json. In a coding agent the command exits with the link; after you approve, run login again to finish.
Ranla's commands
ranla run help # every noun and its verbs
ranla run help campaign # a noun's verbs with every field
ranla run campaign list
ranla run <noun> <verb> --input '{"field":"value"}' # or --file input.json, or --input - (stdin)Anything that sends, publishes or spends waits for approval instead of running:
ranla approvals list
ranla approvals approve <id>
ranla approvals reject <id>Choose what Ranla thinks with: Included, or your own OpenRouter, Anthropic, OpenAI or Google key. The key is read from standard input (or a variable you name), never from the command line, and is tested with one tiny call before it is saved:
ranla brain # what she thinks with; saved keys show their last 4 characters
pbpaste | ranla brain key openai # or: ranla brain key openai --key-env OPENAI_API_KEY
ranla run brain use --input '{"choice":"included"}'Output is JSON when piped and text at a terminal (--json forces JSON). Errors go to stderr; exit 1 means the request failed, 2 means the command line was wrong.
Workspaces
Each sign-in is one workspace. ranla login --workspace "<name>" adds another, ranla workspaces list shows them, ranla workspaces use "<name>" picks one, and --workspace "<name>" on any command uses it once. With several and none picked, commands ask instead of guessing.
Email API
ranla emails send --from [email protected] --to [email protected] --subject "Hi" --text "Hello"
ranla domains listAfter login these use the saved key. RANLA_API_KEY (or SUPERSENDTX_API_KEY) overrides it, for CI and servers. Defaults to https://api.ranla.ai; RANLA_API_URL or --base-url points elsewhere. ranla logout revokes the CLI's key and removes it.
When a newer version is on npm, the CLI prints one line to stderr (never stdout) saying so. It checks at most once a day. Turn it off with RANLA_CLI_NO_UPDATE_CHECK=1 or NO_UPDATE_NOTIFIER=1; it is always off when CI is set.
Guide: https://docs.ranla.ai/guides/agent-cli
License
MIT
