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
.yamlfile, 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 APIexamples/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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cliyard-0.4.1.tar.gz.
File metadata
- Download URL: cliyard-0.4.1.tar.gz
- Upload date:
- Size: 88.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04edf4a8a3cfd4a41517cec8da813d8f51a62d26a805febb1f8244e77d75609c
|
|
| MD5 |
69d5c0c59183a99362dd9e8a8b234934
|
|
| BLAKE2b-256 |
123f91be9756ae9adbf87edccf9794da46bd46cd3342a68ca30a8ac3b801a9d6
|
Provenance
The following attestation bundles were made for cliyard-0.4.1.tar.gz:
Publisher:
publish.yml on guolong123/cliyard
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cliyard-0.4.1.tar.gz -
Subject digest:
04edf4a8a3cfd4a41517cec8da813d8f51a62d26a805febb1f8244e77d75609c - Sigstore transparency entry: 2257103990
- Sigstore integration time:
-
Permalink:
guolong123/cliyard@772234b6058f841cc66e1bbc71501da2ea670781 -
Branch / Tag:
refs/tags/0.4.1 - Owner: https://github.com/guolong123
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@772234b6058f841cc66e1bbc71501da2ea670781 -
Trigger Event:
release
-
Statement type:
File details
Details for the file cliyard-0.4.1-py3-none-any.whl.
File metadata
- Download URL: cliyard-0.4.1-py3-none-any.whl
- Upload date:
- Size: 83.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96e1c69e1c780bdaafda3966ba0ec17be21ca816827edbca255e5e50e424c5b4
|
|
| MD5 |
addfaca007f5942a75f35c7ff0dd6c0a
|
|
| BLAKE2b-256 |
7a09bdca7a177198a1856b0e49eabfcaa9b31cd63ae97ca0324aac57f9d7f6bd
|
Provenance
The following attestation bundles were made for cliyard-0.4.1-py3-none-any.whl:
Publisher:
publish.yml on guolong123/cliyard
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cliyard-0.4.1-py3-none-any.whl -
Subject digest:
96e1c69e1c780bdaafda3966ba0ec17be21ca816827edbca255e5e50e424c5b4 - Sigstore transparency entry: 2257103998
- Sigstore integration time:
-
Permalink:
guolong123/cliyard@772234b6058f841cc66e1bbc71501da2ea670781 -
Branch / Tag:
refs/tags/0.4.1 - Owner: https://github.com/guolong123
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@772234b6058f841cc66e1bbc71501da2ea670781 -
Trigger Event:
release
-
Statement type: