Skip to content

my library add

Terminal window
my library add <identifier> [flags]

Installs a library by name from the registry or by git URL. Clones the repository, validates the manifest and command specs, and registers it.

ArgumentDescription
identifierLibrary name (from registry) or git URL (required)
FlagDescription
--refGit branch or tag to checkout
--nameAlias for the library (defaults to repo name)
Terminal window
# Install from the registry
my library add kubernetes
# Install from a git URL
my library add https://github.com/user/my-library.git
# Install with a specific branch
my library add https://github.com/user/my-library.git --ref v1.0
# Install with a custom name
my library add https://github.com/user/my-library.git --name tools
  1. Clones the repository to ~/.my/libraries/repos/
  2. Reads the shelf manifest (shelf.yaml, shelf.yml, or shelf.json)
  3. Validates all command specs in each library directory
  4. Registers the library in ~/.my/libraries/libraries.json
  5. Commands become available as my <library> <slug>