Skip to content

my source add

Terminal window
my source add <git-url> [flags]

Clones a git repository containing a mycli.yaml manifest, validates the manifest and command specs, and registers it as a source. Commands from all libraries in the source become available immediately.

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