ocli-api for Openclaw

A streamlined tool that converts OpenAPI/Swagger specifications into functional CLI commands without needing an MCP server.

vakovalskii
v1.0.0
Mar 17, 2026
0
1.1k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install ocli-api

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install ocli-api using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is ocli-api?

ocli-api is a powerful utility designed to transform standard REST API descriptions into actionable command-line tools. By utilizing this within the Openclaw Skills framework, developers can interact with internal, cloud, or SaaS APIs directly from their terminal without the heavy lifting of code generation or managing complex JSON schemas in context. It provides a minimal token overhead solution, making it ideal for AI-driven automation where efficiency is paramount.

This skill enables a seamless bridge between API documentation and execution. Whether you are dealing with a local file or a remote URL spec, ocli-api allows for rapid discovery and invocation of endpoints, ensuring that your Openclaw Skills remain lightweight and highly performant across various development environments.

ocli-api Use Cases

  • Calling internal or third-party REST APIs without writing custom SDKs.
  • Rapidly testing and debugging OpenAPI-defined endpoints via the command line.
  • Automating cloud and SaaS interactions within CI/CD pipelines.
  • Reducing token consumption for AI agents by using structured CLI commands instead of full API documentation in prompts.

How ocli-api Works

  1. Profile Configuration: Users define an API profile by providing the base URL, OpenAPI specification path, and necessary authentication tokens.
  2. Command Discovery: The tool uses BM25 natural language search or regex to help users find the correct CLI command for their specific task.
  3. Parameter Verification: Users check the required and optional parameters for a command using the built-in help functionality.
  4. Execution: The CLI command is executed, sending a structured request to the API endpoint.
  5. Response Processing: The system returns the JSON response, which can be parsed and used for subsequent logic within Openclaw Skills.

ocli-api Setup

To get started with ocli-api, ensure you have the binary installed and your profiles configured:

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>

ocli-api Data Schema & Taxonomy

The ocli-api skill organizes data through a profile-based system and an indexed command registry:

Data Component Description
Profiles Stores API base URLs, authentication tokens, and specification references.
Command Cache A local index of endpoints derived from the OpenAPI/Swagger spec for fast searching.
Parameters Mapping of CLI flags to API request body, query, and path parameters.
Output Standard JSON format returned from the API for interoperability with other tools.

ocli-api Advanced Features

  • BM25 natural language search to find commands based on descriptive tasks.
  • Regex support for filtering commands by specific patterns.
  • Multi-profile management to switch between different environments (e.g., dev, staging, production) effortlessly.
  • Low-latency execution without the need for external MCP servers.
  • Built-in guardrails to prevent fabrication of parameter names through mandatory help-check workflows.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Bins ocli
Github Stars: 0
forks: 0

Featured*