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 testThe daemon auto-starts. Your test suite now runs every 30 minutes in the background - it survives closed terminals and reboots.
Pick your path
Getting Started
Install loop-task and run your first loop in 60 seconds.
CLI Reference
Every command, every flag, every option.
HTTP API
REST + SSE endpoints, Swagger UI, OpenAPI spec.
Task Chaining
Build multi-step pipelines that react to exit codes.
Recipe Loops
Version-control your loops as YAML files in .loops/recipes/.
Agent Workflows
Give an AI agent a cadence and let it iterate.
OpenTelemetry
Built-in tracing for loops, tasks, and agent commands.
Architecture
Daemon, state machine, persistence, scheduling.
Three ways to do everything
Every feature is accessible through three interfaces - pick whatever fits your workflow:
| Interface | Best for | Example |
|---|---|---|
| CLI | Scripts, one-shot commands, CI/CD | loop-task new 30m -- npm test |
| TUI board | Interactive management, monitoring | loop-task → type new loop |
| HTTP API | Integrations, dashboards, remote control | POST /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.