@hesed/recipe
v0.3.0
Published
Chains multiple CLI commands together to accomplish a task
Readme
recipe
Extensible CLI recipe for running configurable AI coding agents
Install
sdkck plugins install @hesed/recipeUsage
$ npm install -g @hesed/recipe
$ recipe COMMAND
running command...
$ recipe (--version)
@hesed/recipe/0.3.0 linux-x64 node-v24.17.0
$ recipe --help [COMMAND]
USAGE
$ recipe COMMAND
...Commands
recipe chainrecipe reciperecipe recipe create NAMErecipe recipe delete RECIPErecipe recipe export RECIPErecipe recipe import PATHrecipe recipe remove RECIPErecipe recipe run RECIPErecipe recipe show RECIPErecipe recipe validate RECIPE
recipe chain
Chain commands on the fly, passing each step's output into the next.
USAGE
$ recipe chain [--json] [--debug] [--dry-run] [--save <value>] [--var <value>...]
FLAGS
--debug Show step counts and execution summary.
--dry-run Print the commands that would run without executing them.
--save=<value> Save the assembled chain as a reusable recipe with this name.
--var=<value>... Provide an initial variable (key=value). Repeatable. Values parsed as JSON when possible.
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Chain commands on the fly, passing each step's output into the next.
Step syntax — one step per argument, always wrapped in single quotes:
exec: <shell command> [=> name | =>json name]
run: <command-id> [args...] [=> name | =>json name]
set: <name> = <value>
log: <message>
forEach: <collection> [as <name>] body = next step, or a '{ ... }' block
repeat: <count> [as <name>] body = next step, or a '{ ... }' block
if: <condition> body = next step, or a '{ ... }' block
else (optional, follows an if body)
Capturing output:
=> name saves raw stdout to a variable (trailing newline stripped)
=>json name parses stdout as JSON before saving
Blocks: pass '{' and '}' as separate arguments to group multiple steps as a body.
Variables set in one step are available as placeholders in all later steps.
EXAMPLES
$ recipe chain 'exec: date => today' 'log: Today is ${today}'
$ recipe chain 'set: items = ["apple","banana","cherry"]' 'forEach: ${items} as fruit' 'log: - ${fruit}'
$ recipe chain 'set: count = 3' 'if: ${count} > 0' 'log: work to do' 'else' 'log: nothing to do'
$ recipe chain 'set: nums = [1,2,3]' 'forEach: ${nums} as n' '{' 'log: item ${n}' 'exec: echo ${n}' '}'
$ recipe chain 'run: jira issue search "assignee = currentUser() AND statusCategory != Done" => r' 'forEach: ${r.data.issues} as issue' 'log: ${issue.key} — ${issue.fields.summary}'
$ recipe chain 'run: bb pr list my-workspace my-repo --state OPEN => r' 'forEach: ${r.data.values} as pr' 'log: #${pr.id} ${pr.title} (${pr.source.branch.name} → ${pr.destination.branch.name})'
$ recipe chain 'exec: date => today' 'log: ${today}' --save show-date
$ recipe chain 'exec: rm -rf /tmp/cache' --dry-runSee code: src/commands/chain.ts
recipe recipe
List saved recipes.
USAGE
$ recipe recipe [--json]
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
List saved recipes.
List saved recipes.
EXAMPLES
$ recipe recipeSee code: src/commands/recipe/index.ts
recipe recipe create NAME
Scaffold a new recipe.
USAGE
$ recipe recipe create NAME [--json] [-d <value>] [-f]
ARGUMENTS
NAME Name for the new recipe.
FLAGS
-d, --description=<value> Description for the recipe.
-f, --force Overwrite an existing recipe with the same name.
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Scaffold a new recipe.
Creates a starter recipe in the recipe store that you can edit and run.
EXAMPLES
$ recipe recipe create close-user-tickets
$ recipe recipe create close-user-tickets --description "Close all tickets for a user"See code: src/commands/recipe/create.ts
recipe recipe delete RECIPE
Remove a saved recipe.
USAGE
$ recipe recipe delete RECIPE [--json]
ARGUMENTS
RECIPE Name of the saved recipe to remove.
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Remove a saved recipe.
Delete a recipe from the recipe store.
ALIASES
$ recipe recipe delete
EXAMPLES
$ recipe recipe delete close-user-ticketsrecipe recipe export RECIPE
Export a recipe to a file.
USAGE
$ recipe recipe export RECIPE [--json] [-f] [-o <value>] [--stdout]
ARGUMENTS
RECIPE Name of the saved recipe to export.
FLAGS
-f, --force Overwrite the output file if it already exists.
-o, --output=<value> Output file path. Defaults to ./<name>.json.
--stdout Print the recipe to stdout instead of writing a file.
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Export a recipe to a file.
Write a saved recipe to a JSON file so it can be shared or version-controlled.
With --stdout the recipe is printed instead of written to a file.
EXAMPLES
$ recipe recipe export close-user-tickets
$ recipe recipe export close-user-tickets --output ./shared/close-user-tickets.json
$ recipe recipe export close-user-tickets --stdoutSee code: src/commands/recipe/export.ts
recipe recipe import PATH
Import a recipe from a file.
USAGE
$ recipe recipe import PATH [--json] [-f] [--name <value>]
ARGUMENTS
PATH Path to a recipe JSON file to import.
FLAGS
-f, --force Overwrite an existing recipe with the same name.
--name=<value> Save the imported recipe under a different name.
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Import a recipe from a file.
Import a recipe from a JSON file into the recipe store so it can be run by name.
EXAMPLES
$ recipe recipe import ./close-user-tickets.json
$ recipe recipe import ./shared-recipe.json --name my-copySee code: src/commands/recipe/import.ts
recipe recipe remove RECIPE
Remove a saved recipe.
USAGE
$ recipe recipe remove RECIPE [--json]
ARGUMENTS
RECIPE Name of the saved recipe to remove.
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Remove a saved recipe.
Delete a recipe from the recipe store.
ALIASES
$ recipe recipe delete
EXAMPLES
$ recipe recipe remove close-user-ticketsSee code: src/commands/recipe/remove.ts
recipe recipe run RECIPE
Run a recipe: a sequence of commands chained with conditions, loops and JSON operations.
USAGE
$ recipe recipe run RECIPE [--json] [--dry-run] [--var <value>...]
ARGUMENTS
RECIPE Name of a saved recipe, or a path to a recipe file.
FLAGS
--dry-run Print the commands that would run without executing them.
--var=<value>... Override a recipe variable (key=value). Repeatable. Values are parsed as JSON when possible.
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Run a recipe: a sequence of commands chained with conditions, loops and JSON operations.
Each step runs a command, with optional conditions, loops and JSON operations between them.
Use --var to override the recipe's default variables, and --dry-run to preview the commands without running them.
EXAMPLES
$ recipe recipe run close-user-tickets
$ recipe recipe run close-user-tickets --var assignee=jdoe
$ recipe recipe run ./my-recipe.json --dry-runSee code: src/commands/recipe/run.ts
recipe recipe show RECIPE
Print a recipe definition.
USAGE
$ recipe recipe show RECIPE [--json]
ARGUMENTS
RECIPE Name of a saved recipe, or a path to a recipe file.
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Print a recipe definition.
Print the full definition of a recipe.
EXAMPLES
$ recipe recipe show close-user-ticketsSee code: src/commands/recipe/show.ts
recipe recipe validate RECIPE
Validate a recipe.
USAGE
$ recipe recipe validate RECIPE [--json]
ARGUMENTS
RECIPE Name of a saved recipe, or a path to a recipe file.
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Validate a recipe.
Check that a recipe is well-formed without running it.
EXAMPLES
$ recipe recipe validate ./my-recipe.jsonSee code: src/commands/recipe/validate.ts
