Call any HTTP API described by an OpenAPI/Swagger spec as CLI commands. No MCP server, no code generation, no JSON schemas in context.
bash
npm install -g openapi-to-cli
ocli profiles add <name> \
--api-base-url <BASE_URL> \
--openapi-spec <SPEC_URL_OR_PATH> \
--api-bearer-token "$TOKEN"
ocli use <name>
Search for the right command: bash
ocli commands --query "your task description" --limit 5
Check parameters of the chosen command: bash
ocli <command> --help
Execute the command: bash
ocli <command> --param1 value1 --param2 value2
Parse the JSON response and act on the result.
bash
# BM25 natural language search
ocli commands --query "upload file to storage" --limit 5
# Regex pattern search
ocli commands --regex "users.*post" --limit 10
# List all commands
ocli commands
bash
# Switch active profile
ocli use github
# Or specify per-call
ocli repos_get --profile github --owner octocat --repo Hello-World
--help before calling a command you haven't used before.--help output.--regex.--help and add the missing flag.ocli profiles show <name>).ocli profiles add again with --openapi-spec to refresh cache.