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.
| Argument | Description |
|---|
identifier | Library name (from registry) or git URL (required) |
| Flag | Description |
|---|
--ref | Git branch or tag to checkout |
--name | Alias for the library (defaults to repo name) |
# Install from the registry
my library add kubernetes
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
- Clones the repository to
~/.my/libraries/repos/
- Reads the shelf manifest (
shelf.yaml, shelf.yml, or shelf.json)
- Validates all command specs in each library directory
- Registers the library in
~/.my/libraries/libraries.json
- Commands become available as
my <library> <slug>