Getting Started
Install the DAG CLI, set up your API key, and run your first AI pipeline in under five minutes.
Installation
Install the CLI globally using npm, pnpm, or yarn. Node.js 18 or later is required.
bash
npm install -g @robota-sdk/dag-cliVerify the installation:
bash
dag --versionAPI Key Setup
The CLI reads API keys from a .dag/.env file in your working directory, or from environment variables. Create the file if it does not exist:
bash
# .dag/.env
ANTHROPIC_API_KEY=sk-ant-...
# Optional — add keys for other providers as needed
OPENAI_API_KEY=sk-...
GOOGLE_GENERATIVE_AI_API_KEY=AIza...You only need keys for the providers used by the nodes in your pipeline.
Your First Pipeline
Run a simple inline pipeline using the --pipeline flag. Nodes are separated by | and data flows left to right.
bash
dag run \
--pipeline "input | llm-text-anthropic | text-output" \
--input text="Explain what a DAG is in one sentence."The CLI will print the final node output to stdout:
text
A DAG (Directed Acyclic Graph) is a graph of nodes connected by directed
edges that never form a cycle, commonly used to model dependencies or
sequential processing steps.Node Discovery
Use the dag node subcommands to explore available node types.
List all node types
bash
dag node listInspect a node's ports and config
bash
dag node info llm-text-anthropicGenerate a minimal runnable example
bash
dag node example llm-text-anthropicSee dag node for full details.