For AI agents: the complete documentation index for the Restless API is available at https://build.restless.ai/llms.txt. This page is also available as Markdown at https://build.restless.ai/installs/cli.md (or send an Accept: text/markdown request header).

Install the Restless CLI

Install

npx restless init

Authentication

Authorizing a machine opens a browser once (`npx restless login`), after which the session is reused for 24 hours. `npx restless key` writes your project's `RESTLESS_KEY` straight to `.env`. Name your agent non-interactively with `RESTLESS_AGENT=cursor` (or `--agent cursor`) so it gets recorded on the project.

Machine-readable output

Pass `--json` to `update` commands (e.g. `npx restless update --status --json`) for parseable output.

Common commands

A few common commands. Run npx restless --help to list every command.

Agent setup prompt

Run `npx restless init` to set up API success tracking. Inside a coding agent it prints setup instructions for you to carry out (reading routes, writing the OpenAPI spec, wiring middleware) rather than driving your repo itself. Use `npx restless guide oas` and `npx restless guide sdk` to get the spec-writing and SDK-wiring instructions. If init misjudges the stack, re-run with `RESTLESS_SKIP_STACK_CHECK=1 npx restless init`. Run `npx restless --help` and `npx restless <cmd> --help` to discover commands and flags. For changes after setup use `npx restless update` (not init): `--status --json` to check without writing, `--refresh --json` to re-run the spec source and push, `--oas <file|url>` to point at a different spec, `--sync` to push settings, and `--project <id>` to pick one API in a multi-API repo. Identify yourself with `RESTLESS_AGENT=<tool>` or `--agent <tool>`.

See the full README for details: https://build.restless.ai/installs/cli/full.md

Package details