Commands CLI Commands
Manage commands in your EventCatalog from the command line.
getCommand​
Returns a command from EventCatalog by its ID
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | The ID of the command to retrieve |
| version | string | No | Specific version to retrieve (supports semver) |
Examples:
# Get the latest command
npx @eventcatalog/cli getCommand "CreateOrder"
# Get a specific version
npx @eventcatalog/cli getCommand "CreateOrder" "1.0.0"
getCommands​
Returns all commands from EventCatalog
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
| options | json | No | Options: {latestOnly?, attachSchema?} |
Examples:
# Get all commands
npx @eventcatalog/cli getCommands
writeCommand​
Writes a command to EventCatalog
Arguments:
| Name | Type | Required | Description |
|---|---|---|---|
| command | json | Yes | Command object with id, name, version, and markdown |
| options | json | No | Options: {path?, override?, versionExistingContent?} |