Skip to content

Commit 06a53af

Browse files
committed
docs: update README for Zig-based implementation
- Add CI badge - Update installation instructions for pre-built binaries - Add build from source instructions with Zig - Update requirements (no longer needs bash 4.0+) - Add development section with zig build commands - Remove bash script (replaced by Zig binary) Signed-off-by: leocavalcante <[email protected]>
1 parent c33ec66 commit 06a53af

File tree

2 files changed

+44
-1027
lines changed

2 files changed

+44
-1027
lines changed

README.md

Lines changed: 44 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,58 @@
11
# opencoder
22

3-
**Autonomous OpenCode Runner** - A POSIX-compliant Bash script that runs [OpenCode](https://opencode.ai) CLI in a fully autonomous way, creating development plans and executing them continuously without manual intervention.
3+
[![CI](https://github.com/opencodeco/opencoder/actions/workflows/ci.yml/badge.svg)](https://github.com/opencodeco/opencoder/actions/workflows/ci.yml)
4+
5+
**Autonomous OpenCode Runner** - A Zig-powered CLI that runs [OpenCode](https://opencode.ai) in a fully autonomous way, creating development plans and executing them continuously without manual intervention.
46

57
## Features
68

79
- **Autonomous Development Loop** - Continuously plans, executes, and evaluates without stopping
810
- **Two-Model Architecture** - Uses a high-capability model for planning and a faster model for execution
911
- **Provider Presets** - Quick setup with GitHub Copilot, Anthropic, OpenAI, or OpenCode backends
10-
- **State Persistence** - Resumes from where it left off after interruptions
12+
- **State Persistence** - Resumes from where it left off after interruptions (JSON format)
1113
- **Exponential Backoff** - Graceful retry logic for transient failures
1214
- **Plan History** - Archives completed plans for reference
1315
- **Signal Handling** - Clean shutdown with state preservation
16+
- **Cross-Platform** - Builds for Linux and macOS (amd64/arm64)
1417

1518
## Installation
1619

17-
### Quick Install
20+
### Pre-built Binaries
21+
22+
Download the latest release for your platform from [GitHub Releases](https://github.com/opencodeco/opencoder/releases):
1823

1924
```bash
20-
curl -fsSL https://raw.githubusercontent.com/opencodeco/opencoder/main/opencoder -o opencoder
25+
# Linux (amd64)
26+
curl -fsSL https://github.com/opencodeco/opencoder/releases/latest/download/opencoder-linux-amd64 -o opencoder
27+
28+
# Linux (arm64)
29+
curl -fsSL https://github.com/opencodeco/opencoder/releases/latest/download/opencoder-linux-arm64 -o opencoder
30+
31+
# macOS (Intel)
32+
curl -fsSL https://github.com/opencodeco/opencoder/releases/latest/download/opencoder-macos-amd64 -o opencoder
33+
34+
# macOS (Apple Silicon)
35+
curl -fsSL https://github.com/opencodeco/opencoder/releases/latest/download/opencoder-macos-arm64 -o opencoder
36+
37+
# Make executable and move to PATH
2138
chmod +x opencoder
2239
sudo mv opencoder /usr/local/bin/
2340
```
2441

25-
### Manual Install
42+
### Build from Source
43+
44+
Requires [Zig 0.15+](https://ziglang.org/download/):
2645

27-
1. Download the script:
2846
```bash
2947
git clone https://github.com/opencodeco/opencoder.git
3048
cd opencoder
31-
```
32-
33-
2. Make it executable and move to PATH:
34-
```bash
35-
chmod +x opencoder
36-
sudo cp opencoder /usr/local/bin/
49+
zig build -Doptimize=ReleaseSafe
50+
sudo cp zig-out/bin/opencoder /usr/local/bin/
3751
```
3852

3953
## Requirements
4054

4155
- [OpenCode CLI](https://opencode.ai) installed and configured
42-
- Bash 4.0+ (macOS may need `brew install bash`)
43-
- Standard POSIX utilities (sed, grep, date)
4456

4557
## Usage
4658

@@ -87,6 +99,7 @@ opencoder -P openai/gpt-4 -E openai/gpt-4o-mini "build a CLI tool"
8799
| `-p, --project DIR` | Project directory (default: current directory) |
88100
| `-v, --verbose` | Enable verbose logging |
89101
| `-h, --help` | Show help message |
102+
| `--version` | Show version |
90103

91104
## Provider Presets
92105

@@ -124,10 +137,8 @@ Opencoder creates a `.opencoder/` directory in your project:
124137

125138
```
126139
.opencoder/
127-
├── state # Current execution state
140+
├── state.json # Current execution state (JSON)
128141
├── current_plan.md # Active task plan
129-
├── alerts.log # Critical error alerts
130-
├── config.env # Optional configuration overrides
131142
├── history/ # Archived completed plans
132143
│ └── plan_YYYYMMDD_HHMMSS_cycleN.md
133144
└── logs/
@@ -176,6 +187,22 @@ Using bcrypt for password hashing, JWT for tokens.
176187
- **Check the logs** - Detailed logs are in `.opencoder/logs/` if something goes wrong
177188
- **Review history** - Completed plans are archived in `.opencoder/history/`
178189

190+
## Development
191+
192+
```bash
193+
# Build debug version
194+
zig build
195+
196+
# Run tests
197+
zig build test
198+
199+
# Check formatting
200+
zig fmt --check src/
201+
202+
# Build release
203+
zig build -Doptimize=ReleaseSafe
204+
```
205+
179206
## License
180207

181208
MIT License - See [LICENSE](LICENSE) file.

0 commit comments

Comments
 (0)