Library Manifest
Every library repository must have a manifest file at its root. The accepted filenames are shelf.yaml (preferred), shelf.yml, or shelf.json.
Full example
Section titled “Full example”shelfVersion: 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: k8sFields
Section titled “Fields”| Field | Required | Type | Description |
|---|---|---|---|
shelfVersion | Yes | integer | Must be 1 |
name | Yes | string | Library name |
description | No | string | Library 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 |
Directory layout
Section titled “Directory layout”Directorymy-library/
- shelf.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