Skip to content

CLI Tooling Suite

Marius Egerhei Torjusen edited this page Oct 3, 2026 · 1 revision

πŸ› οΈ CLI Tooling Suite

Loop Engineering provides a modular suite of local-first CLI utilities designed to audit, scaffold, monitor, and govern autonomous agent loops.


1. Tool Overview

       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
       β”‚   loop-init   β”‚ Scaffolds contracts & starters
       β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚
               β–Ό
       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
       β”‚   loop-cost   β”‚ Estimates token spend & budget
       β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚
               β–Ό
       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
       β”‚  loop-audit   β”‚ Computes Loop Readiness Score (0–100)
       β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚
               β–Ό
       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
       β”‚   loop-sync   β”‚ Detects drift between STATE.md and LOOP.md
       β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚
               β–Ό
       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
       β”‚ loop-context  β”‚ Memory ledger & circuit breaker for long runs
       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

2. Tool Reference & Usage

πŸ” loop-audit β€” Loop Readiness Score

Evaluates the architectural hygiene of any repository containing agent loops. Checks for budget caps, path denylists, maker/checker split, and verification steps.

# Basic score evaluation
npx @cobusgreyling/loop-audit .

# Actionable improvement recommendations
npx @cobusgreyling/loop-audit . --suggest

# Generate markdown shield badge for README
npx @cobusgreyling/loop-audit . --badge

# JSON output for CI pipelines
npx @cobusgreyling/loop-audit . --json

πŸ—οΈ loop-init β€” Scaffolding Engine

Creates a production-ready loop structure with pre-configured state files, budget limits, constraints, and tool integrations.

# Scaffold daily triage for Grok
npx @cobusgreyling/loop-init . --pattern daily-triage --tool grok

# Scaffold CI sweeper for Claude Code
npx @cobusgreyling/loop-init . --pattern ci-sweeper --tool claude

# Scaffold dependency sweeper for Opencode / local CLI
npx @cobusgreyling/loop-init . --pattern dependency-sweeper --tool opencode

πŸ’° loop-cost β€” Token & Financial Estimator

Calculates projected token spend across iterations based on prompt length, model tier, and frequency.

# Estimate cost for current loop directory
npx @cobusgreyling/loop-cost

# Estimate with specific model pricing
npx @cobusgreyling/loop-cost --model claude-3-5-sonnet --runs-per-day 24

πŸ”„ loop-sync β€” Drift Detection

Analyzes divergence between the declared operational contract (LOOP.md) and the dynamic execution record (STATE.md).

# Run drift check
npx @cobusgreyling/loop-sync .

# Strict mode: fail CI if drift exceeds threshold
npx @cobusgreyling/loop-sync . --strict

🧠 loop-context β€” Stateful Memory & Circuit Breaker

Manages persistent state across multi-turn agent runs, truncating obsolete history while preserving critical decision context. Acts as an emergency circuit breaker if iterations spiral.

# Check ledger integrity
npx @cobusgreyling/loop-context --check --ledger run.json

# Enforce max step limit (e.g. 15 iterations)
npx @cobusgreyling/loop-context --step 15 --max-steps 20

πŸ”Œ loop-mcp-server β€” Model Context Protocol Runtime

Exposes loop patterns, skills, state files, and verification tools directly to MCP-compatible clients (e.g., Claude Code, Cursor, Grok, Windsurf).

# Launch local stdio MCP server
npx @cobusgreyling/loop-mcp-server