Skip to content

feat: one-command install — bare system to running aidevops#680

Merged
marcusquinn merged 1 commit intomainfrom
feature/one-command-install
Feb 8, 2026
Merged

feat: one-command install — bare system to running aidevops#680
marcusquinn merged 1 commit intomainfrom
feature/one-command-install

Conversation

@marcusquinn
Copy link
Owner

@marcusquinn marcusquinn commented Feb 8, 2026

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)

  • Auto-install git in bootstrap_repo() — detects OS/package manager (apt/dnf/yum/pacman/apk/xcode-select) and installs git automatically instead of failing with an error
  • OrbStack VM bootstrap — on macOS via curl, presents choice to install locally or in a Linux VM via OrbStack (auto-installs OrbStack via Homebrew, creates Ubuntu VM, runs installer recursively inside it)
  • setup_nodejs() — new function that installs Node.js 22.x LTS via NodeSource on Debian/Ubuntu, Homebrew on macOS, or appropriate package manager for other distros
  • setup_opencode_cli() — installs OpenCode (opencode-ai@latest) via bun (preferred) or npm fallback
  • setup_orbstack_vm() — offers OrbStack VM setup during interactive flow on macOS
  • Fix Tabby ARM64 failure — detects aarch64/arm64 and skips packagecloud repo (x86_64 only), directs to GitHub releases instead

AGENTS.md

  • Added "Development Lifecycle (MANDATORY)" section requiring TODO entry before work and full-loop testing

TODO.md

  • Added task t186 for the AGENTS.md development lifecycle rule

Testing

Test Result
Docker syntax tests (172/172) Pass
Git auto-install on bare Ubuntu 24.04 Pass
Full Node+Bun+OpenCode install chain Pass
Non-interactive setup.sh (830 agent files, 183 scripts) Pass
OrbStack detection logic on macOS Pass
ARM64 Tabby detection Pass
ShellCheck (no new violations) Pass
Linters-local (all issues pre-existing) Pass

Notes

  • End-to-end curl test not possible until merged (fetches from GitHub)
  • OrbStack VM creation not tested destructively (validated detection/logic only)

Summary by CodeRabbit

  • New Features

    • Enhanced setup process with Node.js runtime installation featuring cross-platform support (brew, apt, dnf/yum, pacman, apk).
    • Added OpenCode CLI installation to the setup flow.
    • Added OrbStack VM setup capability for macOS users, integrated earlier in the bootstrap sequence.
  • Documentation

    • Added Development Lifecycle section documenting complete workflow and verification requirements.

… 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)
@gemini-code-assist
Copy link

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 8, 2026

Walkthrough

This 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

Cohort / File(s) Summary
Documentation & Workflow
AGENTS.md, TODO.md
Added mandatory Development Lifecycle section to AGENTS.md detailing step-by-step developer workflow (TODO entry creation, full-cycle testing, verification). Corresponding backlog item t186 added to track enforcement.
Setup Automation
setup.sh
Introduced three new public functions: setup_nodejs() with cross-platform installation (brew, apt, dnf/yum, pacman, apk), setup_opencode_cli() for OpenCode CLI installation via bun/npm, and setup_orbstack_vm() for macOS-only OrbStack VM setup. Integrated into main setup sequence with interactive confirmation steps. Updated Tabby installation to handle ARM64 Linux separately.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🔧 A lifecycle flows through the developer's day,
From TODO seed to delivery's way,
Setup now smoother with Node and the rest,
OrbStack, OpenCode—all put to the test,
Zero debt thrives as the workflows align! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main objective: enabling single-command installation from bare systems to a working aidevops environment, which is the primary focus of changes across setup.sh, AGENTS.md, and TODO.md.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/one-command-install

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Feb 8, 2026

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 42 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Sun Feb 8 22:58:02 UTC 2026: Code review monitoring started
Sun Feb 8 22:58:02 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 42

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 42
  • VULNERABILITIES: 0

Generated on: Sun Feb 8 22:58:05 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 8, 2026

@marcusquinn marcusquinn merged commit 8c8ef90 into main Feb 8, 2026
10 of 11 checks passed
@marcusquinn marcusquinn deleted the feature/one-command-install branch February 8, 2026 23:01
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_install for 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/apk paths 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 how setup_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/worktree

This 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.

Comment on lines +1026 to +1033
# 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

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.

Comment on lines +1057 to +1062
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

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.

marcusquinn added a commit that referenced this pull request Feb 8, 2026
…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.
marcusquinn added a commit that referenced this pull request Feb 8, 2026
- 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant