loop-task

Introduction

Run any shell command on a cadence - in the background, managed from a terminal board. No cron files, no systemd, no config syntax.

loop-task is a cross-platform CLI for loop engineering: you give a command an interval, and it runs on that cadence until you say stop. The whole thing in two lines:

npm install -g loop-task
loop-task new 30m -- npm test

The daemon auto-starts. Your test suite now runs every 30 minutes in the background - it survives closed terminals and reboots.

Pick your path

Three ways to do everything

Every feature is accessible through three interfaces - pick whatever fits your workflow:

InterfaceBest forExample
CLIScripts, one-shot commands, CI/CDloop-task new 30m -- npm test
TUI boardInteractive management, monitoringloop-task → type new loop
HTTP APIIntegrations, dashboards, remote controlPOST /api/loops with JSON body

What's loop engineering?

Loop engineering is designing systems that run work on a cadence instead of triggering each run yourself. A loop is a recurring goal: you define a purpose, give it an interval, and let it iterate.

It applies to everything from simple health checks to AI agent workflows:

  • Health checks - loop-task new 10s -- curl -sf https://api.example.com/health
  • Test suites - loop-task new 30m -- npm test
  • Data syncs - loop-task new 1h --project etl -- ./scripts/sync.sh
  • AI agents - loop-task new 30m -- opencode run "find missing translations, 3 max"
  • Deploy polling - loop-task new 15s -- curl -sf https://app.example.com/deploy-status

Inspired by Addy Osmani's Loop Engineering blog post.

Questions?

Check the Troubleshooting page or open an issue on GitHub.