Restish
$ restish Community Med RiskRestish (rest-sh/restish) turns any OpenAPI 3 / Swagger API into a typed CLI with auto-discovered subcommands, automatic pagination, OAuth2 flows, and response formatting (-o json, -o yaml, -o ndjson, -o toon, -f <filter>). Built for both interactive terminals and token-efficient AI agents.
brew install restish restish auto-discovers OpenAPI endpoints on demand and supports -f 'body...' filtering plus -o toon compact output, avoiding loading large OpenAPI MCP tool definitions.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Provides -o json, -o ndjson, -o toon, inline -f body filtering, and OpenAPI --help discovery.
- Supports
-o json,-o toon, and-f <filter>field projection - Auto-generates
--helpdocs from OpenAPI schemas
Profiles keep base URLs and auth scoped per API, though remote POST/DELETE operations lack a global --dry-run flag.
- Scoped per-API profiles in
apis.json - Supports
--rsh-no-browserfor headless auth flows
Single Go binary via brew install restish, go install, and cross-platform GitHub releases.
- Static Go binary on macOS, Linux, and Windows
Turns any OpenAPI service into a rich CLI on the fly with pagination, auth, and compact formatting.
- Instant OpenAPI discovery plus ad-hoc HTTP shorthand
Active MIT open-source project (rest-sh/restish).
- MIT-licensed
rest-sh/restishrepository
Clear documentation at rest.sh covering profiles, filters, -o toon, and OAuth2.
- Official docs at rest.sh and self-documenting OpenAPI
--help
Security, Auth & Guardrails
Stores API profiles, bearer keys, and OAuth2 tokens under ~/.config/restish/ (apis.json), supporting --rsh-no-browser for headless OAuth.
MIT open-source Go CLI; completely free.
# Restish (restish) Agent Rules - Always pass `-o json` or `-o toon` with `-f <filter>` to keep response payloads concise. - Run `restish <api> --help` to verify OpenAPI-discovered operation names and HTTP methods before calling write operations. - Pass `--rsh-no-browser` if running in a headless environment.
Agent-Ready Command Recipes
Safe Read-Only Queries
restish api.rest.sh/images -o json -f 'body.#.name'
Fetches an endpoint as JSON and filters the payload inline with -f to save tokens.
restish myapi list-items -o toon
Calls an OpenAPI-discovered operation and emits token-efficient -o toon output.
Controlled Writes & Previews
restish myapi create-item name:demo,enabled:true -o json
Posts structured shorthand key-value fields to an OpenAPI operation and returns JSON.
Strengths for Agents
- + Supports
-o json,-o toon, and inline-ffiltering to minimize agent context bloat. - + OpenAPI auto-discovery turns arbitrary REST APIs into self-describing subcommands.
Caveats & Pitfalls
- ! No global
--dry-runflag before executing mutatingPOST/PUT/DELETEoperations. - ! OAuth2 Authorization Code login requires interactive browser or manual code entry unless using client credentials.