Lathe banner
samzong samzong

Lathe

Development community

Description

Agentic-friendly CLI generator for APIs: turn Swagger, OpenAPI, and google.api.http protos into single-binary CLIs with catalogs and generated Skills.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

[English](README.md) | [中文](README_zh.md)

lathe

Generate agent-friendly Cobra CLIs from OpenAPI, Swagger, protobuf, and GraphQL API specs.

[![CI](https://github.com/lathe-cli/lathe/actions/workflows/ci.yml/badge.svg)](https://github.com/lathe-cli/lathe/actions/workflows/ci.yml) [![CodSpeed](https://img.shields.io/endpoint?url=https://codspeed.io/badge.json)](https://app.codspeed.io/lathe-cli/lathe?utm_source=badge) [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)

Lathe turns declared API specifications into one inspectable CLI for humans and AI agents. The generated binary exposes the API as normal Cobra commands and as machine-readable contracts, so agents can discover a command, inspect its exact flags, auth, request body, HTTP path, and output shape, then execute it without guessing.

![Lathe architecture](docs/images/architecture.png)

Why Lathe

Hand-written API CLIs duplicate an existing contract and drift from it. Lathe keeps the specification and repo-local configuration as source of truth, then generates the command tree, runtime metadata, and Agent Skill together.

Use Lathe when you need to:

  • Generate a CLI from Swagger 2.0, OpenAPI 3, google.api.http protobuf APIs, or an explicitly curated GraphQL schema.
  • Keep a human-facing CLI and an agent-facing command catalog on the same contract.
  • Pin Git inputs for reproducible generation or intentionally follow a declared local working tree.
  • Add bounded CLI polish through overlays without hand-editing generated code.

What It Produces

Surface Purpose
Cobra command tree Typed API commands with auth, body, pagination, streaming, polling, and structured output support.
Runtime catalog search, commands --json, commands show, and commands schema expose exact operation and workflow contracts.
Agent Skill A generated skills// guide that points agents back to the runtime catalog.
Optional bundled capabilit