-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathralph.sh
More file actions
executable file
·31 lines (26 loc) · 893 Bytes
/
ralph.sh
File metadata and controls
executable file
·31 lines (26 loc) · 893 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
# Ralph Wiggum - Long-running AI agent loop
# Usage: ./ralph.sh [--tool amp|claude|opencode] [--max-iterations N] [--model MODEL] [--no-archive]
set -euo pipefail
# Source the library modules
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
done
SCRIPT_DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
# Consolidated Libraries
# shellcheck source=lib/utils.sh
# shellcheck disable=SC1091
source "$SCRIPT_DIR/lib/utils.sh"
# shellcheck source=lib/engine.sh
# shellcheck disable=SC1091
source "$SCRIPT_DIR/lib/engine.sh"
# shellcheck source=lib/tools.sh
# shellcheck disable=SC1091
source "$SCRIPT_DIR/lib/tools.sh"
# Check dependencies before running
check_dependencies || exit 1
# Run main function
main "$@"