ailoop ๐Ÿ”
CLI ยท durable state ยท task files ยท presets

Run AI terminal tools in repeatable loops

`ailoop` helps you replace brittle one-off shell loops with a safer flow built around YAML config, pause/resume, strict task files, durable state, saved presets/history, and JSON-friendly output.

By Diego Marinho GitHub LinkedIn
YAML config presets + replay pause/resume JSON output OpenCode / Codex / Claude
$ ailoop ps

ID             State         Prog   Updated              Summary
-------------  ------------  -----  -------------------  -------
demo-loop      โ–ถ running       3/โˆž  2026-05-16 08:00:11  review repo

$ ailoop pause demo-loop
โธ  demo-loop ยท pause_requested
Why ailoop

Better than a brittle while true shell loop

Most AI terminal workflows begin as a fast shell loop and then grow messy. `ailoop` keeps the good part โ€” fast repetition โ€” while adding controls, structure, state, and automation-friendly output.

๐Ÿ” Repeatable runs

Run forever or for a fixed number of steps with one command.

โš™๏ธ YAML config

Keep defaults in one config file and override them per run.

๐Ÿ’พ Durable state

Track loops on disk so pause, resume, status, and stats stay consistent.

๐Ÿง  Presets + history

Save reusable run setups locally, favorite them, and replay them into new loops.

โธ Control flow

Pause or stop active loops without killing the whole tool session.

โœ… Task file mode

Use a strict Markdown task file when the loop should stop only after the list is done.

๐Ÿงพ JSON output

Use machine-friendly status, stats, logs, memory entries, and task-file checks in scripts.

Quick start

Get to the first successful run fast

Two small steps are enough for the first run: install locally, then start one loop.

1. Install

uv sync

2. Run

ailoop init-config
ailoop run "Review the repo and keep iterating." \
  --runner opencode \
  --agent orchestrator

Watch / control / inspect

ailoop ps
ailoop tail <loop-id>
ailoop pause <loop-id>
ailoop resume <loop-id>
ailoop status <loop-id>

Save + replay

ailoop memory save "Quick review" "Review the repo." \
  --runner opencode --agent orchestrator
ailoop memory list
ailoop replay <memory-id>
Task file mode

Use a strict Markdown task file when the loop should stop on task completion

Task file mode is a strong fit for structured AI work. The loop continues while To do or Doing still has real tasks.

Valid file

# Loop Tasks

## To do
- [ ] First task

## Doing
- None

## Done
- None

Use it

ailoop init-task-file ./loop_tasks.md
ailoop check-task-file ./loop_tasks.md
ailoop run "Work the task list." \
  --task-file ./loop_tasks.md \
  --until-tasks-complete
Real workflows

Fits the common loop shapes

Repo review

Keep iterating on one repo review or maintenance prompt until you stop it.

Bounded runs

Use fixed steps when you want exactly 3, 5, or 10 iterations and a clean stop.

Task lists

Run against a strict Markdown task file and stop when the list is complete.