feat: one-command install — bare system to running aidevops#680
feat: one-command install — bare system to running aidevops#680marcusquinn merged 1 commit intomainfrom
Conversation
… and OrbStack VM support Enable `bash <(curl -fsSL https://aidevops.sh/install)` to work on bare systems: - Auto-detect OS/package manager and install git when missing - Add setup_nodejs() with NodeSource 22.x LTS for Debian/Ubuntu - Add setup_opencode_cli() via bun (preferred) or npm fallback - Add OrbStack VM bootstrap choice on macOS (install in Linux VM) - Fix Tabby ARM64 Linux failure (skip packagecloud on aarch64) - Add development lifecycle enforcement rule to AGENTS.md (t186)
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
WalkthroughThis pull request adds development lifecycle enforcement documentation to AGENTS.md, introduces three new setup functions in setup.sh (Node.js, OpenCode CLI, and OrbStack VM installation), and integrates them into the main setup flow with platform-specific handling. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Sun Feb 8 22:58:05 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@setup.sh`:
- Around line 1057-1062: The unbounded "until command -v git" loop after calling
xcode-select --install can hang forever if the user cancels or installation
fails; modify the block around the xcode-select call and the until loop to add a
timeout: introduce a MAX_WAIT_SECONDS (configurable) and a start timestamp, then
in each iteration check elapsed time and break with a non-zero exit (and a clear
error via print_error or similar) if elapsed exceeds MAX_WAIT_SECONDS; keep the
sleep 5 interval and ensure the success path still continues when git appears.
Target the shell snippet containing the xcode-select --install invocation and
the "until command -v git" loop to implement this timeout logic.
- Around line 1026-1033: The check that uses `orb list | grep -q "$vm_name"` can
falsely match substrings like `aidevops-dev`; update the existence test to
perform an exact match of the VM name: change the `grep -q` usage that
references `vm_name` to an exact-line or fixed-string exact match (e.g., use
grep -xF or a anchored regex like ^$vm_name$) so only a VM named exactly
"aidevops" triggers the "Using existing OrbStack VM" branch; ensure the
substitution still respects the `vm_name` variable and preserves the stderr
suppression.
🧹 Nitpick comments (3)
setup.sh (2)
1072-1116: Repetitive git install branches could be consolidated.All six package manager branches follow the same pattern: print → install → verify → error/success. Consider extracting a small local helper to reduce ~45 lines of near-identical code.
♻️ Suggested consolidation
+ # Helper for git auto-install across package managers + install_git_with() { + local pm_name="$1"; shift + print_info "Installing git via $pm_name..." + if "$@" && command -v git >/dev/null 2>&1; then + print_success "git installed" + else + print_error "git installation failed" + exit 1 + fi + } + - elif command -v apt-get >/dev/null 2>&1; then - print_info "Installing git via apt..." - sudo apt-get update -qq && sudo apt-get install -y -qq git - if ! command -v git >/dev/null 2>&1; then - print_error "git installation failed" - exit 1 - fi - print_success "git installed" - elif command -v dnf >/dev/null 2>&1; then ... + elif command -v apt-get >/dev/null 2>&1; then + install_git_with "apt" sudo apt-get update -qq && sudo apt-get install -y -qq git + elif command -v dnf >/dev/null 2>&1; then + install_git_with "dnf" sudo dnf install -y git + elif command -v yum >/dev/null 2>&1; then + install_git_with "yum" sudo yum install -y git + elif command -v pacman >/dev/null 2>&1; then + install_git_with "pacman" sudo pacman -S --noconfirm git + elif command -v apk >/dev/null 2>&1; then + install_git_with "apk" sudo apk add git
3792-3886:setup_nodejs()is well-structured and follows existing patterns.Good use of
verified_installfor the NodeSource setup script, with a fallback to distro packages. The early-return when Node.js is already present avoids unnecessary work.One minor note: the
dnf/yum/pacman/apkpaths install whatever version the distro provides, which may be significantly older than 22.x. Consider adding a post-install version check with a warning if the installed version is below the minimum required (e.g., 18+), similar to howsetup_nodejs_env()(line 3129) already checks.AGENTS.md (1)
70-86: Strong enforcement of quality workflow with clear steps.This mandatory lifecycle section addresses the real problem of untested code being shipped (as noted in TODO.md t186). The workflow is well-structured:
- Step 1-2: Creates decision point for immediate vs orchestrated work
- Step 3: Defines comprehensive full-loop (plan → implement → test → verify → deliver)
- Step 4: Ensures queued work has proper metadata
- Summary: Reinforces non-negotiable testing requirement
The section follows the framework's progressive disclosure pattern by referencing concepts like "full-loop", "runner orchestration", and "supervisor" without inline expansion. This is consistent with the learnings about keeping root AGENTS.md concise.
Optional future enhancement: Consider adding links to detailed documentation for key concepts:
3. **If implementing now**, follow the full-loop development lifecycle: + (See `.agents/workflows/full-loop.md` for detailed guide) - Create branch/worktreeThis would help new contributors understand the referenced workflows. However, the current version is effective and addresses the immediate need. Based on learnings, AGENTS.md should use progressive disclosure with pointers to subagents.
| # Create or use existing Ubuntu VM | ||
| local vm_name="aidevops" | ||
| if orb list 2>/dev/null | grep -q "$vm_name"; then | ||
| print_info "Using existing OrbStack VM: $vm_name" | ||
| else | ||
| print_info "Creating Ubuntu VM: $vm_name..." | ||
| orb create ubuntu "$vm_name" | ||
| fi |
There was a problem hiding this comment.
grep -q "$vm_name" may match unintended VM names.
If a VM named aidevops-dev or my-aidevops already exists, this grep will match it as well, potentially skipping creation when the exact aidevops VM doesn't exist.
🔧 Proposed fix for exact VM name matching
- if orb list 2>/dev/null | grep -q "$vm_name"; then
+ if orb list 2>/dev/null | grep -qw "$vm_name"; then🤖 Prompt for AI Agents
In `@setup.sh` around lines 1026 - 1033, The check that uses `orb list | grep -q
"$vm_name"` can falsely match substrings like `aidevops-dev`; update the
existence test to perform an exact match of the VM name: change the `grep -q`
usage that references `vm_name` to an exact-line or fixed-string exact match
(e.g., use grep -xF or a anchored regex like ^$vm_name$) so only a VM named
exactly "aidevops" triggers the "Using existing OrbStack VM" branch; ensure the
substitution still respects the `vm_name` variable and preserves the stderr
suppression.
| if xcode-select --install 2>/dev/null; then | ||
| # Wait for installation to complete | ||
| print_info "Waiting for Xcode CLT installation to complete..." | ||
| until command -v git >/dev/null 2>&1; do | ||
| sleep 5 | ||
| done |
There was a problem hiding this comment.
Unbounded wait loop when xcode-select --install is invoked.
If the user dismisses the Xcode CLT dialog or the installation fails silently, this until loop will spin forever. Add a timeout to prevent the script from hanging.
🔧 Proposed fix with timeout
- print_info "Waiting for Xcode CLT installation to complete..."
- until command -v git >/dev/null 2>&1; do
- sleep 5
- done
- print_success "git installed via Xcode Command Line Tools"
+ print_info "Waiting for Xcode CLT installation to complete (up to 5 minutes)..."
+ local xcode_wait=0
+ until command -v git >/dev/null 2>&1; do
+ sleep 5
+ ((xcode_wait++)) || true
+ if [[ $xcode_wait -ge 60 ]]; then
+ print_error "Timed out waiting for Xcode CLT installation"
+ echo "Complete the installation manually, then re-run the installer."
+ exit 1
+ fi
+ done
+ print_success "git installed via Xcode Command Line Tools"🤖 Prompt for AI Agents
In `@setup.sh` around lines 1057 - 1062, The unbounded "until command -v git" loop
after calling xcode-select --install can hang forever if the user cancels or
installation fails; modify the block around the xcode-select call and the until
loop to add a timeout: introduce a MAX_WAIT_SECONDS (configurable) and a start
timestamp, then in each iteration check elapsed time and break with a non-zero
exit (and a clear error via print_error or similar) if elapsed exceeds
MAX_WAIT_SECONDS; keep the sleep 5 interval and ensure the success path still
continues when git appears. Target the shell snippet containing the xcode-select
--install invocation and the "until command -v git" loop to implement this
timeout logic.
…ck VM name - Add 5-minute timeout to xcode-select --install wait loop to prevent hanging forever if user cancels or installation fails silently - Use grep -qxF for exact VM name matching to prevent substring matches (e.g., 'aidevops-dev' no longer falsely matches 'aidevops') Addresses CodeRabbit feedback from PR #680.
- Add 5-minute timeout to xcode-select --install wait loop to prevent hanging forever if user cancels or installation fails silently - Use grep -qxF for exact VM name matching to prevent substring matches (e.g., 'aidevops-dev' no longer falsely matches 'aidevops') Addresses CodeRabbit feedback from PR #680.



Summary
Enable
bash <(curl -fsSL https://aidevops.sh/install)to work on completely bare systems (no git, no Node.js, no package manager setup) and reach a fully functional aidevops installation with OpenCode ready to launch.Changes
setup.sh (368 insertions, 29 deletions)
bootstrap_repo()— detects OS/package manager (apt/dnf/yum/pacman/apk/xcode-select) and installs git automatically instead of failing with an errorsetup_nodejs()— new function that installs Node.js 22.x LTS via NodeSource on Debian/Ubuntu, Homebrew on macOS, or appropriate package manager for other distrossetup_opencode_cli()— installs OpenCode (opencode-ai@latest) via bun (preferred) or npm fallbacksetup_orbstack_vm()— offers OrbStack VM setup during interactive flow on macOSaarch64/arm64and skips packagecloud repo (x86_64 only), directs to GitHub releases insteadAGENTS.md
TODO.md
Testing
Notes
curltest not possible until merged (fetches from GitHub)Summary by CodeRabbit
New Features
Documentation