DAGCLI Docs

dag describe

Generate a .dag.json workflow file from a plain English description. The CLI sends your description to an LLM and translates the response into a valid DAG.

!ANTHROPIC_API_KEY must be set in your .dag/.env file or environment. The describe command always uses the Anthropic provider to interpret your description.

Synopsis

bash
dag describe "<natural language description>" [--output <path>] [--run] [--input key=value] [--dagId <id>]

Basic Usage

Describe the transformation you want in plain English. The CLI generates a .dag.json file and prints it to stdout.

bash
dag describe "translate Korean text to English"

Save the result to a file:

bash
dag describe "translate Korean text to English" --output translate.dag.json

Generate and Run

Add --run to execute the generated DAG immediately. Pass input values with --input.

bash
dag describe "translate Korean to English" \
  --run \
  --input text="안녕하세요"

Example output:

text
Hello.

How It Works

Internally, dag describe builds a small meta-pipeline:

  1. A text-template node wraps your description in a structured prompt that lists the available node types, their ports, and the required JSON schema.
  2. The prompt is sent to llm-text-anthropic, which returns a JSON workflow definition.
  3. The CLI validates and normalises the JSON, then writes a .dag.json file pair.

Because the LLM only knows about registered node types, the generated DAG is always composed of real, runnable nodes.

Flags

FlagDescription
--output <path>Write the generated .dag.json file to this path. Defaults to stdout if omitted.
--runExecute the generated DAG immediately after creation.
--input <key=value>Input values passed to the pipeline when --run is set. Repeat for multiple keys.
--dagId <id>Assign a custom identifier to the generated DAG. Defaults to a generated slug.