A deterministic runtime controller for external AI-driven task execution
REPL CLI is a local command-line system that manages and observes deterministic runtime state for external AI-driven task execution. It acts as a bridge between AI systems and local project state, providing:
- ✅ Deterministic state management — Same input always produces the same output
- ✅ Task lifecycle tracking — Initialize, execute, and validate AI tasks
- ✅ Local-only architecture — No backend, no cloud, no daemon
- ✅ Single binary distribution — No dependencies, no installation hassle
When working with AI agents (like Claude, GPT-4, or custom LLMs), you need a way to:
- Track task execution state reliably
- Validate AI outputs before applying them
- Maintain deterministic project state
- Avoid hidden state mutations
REPL CLI provides a deterministic runtime controller that:
- Manages local runtime state in
.repl/runtime/ - Validates AI-generated execution results against strict schemas
- Ensures reproducible, auditable state transitions
- Keeps everything local — no external dependencies
| Command | Description |
|---|---|
repl init |
Initialize REPL project runtime environment |
repl doctor |
Validate system integrity and configuration |
repl reset |
Reset runtime to clean initial state |
repl runtime start |
Start execution session for AI input |
repl runtime stop |
Stop execution session (no state mutation) |
repl runtime apply |
Apply AI execution results (via JSON stdin) |
repl runtime status |
Display current runtime state and progress |
- Deterministic: Identical inputs → identical outputs
- Stateless AI: AI is external and has no access to runtime state
- Validated: All state transitions are explicitly validated
- Local: No backend, no cloud sync, no daemon processes
- Simple: Single binary, zero configuration required
brew install replworks/tap/repl-cligo install github.com/replworks/repl-cli/cmd/repl-cli@latestVerify installation:
repl --version
# Output: repl version 0.1.2repl initOutput:
REPL project initialized successfully
Created: .repl/
Created: .repl/runtime/
Initialized: execution-state.json
Initialized: task-progress.json
Initialized: execution-log.json
Copied: .repl/agent.md
Copied: AGENTS.mdIf
AGENTS.mdalready exists in the project root, the template content (excluding the# AGENTS.mdheading) is prepended to the existing file instead of overwriting it.
repl runtime startOutput:
Starting REPL runtime execution session...
Runtime execution session activated
System is ready for AI execution inputecho '{
"action": "update_runtime",
"taskId": "TASK_1",
"status": "done",
"events": ["step1", "step2", "step3"]
}' | repl runtime applyOutput:
Applying AI execution result...
Task TASK_1 marked as: done
Task completed successfullyrepl runtime statusOutput:
REPL Runtime Status
===================
Session Status:
State: active
Current Task: none
Task Progress:
TASK_1: done
Execution Log (last 5 entries):
- Runtime session started
- Runtime apply executed for task: TASK_1
- Task status updated to: done
- Events: [step1 step2 step3]
Runtime state is readable and consistentrepl runtime stopUser Command
↓
REPL CLI (Cobra Layer)
↓
Runtime Manager (includes validation)
↓
.repl/runtime/* (Local State Assets)All state is stored locally under .repl/runtime/:
- execution-state.json — Session status and current task
- task-progress.json — Task completion status
- execution-log.json — Execution history and audit trail
repl runtime start
↓
Load tasks.md
↓
Load .repl context
↓
Generate AI prompt
↓
Output to stdout
AI Output (JSON)
↓
repl runtime apply (stdin)
↓
Validate schema
↓
Update .repl/runtime/*
↓
Mark TASK status (DONE / BLOCKED)
The repl runtime apply command accepts JSON via stdin with the following schema:
{
"action": "update_runtime",
"taskId": "TASK_1",
"status": "done",
"reason": "optional reason if blocked",
"events": ["event1", "event2"]
}action— Must be exactly"update_runtime"taskId— Target task identifier (e.g.,"TASK_1")status— Must be"done"or"blocked"
reason— Required only whenstatusis"blocked"events— Optional array of execution milestones
Use REPL CLI to manage tasks executed by AI agents:
# Initialize project
repl init
# Start session
repl runtime start
# Let AI execute tasks and apply results
cat > ai_result.json <<EOF
{
"action": "update_runtime",
"taskId": "TASK_1",
"status": "done",
"events": ["analyzed", "implemented", "tested"]
}
EOF
cat ai_result.json | repl runtime apply
# Check status
repl runtime status
# Stop session
repl runtime stopEnsure reproducible builds by tracking execution state:
repl init
repl runtime start
# Execute build steps
echo '{"action":"update_runtime","taskId":"BUILD","status":"done"}' | repl runtime apply
repl runtime status
repl runtime stopManage isolated runtime state per workspace:
# Project A
cd project-a && repl init && repl runtime start
# Project B (separate state)
cd project-b && repl init && repl runtime startREPL CLI is a single binary with no server component.
All operations are command-line driven — no background processes.
All state is local only under .repl/runtime/.
REPL CLI does not execute AI — it only manages state for external AI systems.
Same input → same output. No hidden state, no surprises.
repl-cli/
├── cmd/
│ └── repl/
│ ├── main.go
│ ├── init.go
│ ├── doctor.go
│ ├── reset.go
│ └── runtime.go
├── internal/
│ └── runtime/
│ └── manager.go
├── templates/
│ ├── .repl/
│ │ └── agent.md ← copied to .repl/agent.md on init
│ └── AGENTS.md ← copied (or prepended) to AGENTS.md on init
├── .repl/
│ ├── agent.md
│ ├── product.md
│ ├── framework.md
│ ├── architecture.md
│ └── tasks.md
├── go.mod
└── README.md
go build ./cmd/repl# Initialize project
./repl init
# Validate system
./repl doctor
# Test runtime commands
./repl runtime start
./repl runtime status
./repl runtime stop
./repl resetContributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow Go best practices
- Write unit tests for business logic
- Ensure deterministic behavior
- No external service dependencies in tests
- GitHub App integration for multi-org support
- Configuration file support (
~/.config/repl/config.yaml) - Structured logging with log levels
- Plugin system for custom validators
- Shell completion (bash, zsh, fish)
- Man pages
- Homebrew tap for macOS
- apt repository for Linux
- Chocolatey package for Windows
Q: Is REPL CLI an AI execution engine?
A: No. REPL CLI does not execute AI. It manages runtime state for external AI systems.
Q: Where is my data stored?
A: All data is stored locally under .repl/runtime/ in your project directory. No cloud sync.
Q: Can I use this with any AI system?
A: Yes! REPL CLI is AI-agnostic. It accepts JSON input via stdin, so any AI system can use it.
Q: Is this production-ready?
A: REPL CLI is currently in MVP stage. It's suitable for development and testing. Production use is coming soon.
Q: Why not just use a database?
A: REPL CLI is designed for simplicity and determinism. JSON files are human-readable, version-controllable, and require no additional infrastructure.
This project is licensed under the MIT License — see the LICENSE file for details.
- Built with Cobra — A CLI framework for Go
- Inspired by the need for deterministic AI task management
- Designed for simplicity, explicitness, and reliability
If you find REPL CLI useful, please consider giving it a star! It helps others discover the project.
Have questions? Found a bug? Want to contribute?
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: your.email@example.com
Made with ❤️ for the AI engineering community