Skip to content
Hoody.com

The exec service can scaffold ready-to-run script code from built-in templates and from custom templates you define. Code is produced through deterministic template rendering: a named template and its inputs are merged into a fixed script body. This is not AI or natural-language code synthesis; the output for a given template and input set is reproducible and predictable.

Use this capability when you want to:

  • Bootstrap common script patterns (HTTP clients, data processing, file operations) without writing boilerplate by hand.
  • Standardize how a team writes scripts by publishing shared templates.
  • Compose scripts programmatically from a known set of inputs.

The full reference for each operation, including parameters, request bodies, and response schemas, lives on the Script Templates page. The operations are:

  • GET /api/v1/exec/templates/list — list all built-in and custom templates available in the exec service.
  • GET /api/v1/exec/templates/preview — preview the rendered output of a template with sample inputs before generating.
  • POST /api/v1/exec/templates/generate — generate a runnable script from a template and a set of inputs.
  • POST /api/v1/exec/templates/create-custom — create a new custom template that is available alongside the built-ins.
  • PUT /api/v1/exec/templates/update-custom/:name — update an existing custom template.
  • DELETE /api/v1/exec/templates/delete-custom/:name — remove a custom template.

All requests use the standard API authentication header:

Authorization: Bearer <HOODY_API_KEY>

Include this header on every request to the exec service.

A typical generation flow is:

  1. templates/list to discover which templates are available and what inputs each one expects.
  2. templates/preview to render the template with your inputs and confirm the output.
  3. templates/generate to produce the final script, which can then be passed to execution or to code validation.
  • Script Templates — full reference for the template list, preview, generate, create, update, and delete operations.
  • Code Validation — validate generated scripts for syntax and structural issues before running them.