Skip to content

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.

shelf.yaml
shelfVersion: 1
name: my-library
description: A collection of useful commands
libraries:
ops:
name: Operations
description: Deployment and operations commands
path: ops
k8s:
name: Kubernetes
description: Kubernetes helper commands
path: k8s
FieldRequiredTypeDescription
shelfVersionYesintegerMust be 1
nameYesstringLibrary name
descriptionNostringLibrary description
librariesYesobjectMap of library slug to library definition

Each key in libraries is the library slug, which must match ^[a-z][a-z0-9-]*$.

FieldRequiredTypeDescription
nameYesstringHuman-readable library name
descriptionNostringLibrary description
pathYesstringRelative path to the directory containing command spec files
  • 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”)
  • Each .yaml, .yml, or .json file in a library directory must be a valid command spec
  • The metadata.slug in each spec must match the filename (minus extension)
  • Specs are validated against the same JSON Schema used by my cli push