Running Commands
Sync your catalog
Section titled “Sync your catalog”Your local catalog is synced automatically when you run my cli login or my library add. You can also update libraries manually:
my library updateThis pulls the latest changes from all installed library repos. The API catalog is synced with ETag support for efficient caching and stored locally at ~/.my/cache/.
Run a synced command
Section titled “Run a synced command”my cli run <slug> [-- args...]For example:
my cli run deploy -- productionmy cli run greet -- --name WorldArguments after -- are parsed by the command spec. Positional arguments are matched in order, and flags use --name value syntax.
Skip confirmation
Section titled “Skip confirmation”If a command has requireConfirmation: true in its policy, use -y to skip the prompt:
my cli run deploy -y -- productionRun from a file
Section titled “Run from a file”Run a spec file directly without pushing to the registry:
my cli run -f command.yaml -- productionThis is useful for local development and testing.
Inspect a command
Section titled “Inspect a command”View details of a cached command:
my cli show deploymy cli show deploy --raw # Output raw JSON specView run history
Section titled “View run history”my cli historymy cli history -n 50 # Show last 50 entriesHistory is stored as JSONL at ~/.my/history.jsonl.
How execution works
Section titled “How execution works”When you run a command, mycli:
- Loads the cached spec (or reads the file with
-f) - Parses positional args and flags from the command line
- Renders Go templates in
runlines andenvvalues - Executes each step sequentially using the specified shell
- Records the run in history
Next steps
Section titled “Next steps” Template Variables Use dynamic values in commands.
CLI Reference: run Full flag and option reference.