cligen

command
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

cligen reads the OpenAPI spec and emits the command catalog under catalog/ (`package catalog`: HelpEntries + TxShortcuts + the embedded spec.json). The catalog is the single generated artifact both interpreters walk at runtime — bron-cli's cobra tree and the desktop/CLI MCP tool layer.

Resources come from OpenAPI tags (kebab-case), verbs are derived from the HTTP method + URL shape: GET /xxx → list, GET /xxx/{id} → get, POST → create, PUT/PATCH → update, DELETE → delete. Trailing path segments after an id become the verb (POST /xxx/{id}/yyy → yyy). Names map 1:1 with the spec — no aliases, no remapping — so the spec stays the source of truth and the catalog regenerates losslessly on every release.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL