Skip to main content

cliyard

CLI + YAML + Yard — a framework that generates CLI commands from YAML specs. Define your REST API in a few YAML files, and cliyard produces a fully-structured Click CLI with parameters, types, response formatting, and auto-generated help.

Installation

pip install cliyard

# Or for development
pip install -e .

Quick Start

# Generate a CLI from spec files
cliyard gen --name mycli --defs-path ./specs/
cd mycli && pip install -e .

# Use it
mycli --help
mycli repos list --page-size 10

How It Works

cliyard turns a directory of YAML files into CLI commands. One directory equals one API service. Each YAML file becomes a resource group with subcommands for every defined method.

specs/
├── _auth.yaml      # Service config: name, servers, auth chain
├── repos.yaml      # Resource: repos (list, create, get, update, delete)
├── users.yaml      # Resource: users (list, create, delete)
└── _groups.yaml    # (optional) Group definitions for nesting

Data flow for a single invocation:

CLI input → bind & validate → auth chain → assemble request → HTTP call → format response

Features

  • YAML-driven: Add a new API resource by creating a .yaml file, no code changes
  • Plugin system: 6 extension points for auth, types, hooks, methods, commands, field resolvers
  • Multi-server: Support multiple API endpoints in a single CLI
  • Rich output: Tables, JSON, CSV formatting with datetime conversion
  • Resource grouping: Nest related commands under parent groups

Examples

See the examples/ directory for ready-to-use spec sets:

  • examples/ketaops/ — KetaDB Operations API (40+ resources)
  • examples/ketacli-repos/ — Simple repository management API
  • examples/xiyu/ — xiyu platform API

Documentation

Generated CLI projects include a README.md with full usage docs covering:

  • Usage & environment management
  • Adding new resources
  • Plugin authoring (all 6 plugin types)
  • Multi-server configuration
  • Custom method plugins

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cliyard-0.4.0.tar.gz (88.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cliyard-0.4.0-py3-none-any.whl (82.8 kB view details)

Uploaded Python 3

File details

Details for the file cliyard-0.4.0.tar.gz.

File metadata

  • Download URL: cliyard-0.4.0.tar.gz
  • Upload date:
  • Size: 88.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for cliyard-0.4.0.tar.gz
Algorithm Hash digest
SHA256 dbecf7da6ecc530e19588e8d589cdd86d17a970086f149c02381616e29b087c0
MD5 c7a372e5f8c1f4e9fcf4f6b01c6002f2
BLAKE2b-256 6654e6e22a22fe2ad38ce6e11c2601462a59cad2bf40de5aebe0bcdf551dc97f

See more details on using hashes here.

Provenance

The following attestation bundles were made for cliyard-0.4.0.tar.gz:

Publisher: publish.yml on guolong123/cliyard

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cliyard-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: cliyard-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 82.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for cliyard-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 71c202a844cf77fb097d734a443676c26fb602acba9c35fc1ee907db2667e34a
MD5 6038c7fd8d095b80e537515cea9489e1
BLAKE2b-256 47ac5e9b156acafd1be5b19cce1268d385824b4941519d0e9ad130f9533989bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for cliyard-0.4.0-py3-none-any.whl:

Publisher: publish.yml on guolong123/cliyard

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.15.0

2 files

0.14.2

2 files

0.14.1

2 files

0.14.0

2 files

0.13.1

2 files

0.13.0

2 files

0.12.2

2 files

0.12.1

2 files

0.12.0

2 files

0.11.1

2 files

0.11.0

2 files

0.10.0

2 files

0.9.1

2 files

0.9.0

2 files

0.8.0

2 files

0.7.3

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.0

2 files

0.5.1

2 files

0.5.0

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

This release

0.4.0 This release

2 files

0.3.2

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page