Libraries
A library is a collection of commands that you can install and use. Libraries can come from two places:
- Git sources — any git repository containing a
mycli.yamlmanifest, added withmy source add - Registry — public libraries installed by name with
my library install
Both types make commands available as my <library> <slug> (e.g., my ops deploy).
Run library commands
Section titled “Run library commands”After installing a library (from either a source or the registry), its commands are available as top-level subcommands:
my ops deploy api -e productionmy kubernetes logs my-pod -fLibraries can have aliases, so you can use a shorter name. For example, my k as an alias for my kubernetes.
Use my <library> --help to see all commands available in a library.
Git-backed sources
Section titled “Git-backed sources”A source is a git repository that contains one or more libraries of commands. No account is needed.
Add a source
Section titled “Add a source”my source add https://github.com/user/example-library.gitSpecify a branch or tag
Section titled “Specify a branch or tag”my source add https://github.com/user/example-library.git --ref v1.0Custom name
Section titled “Custom name”my source add https://github.com/user/example-library.git --name my-toolsManage sources
Section titled “Manage sources”my source list # List installed git sourcesmy source update # Update all sources (git pull)my source update my-tools # Update a specific sourcemy source remove my-tools # Remove a sourceRegistry libraries
Section titled “Registry libraries”Install libraries from the public registry by name:
my library install kubernetesUninstall a registry library:
my library uninstall kubernetesSync registry libraries manually to fetch the latest commands:
my library syncDiscover libraries
Section titled “Discover libraries”my library list # List all installed libraries (from any source)my library list --json # Output as JSONSearch
Section titled “Search”my library search kubernetesExplore
Section titled “Explore”Browse libraries interactively with the TUI:
my library exploreLibrary info
Section titled “Library info”View details about a library:
my library info kubernetesPublish a library
Section titled “Publish a library”Create your own source repository
Section titled “Create your own source repository”Directory layout
Section titled “Directory layout”Directorymy-library/
- mycli.yaml Manifest (required)
Directoryops/ Library directory
- deploy.yaml Command spec (slug: “deploy”)
- status.yaml Command spec (slug: “status”)
Directoryk8s/
- logs.yaml Command spec (slug: “logs”)
Manifest format (mycli.yaml)
Section titled “Manifest format (mycli.yaml)”schemaVersion: 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: k8sschemaVersionmust be1- Each key in
librariesis the library slug (must match^[a-z][a-z0-9-]*$) pathpoints to a directory containing command spec files- Each spec file’s
metadata.slugmust match the filename (minus extension)
mycli.yml, mycli.json, and the older shelf.yaml/shelf.yml/shelf.json are also accepted for backward compatibility.
Release a version
Section titled “Release a version”Run my library release to create a versioned release. Without arguments it prompts you to pick a version bump:
my library release# Latest release: v1.0.0# Bump to:# 1) v1.0.1 (patch)# 2) v1.1.0 (minor)# 3) v2.0.0 (major)# 4) CustomYou can also pass a tag directly:
my library release v1.1.0Use --push to push the new tag to origin in one step, or --dry-run to preview without making changes:
my library release v1.1.0 --pushmy library release --dry-runStorage
Section titled “Storage”- Source repos are cloned to
~/.my/sources/repos/(path derived from URL) - The source registry lives at
~/.my/sources/sources.json