remote-ralph 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +117 -0
- package/dist/index.js +1732 -0
- package/package.json +45 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 georg.dev
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# remote-ralph
|
|
2
|
+
|
|
3
|
+
Autonomous AI coding workflow with human-in-the-loop via GitHub PRs:
|
|
4
|
+
|
|
5
|
+
remote-ralph takes your features → implements → opens PRs → responds to reviews → repeats. 24/7.
|
|
6
|
+
|
|
7
|
+
You review & merge - from anywhere 🏝️
|
|
8
|
+
|
|
9
|
+
> **Want to see remote-ralph in action?** [Check out the pull requests](https://github.com/georg-unterholzner/remote-ralph/pulls?q=is%3Apr+is%3Aclosed+author%3Aremote-ralph) - remote-ralph builds itself.
|
|
10
|
+
|
|
11
|
+
## Prerequisites
|
|
12
|
+
|
|
13
|
+
- **Node.js 22+**
|
|
14
|
+
- **AI coding agent** (e.g. Claude Code, Codex CLI, OpenCode)
|
|
15
|
+
- **Separate GitHub account** for the agent (so PRs come from a distinct user)
|
|
16
|
+
- **[gh CLI](https://cli.github.com/)** authenticated as the agent's GitHub account
|
|
17
|
+
|
|
18
|
+
## Usage
|
|
19
|
+
|
|
20
|
+
### Minimal
|
|
21
|
+
|
|
22
|
+
> **Caution:** in this case, the agent has access to your filesystem & network. You should run it in a sandbox (see below).
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx remote-ralph \
|
|
26
|
+
--requirements-path ./requirements.json \
|
|
27
|
+
--command "claude -p {prompt} --dangerously-skip-permissions"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Sandboxed (recommended)
|
|
31
|
+
|
|
32
|
+
Requires [Docker sandboxes](https://docs.docker.com/ai/sandboxes/). If not available (i.e. on Linux), create your own custom container for sandboxing.
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npx remote-ralph \
|
|
36
|
+
--requirements-path ./requirements.json \
|
|
37
|
+
--command "docker sandbox run claude -p --max-turns 10 {prompt} --dangerously-skip-permissions"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Resume after crash/reboot
|
|
41
|
+
|
|
42
|
+
Re-run the same command. The agent will resume automatically where it left off.
|
|
43
|
+
|
|
44
|
+
## CLI Options
|
|
45
|
+
|
|
46
|
+
| Option | Required | Default | Description |
|
|
47
|
+
|---|---|---|---|
|
|
48
|
+
| `--requirements-path` | Yes | — | Path to requirements JSON file |
|
|
49
|
+
| `--command` | Yes | — | Agent command template (must contain `{prompt}`) |
|
|
50
|
+
| `--config-path` | No | `.remote-ralph/config.json` | Path to config file |
|
|
51
|
+
| `--state-path` | No | `.remote-ralph/state.json` | Where to persist current PR link |
|
|
52
|
+
| `--log-level` | No | `info` | `error`, `warn`, `info`, or `debug` |
|
|
53
|
+
|
|
54
|
+
CLI args override config file values.
|
|
55
|
+
|
|
56
|
+
## Config File
|
|
57
|
+
|
|
58
|
+
Optional JSON config at `.remote-ralph/config.json` (or path specified by `--config-path`). Missing file = all defaults.
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"pollIntervalMinutes": 5,
|
|
63
|
+
"statePath": "./.remote-ralph/state.json",
|
|
64
|
+
"logLevel": "info",
|
|
65
|
+
"pretext": "Always use TypeScript",
|
|
66
|
+
"allowlist": ["alice", "bob"],
|
|
67
|
+
"requireMention": false,
|
|
68
|
+
"mergeConflictResolution": "withThreads"
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
| Key | Type | Default | Description |
|
|
73
|
+
|---|---|---|---|
|
|
74
|
+
| `pollIntervalMinutes` | number | `5` | Minutes between poll ticks (must be positive) |
|
|
75
|
+
| `statePath` | string | `./.remote-ralph/state.json` | Where to persist current PR link |
|
|
76
|
+
| `logLevel` | `error` \| `warn` \| `info` \| `debug` | `info` | Log verbosity |
|
|
77
|
+
| `pretext` | string | `""` | Prepended to implement & reaction prompts |
|
|
78
|
+
| `allowlist` | string[] | `[]` | Allowed reviewer GitHub usernames. Limits who can trigger agent reactions (empty = allow all). Prevents unnecessary token usage and somewhat mitigates prompt injection from non-allowlisted users (note: agent still has full `gh` CLI access and may see all comments on subsequent passes). |
|
|
79
|
+
| `requireMention` | boolean | `false` | When `true`, a thread is only actionable if the latest comment @mentions the bot. Useful to avoid reacting to every comment |
|
|
80
|
+
| `mergeConflictResolution` | `"never"` \| `"withThreads"` \| `"always"` | `"withThreads"` | Controls auto-resolution of merge conflicts. `never`: no automatic merge conflict resolution. `withThreads`: attempt conflict resolution when actionable threads exist. `always`: invoke agent for conflict resolution even without threads |
|
|
81
|
+
|
|
82
|
+
All fields are optional. Validated with zod — invalid JSON or schema violations exit with error.
|
|
83
|
+
|
|
84
|
+
## Caveats
|
|
85
|
+
|
|
86
|
+
- If you use different git users for orchestrator and agent, ensure they use the same auth method (both SSH or both HTTPS). They share `.git/config`, so mismatched methods can cause the agent to rewrite the remote URL.
|
|
87
|
+
|
|
88
|
+
## State File
|
|
89
|
+
|
|
90
|
+
The state file stores only the **current PR link**. This enables crash recovery: on restart, the orchestrator detects the existing PR and resumes polling instead of creating a duplicate.
|
|
91
|
+
|
|
92
|
+
When a PR is merged or closed, the state is cleared and the next implementation cycle begins.
|
|
93
|
+
|
|
94
|
+
## Requirements File
|
|
95
|
+
|
|
96
|
+
A JSON array of items. The only field the loop cares about is `passes: boolean`. The agent picks the first item where `passes` is `false`, implements it, flips it to `true`, and opens a PR.
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
[
|
|
100
|
+
{ "id": "F-001", "title": "My feature", "passes": false },
|
|
101
|
+
{ "id": "F-002", "title": "Another feature", "passes": false }
|
|
102
|
+
]
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Structure beyond `passes` is up to you; add whatever context helps your agent.
|
|
106
|
+
|
|
107
|
+
## Roadmap
|
|
108
|
+
|
|
109
|
+
### 0.2.0
|
|
110
|
+
|
|
111
|
+
- **Reply prefix:** configurable prefix for bot replies, used for bot comment detection
|
|
112
|
+
- **Command routing:** route review threads to different agents based on tokens (e.g. `#Opus`, `#Sonnet`)
|
|
113
|
+
|
|
114
|
+
### 1.0.0
|
|
115
|
+
|
|
116
|
+
- **Concurrency:** multiple agents working on different features simultaneously, shipping in parallel
|
|
117
|
+
- **GitHub Issues integration:** describe what you want in an issue, remote-ralph clarifies the requirements with you, then picks it up and starts building
|