looplia run
The run command executes a workflow from ~/.looplia/workflows/ on provided content.
looplia run <workflow-id> [options]Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
workflow-id | Name of the workflow to run (e.g., writing-kit) |
Options
Section titled “Options”| Option | Description |
|---|---|
--file <path> | Input file to process (creates new sandbox) |
--sandbox-id <id> | Resume existing sandbox |
--mock | Mock mode (no API calls, for testing) |
--no-streaming | Batch mode without streaming TUI |
Examples
Section titled “Examples”Start a New Run
Section titled “Start a New Run”# Run writing-kit on an articlelooplia run writing-kit --file ./my-article.md
# Run on content in another directorylooplia run writing-kit --file ~/Documents/blog-post.mdResume an Existing Run
Section titled “Resume an Existing Run”# List available sandboxesls ~/.looplia/sandbox/
# Resume from a specific sandboxlooplia run writing-kit --sandbox-id my-article-2025-12-28-x7kmTesting and Development
Section titled “Testing and Development”# Mock mode (no API calls)looplia run writing-kit --file test.md --mock
# Batch mode (no streaming TUI)looplia run writing-kit --file test.md --no-streamingHow It Works
Section titled “How It Works”-
Input Processing
- With
--file: Creates a new sandbox and copies your file toinputs/content.md - With
--sandbox-id: Loads existing sandbox state
- With
-
Workflow Loading
- Reads workflow definition from
~/.looplia/workflows/{workflow-id}.md - Parses YAML frontmatter for steps configuration
- Reads workflow definition from
-
Step Execution
- Executes each step using the
skill-executor - Respects
needsdependencies between steps - Validates outputs against step requirements
- Executes each step using the
-
Output Generation
- Writes artifacts to
sandbox/{id}/outputs/ - Updates
validation.jsonwith completion status
- Writes artifacts to
Streaming TUI
Section titled “Streaming TUI”By default, run displays a streaming Terminal UI showing:
┌─────────────────────────────────────────────────────┐│ Looplia · writing-kit ││ Sandbox: my-article-2025-12-28-x7km │└─────────────────────────────────────────────────────┘
▶ Step 1/3: media-reviewer Mission: Deep analysis of content to extract key themes ├─ Reading input file... ├─ Analyzing content structure ├─ Extracting key themes: AI healthcare, diagnostics ├─ Found 5 key points └─ ✓ Output: outputs/summary.json
▶ Step 2/3: idea-synthesis Mission: Generate creative hooks, angles, and questionsUse --no-streaming for simpler output suitable for CI/CD or logging.
Sandbox Structure
Section titled “Sandbox Structure”Each run creates an isolated sandbox:
~/.looplia/sandbox/my-article-2025-12-28-x7km/├── inputs/│ └── content.md # Your input (copied from --file)├── outputs/│ ├── summary.json # Step outputs│ ├── ideas.json│ └── writing-kit.json # Final output├── logs/│ └── session.log # Execution logs└── validation.json # Step completion trackingValidation State
Section titled “Validation State”The validation.json file tracks which steps are complete:
{ "workflow": "writing-kit", "version": "1.1.0", "sandboxId": "my-article-2025-12-28-x7km", "steps": { "summary": { "output": "outputs/summary.json", "validated": true }, "ideas": { "output": "outputs/ideas.json", "validated": true }, "writing-kit": { "output": "outputs/writing-kit.json", "validated": false } }}Error Handling
Section titled “Error Handling”If a step fails:
- The error is logged to
logs/session.log validation.jsonremains unchanged for that step- You can fix the issue and resume with
--sandbox-id
# View error logscat ~/.looplia/sandbox/my-article-2025-12-28-x7km/logs/session.log
# Resume after fixinglooplia run writing-kit --sandbox-id my-article-2025-12-28-x7kmSee Also
Section titled “See Also”- Quick Start — Run your first workflow
- Understanding Workflows — Workflow schema reference
- build — Create custom workflows