LoopCLI

Creating Workflows

LoopCLI workflows ("loops") combine HTTP calls and CLI commands. This guide walks you through drafting, testing, and deploying your first automation.

1. Create a loop

loopcli loop create daily-report --description "Send the daily status update"

Add --interactive to launch the visual wizard if you prefer prompts.

2. Add steps

loopcli loop add-http daily-report "Fetch Issues" GET https://api.example.com/issues
loopcli loop add-cli daily-report "Format Report" "node scripts/format-report.js"

Use loopcli loop edit daily-report to review or modify the step order.

3. Test locally

loopcli loop run daily-report --verbose

The CLI prints a visual summary that includes captured stdout/stderr for each step.

No arguments? Run loopcli loop run and use the numbered selector—type to filter, use digits to choose a row, ESC to reset, and 0 to cancel.

4. Deploy to the cloud (optional)

loopcli loop deploy daily-report --schedule "0 14 * * *" --activate

Cloud deployment makes the loop available to the hosted runner. Pair with loopcli loop worker:schedule to keep the worker running.

5. Sync with the dashboard

# Push a single loop to Supabase
loopcli loop sync daily-report

# Or sync everything in the current project
loopcli loop sync

loop sync creates remote copies when a loop only exists locally and updates IDs so the dashboard stays in lockstep with your repo (respects LOOPCLI_CONFIG_DIR, too). If you recreated your project in Supabase, rerun loopcli project use followed by loopcli loop sync to refresh the mapping.

6. Monitor executions

Use any of the following commands:

  • loopcli loop executions --loop daily-report
  • loopcli loop execution <id>
  • loopcli loop logs for captured CLI output

Reference

Related Documentation

Continue learning with these related topics