Library Manifest
Every source repository must have a manifest file at its root. The accepted filenames are mycli.yaml (preferred), mycli.yml, or mycli.json. The older shelf.yaml, shelf.yml, and shelf.json names are also accepted for backward compatibility.
Full example
Section titled “Full example”schemaVersion: 1name: my-librarydescription: A collection of useful commandslibraries: ops: name: Operations description: Deployment and operations commands path: ops k8s: name: Kubernetes description: Kubernetes helper commands path: k8s aliases: - kFields
Section titled “Fields”| Field | Required | Type | Description |
|---|---|---|---|
schemaVersion | Yes | integer | Must be 1 |
name | Yes | string | Source name |
description | No | string | Source description |
libraries | Yes | object | Map of library slug to library definition |
Library definition
Section titled “Library definition”Each key in libraries is the library slug, which must match ^[a-z][a-z0-9-]*$.
| Field | Required | Type | Description |
|---|---|---|---|
name | Yes | string | Human-readable library name |
description | No | string | Library description |
path | Yes | string | Relative path to the directory containing command spec files |
aliases | No | string[] | Alternative slugs for the library (e.g., ["k"] for k8s) |
Directory layout
Section titled “Directory layout”Directorymy-library/
- mycli.yaml Manifest
Directoryops/ Library directory
- deploy.yaml Command spec (slug: “deploy”)
- status.yaml Command spec (slug: “status”)
Directoryk8s/ Library directory
- logs.yaml Command spec (slug: “logs”)
Spec file requirements
Section titled “Spec file requirements”- Each
.yaml,.yml, or.jsonfile in a library directory must be a valid command spec - The
metadata.slugin each spec must match the filename (minus extension) - Specs are validated against the same JSON Schema used by
my cli push