rho
An AI agent that stays running, remembers across sessions, and checks in on its own. macOS, Linux, Android. Built on Pi.
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Check it deeper on your machine
It has changed since its scan on 11 Nov 2026.
As a Claude Code plugin, install it and then ask Claude Code:
/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/mikeyobrien/rho with scanskillsafety
Or from a terminal, clone it and run it:
git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/mikeyobrien/rho'
It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.
Badge for your README
Markdown
[](/listings/mikeyobrien--rho)HTML
<a href="/listings/mikeyobrien--rho"><img src="/api/listings/mikeyobrien--rho/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
Prerequisites: **Node.js 18+**, **tmux**, **git**
npm install -g @rhobot-dev/rho rho init && rho sync rho login && rho start rho
That gives you: - initialized config in `~/.rho/` - authenticated provider access via pi - background heartbeat daemon - an attached interactive session
First 5 minutes
Run these after install:
rho status # daemon + module health /rho status # heartbeat status (inside session) /rho now # trigger immediate check-in /brain # open memory viewer /vault inbox # see captured knowledge items
---
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
SKILL.md · Manifest · 205 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
- ---
- name: install-rho
- description: "Install and configure Rho from scratch (Doom-style init.toml + sync). Only prereq: a coding agent that can run shell commands."
- ---
- # Install Rho
- Rho is a persistent AI agent framework. It runs in tmux, checks in on a heartbeat, accumulates memory in a single brain.jsonl file, and manages a knowledge vault. This skill installs it from scratch.
- **Prerequisites:** A coding agent that can run shell commands. That's it.
- **What gets installed:**
- - System deps (Node.js 18+, npm, tmux, git)
- - [pi coding agent](https://github.com/badlogic/pi-mono) (the runtime rho extends)
- - [rho](https://github.com/mikeyobrien/rho) (the agent framework)
- - Config files in `~/.rho/` (init.toml, packages.toml, brain.jsonl)
- **Time:** ~5 minutes on a decent connection.
- ## Parameters
- - **agent_name** (optional, default: `rho`): Name written into `~/.rho/init.toml`.
- - **heartbeat_interval** (optional, default: `30m`): How often the agent checks in. Written to `[settings.heartbeat].interval`.
- ## Steps
- ### 1. Detect environment
- Print OS, shell, and dependency versions. This determines the install path.
- **Constraints:**
- - You MUST print OS + shell + node version (if present).
- - You MUST NOT assume Termux unless `$TERMUX_VERSION` is set.
- ```bash
- uname -a
- printf "SHELL=%s\n" "$SHELL"
- command -v node >/dev/null && node -v || echo "node: missing"
- command -v npm >/dev/null && npm -v || echo "npm: missing"
- command -v tmux >/dev/null && tmux -V || echo "tmux: missing"
- command -v git >/dev/null && git --version || echo "git: missing"
- command -v pi >/dev/null && pi --version || echo "pi: missing"
- command -v rho >/dev/null && rho --version || echo "rho: missing"
- ```
- ### 2. Install system dependencies
- **Constraints:**
- - You MUST ensure: Node.js >= 18, npm, tmux, git.
- - You MUST detect the platform and use the correct package manager.
- - You MUST NOT blindly run `sudo apt install` — detect the package manager first.
- #### Android / Termux
- ```bash
- pkg update -y
- pkg install -y nodejs-lts tmux git
- ```
- #### macOS
- ```bash
- brew install node tmux git
- ```
- #### Linux
- Detect the package manager:
- | Distro | Command |
- |--------|---------|
- | NixOS | Add to `environment.systemPackages` or `nix-shell -p nodejs tmux git` |
- | Debian/Ubuntu | `sudo apt update && sudo apt install -y nodejs npm tmux git` |
- | Arch | `sudo pacman -S nodejs npm tmux git` |
- | Fedora | `sudo dnf install nodejs npm tmux git` |
- If Node.js version is < 18, use [NodeSource](https://github.com/nodesource/distributions) or nvm.
- ### 3. Install pi coding agent
- pi is the runtime that rho extends. Install it globally.
- **Constraints:**
- - You MUST install pi globally if `command -v pi` fails.
- - You MUST verify the install succeeded.
- ```bash
- command -v pi >/dev/null || npm install -g @mariozechner/pi-coding-agent
- pi --version
- ```
- ### 4. Install rho
- Clone the repo and run the installer. The installer handles config bootstrapping, CLI setup, and brain initialization.
- **Constraints:**
- - You MUST clone to `~/.rho/project` (the default path).
- - You MUST NOT clone if the repo already exists (pull instead).
- - You MUST run `install.sh` from within the repo directory.
- ```bash
- if [ -d ~/.rho/project/.git ]; then
- echo "Rho repo exists, pulling latest..."
- cd ~/.rho/project && git pull --ff-only
- else
- git clone https://github.com/mikeyobrien/rho.git ~/.rho/project
- fi
- cd ~/.rho/project && bash install.sh
- ```
- The installer will:
- 1. Detect your platform
- 2. Check/install remaining dependencies
- 3. Install Node deps for the project
- 4. Set up the `rho` CLI on your PATH
- 5. Run `rho init` (generates `~/.rho/init.toml`, `~/.rho/packages.toml`, and brain.jsonl defaults)
- 6. Run `rho sync` (writes pi's `settings.json` from your config)
- ### 5. Configure heartbeat interval (optional)
- If the user requested a non-default interval, edit `~/.rho/init.toml`:
- ```bash
- # Find the [settings.heartbeat] section and set the interval
- sed -i 's/interval = "30m"/interval = "'"${HEARTBEAT_INTERVAL}"'"/' ~/.rho/init.toml
- rho sync
- ```
- ### 6. Verify installation
- **Constraints:**
- - You MUST run `rho doctor` and report any failures.
- - You MUST NOT declare success if doctor reports errors.
- ```bash
- rho doctor
- ```
- ### 7. Authenticate
- **Constraints:**
- - You MUST tell the user to run `rho login` to set up their LLM provider.
- - You MUST NOT run `rho login` automatically (it's interactive).
- Tell the user:
- > Run `rho login` to authenticate with your LLM provider (Anthropic, OpenAI, etc). This is interactive — you'll need to provide API keys or log in via browser.
- ### 8. Start rho (optional)
- **Constraints:**
- - You MUST ask before starting background processes.
- ```bash
- rho
- ```
- This starts the daemon if needed and attaches to the tmux session.
- ### 9. Post-install orientation
- Share these essentials with the user:
- **Key files:**
- - `~/.rho/init.toml` — Main config (Doom-style: modules, settings)
- - `~/.rho/packages.toml` — Third-party pi packages
- - `~/.rho/brain/brain.jsonl` — Single source of truth for all memory (behaviors, learnings, preferences, tasks, reminders)
- **Memory system:**
- - `/brain` or `brain action=list` — View memory stats
- - `brain action=add type=learning text="..."` — Add a learning
- - `brain action=add type=preference text="..." category=Code` — Add a preference
- - `brain action=add type=task description="..." priority=high` — Add a task
- - `brain action=add type=reminder text="..." cadence={kind:"daily",at:"08:00"}` — Add a reminder
- - `memory-consolidate` — Run consolidation (decay stale entries, mine sessions since last consolidation)
- **CLI basics:**
- - `rho` — Start and attach
- - `rho status` — Show daemon and module status
- - `rho doctor` — Health check
- - `rho trigger` — Force immediate heartbeat
- - `rho stop` — Stop daemon
- - `rho upgrade` — Update rho and sync new modules
- **Inside a session:**
- - `/rho status` — Heartbeat state
- - `/rho now` — Trigger check-in
- - `/rho interval 30m` — Set check-in interval
- **tmux essentials (if unfamiliar):**
- - Detach: `Ctrl-b d`
- - List sessions: `tmux -L rho ls`
- - Attach: `tmux -L rho attach -t rho`
- ## Troubleshooting
- | Problem | Fix |
- |---------|-----|
- | `rho sync` says pi missing | `npm install -g @mariozechner/pi-coding-agent` |
- | `rho doctor` shows settings out of sync | `rho sync` |
- | `rho` not found after install | Add `~/.local/bin` to PATH |
- | tmux missing | Install with your platform's package manager |
- | Node.js < 18 | Upgrade via nvm or NodeSource |
- | `install.sh` fails on NixOS | Dependencies must be in your nix config, not installed via apt |
README.md · README · 295 lines · 1 finding marked
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
- # rho
- [](https://deepwiki.com/mikeyobrien/rho)
- [](https://x.com/tau_rho_ai)
- An always-on personal AI operator that:
- - stays running in the background,
- - remembers context across sessions,
- - and checks in proactively on a schedule.
- Runs on **macOS**, **Linux**, and **Android** (plus **iPhone/iPad via SSH**).
- <p align="center">
- <img alt="rho web ui" src="docs/web-ui-hero.jpg" />
- </p>
- Built on [pi coding agent](https://github.com/badlogic/pi-mono).
- <details>
- <summary><b>Terminal demo</b></summary>
- 
- </details>
- ---
- ## Why rho
- Most AI tools are stateless chat tabs. rho is built for ongoing operation.
- - **Persistent memory**: durable context across sessions
- - **Memory observability**: inspect, search, and edit what the agent has learned
- - **Proactive heartbeat**: check-ins every 30m by default
- - **Local-first state**: your memory and config stay on your machine
- - **BYO model/provider**: use your own pi/provider setup
- - **Multi-surface control**: terminal, web UI, Telegram, and agent email
- ---
- ## 2-minute quick start (recommended)
- Prerequisites: **Node.js 18+**, **tmux**, **git**
- ```bash
- npm install -g @rhobot-dev/rho
- rho init && rho sync
- rho login && rho start
- rho
- ```
- That gives you:
- - initialized config in `~/.rho/`
- - authenticated provider access via pi
- - background heartbeat daemon
- - an attached interactive session
- ### First 5 minutes
- Run these after install:
- ```bash
- rho status # daemon + module health
- /rho status # heartbeat status (inside session)
- /rho now # trigger immediate check-in
- /brain # open memory viewer
- /vault inbox # see captured knowledge items
- ```
- ---
- ## Web UI (first-class, built in)
- rho includes a browser workspace for day-to-day operation:
- - chat with real-time streaming responses
- - session browsing + forking from any message
- - memory management (`/brain` entries)
- - task management
- - config editing (`~/.rho/init.toml`)
- - line-level code review at `/review`
- ### Lightweight + performant by design
- - **No-build web split**: server logic in `web/*.ts`, browser runtime in `web/public/js/*.js` (no frontend bundler/transpile pipeline).
- - **Lean server runtime**: Hono-based routes with response compression enabled.
- - **Low-latency updates**: live RPC/WebSocket streaming for chat responses.
- - **Push over poll where possible**: server emits `sessions_changed` UI events; client updates immediately.
- - **Idle-aware behavior**: polling pauses when the tab is hidden or user is idle, then resumes on activity.
- - **Render throttling for streams**: markdown updates are debounced (150ms) to reduce UI churn during rapid token deltas.
- - **Session metadata caching**: session info is cached by file `mtime` to avoid unnecessary re-reads.
- ```bash
- rho web
- rho web --port 4000
- rho web --open
- ```
- Then open `http://localhost:3141` (or your host IP).
- ### Positioning vs OpenClaw / nanobot
- | Project | Web experience emphasis |
- |---|---|
- | **rho** | Built-in operator workspace with stronger memory observability and a lightweight no-build stack (chat, learned-memory inspection/editing, tasks, config, review) |
- | **OpenClaw** | Strong Gateway Control UI + WebChat control plane |
- | **nanobot** | README primarily emphasizes CLI + channel gateway flows |
- ---
- ## Install alternatives
- <details>
- <summary><b>pi package install</b></summary>
- ```bash
- pi install npm:@rhobot-dev/rho
- rho init && rho sync
- rho login && rho start
- ```
- </details>
- <details>
- <summary><b>macOS / Linux (installer script)</b></summary>
- ```bash
- git clone https://github.com/mikeyobrien/rho.git ~/.rho/project
- cd ~/.rho/project && ./install.sh
- ```
- The installer checks missing dependencies and supports NixOS.
- </details>
- <details>
- <summary><b>Android (Termux)</b></summary>
- Install [Termux](https://f-droid.org/packages/com.termux/) and [Termux:API](https://f-droid.org/packages/com.termux.api/) from F-Droid, then:
- ```bash
- curl -fsSL https://rhobot.dev/install | bash
- Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
- Line 142 on GitHub
- ```
- If Termux can't build the optional `node-pty` native module, rho still installs and runs. Only the embedded web terminal drawer is disabled until `node-pty` works on that device.
- </details>
- <details>
- <summary><b>iPhone / iPad via SSH</b></summary>
- Run rho on a server/VPS/home machine, then connect from iOS using Termius (or any SSH client).
- Guide: [docs/iphone-setup.md](docs/iphone-setup.md)
- </details>
- ---
- ## What you can do with rho
- | Use case | What rho does |
- |---|---|
- | **Daily operator loop** | Keeps reminders/tasks alive between sessions and runs periodic check-ins |
- | **Memory-backed coding copilot** | Stores durable behavior/preferences/learnings, and lets you inspect/edit that learned state directly |
- | **Inbox agent** | Gets `name@rhobot.dev`, polls, reads, and replies to email |
- | **Telegram-controlled agent** | Receives prompts from Telegram and responds in-thread |
- | **Browser control panel** | Web UI for chat, memory, tasks, and config |
- ---
- ## Mobile Live Mode (native Android wrapper)
- If you use the native Android wrapper (`mobile/rho-android`) to run rho-web, background behavior has two explicit modes:
- - **Idle Mode (default):** best battery behavior. No always-on background socket while the app is backgrounded; reconnect + replay happens when the app becomes active again.
- - **Live Mode (GO LIVE):** starts an Android foreground service with a persistent notification and lease heartbeats to keep active streams alive while locked/backgrounded.
- Use **Live Mode** when stream continuity matters (for example, long active responses while the phone is locked). Without it, WebView background limits can cause disconnect/orphan behavior around the default orphan window.
- Tradeoffs:
- - higher battery/network usage while Live Mode is active,
- - persistent foreground notification,
- - explicit user-controlled lifecycle (`GO LIVE` / `STOP LIVE`).
- Baseline Live Mode reliability does **not** require Firebase credentials.
- ---
- ## Surfaces and modules
- ### Core runtime
- - **Heartbeat**: scheduled autonomous check-ins
- - **Brain**: append-only structured memory (`brain.jsonl`)
- - **Vault**: markdown knowledge graph (`~/.rho/vault/`)
- ### Channels
- - **Email**: agent inbox at `name@rhobot.dev`
- - **Telegram**: polling adapter with allowlist + moderation flow
- ### Interface
- - **CLI**: `rho ...` commands
- - **Session slash commands**: `/rho`, `/brain`, `/vault`, `/skill`, `/telegram`, `/email`
- - **Web UI**: chat + memory/tasks/config in browser
- ---
- ## Security and ownership model
- - **Your memory is local** (`~/.rho/brain/brain.jsonl`)
- - **Your config is local** (`~/.rho/init.toml`, `~/.rho/packages.toml`)
- - **Your providers are yours** (`rho login` via pi)
- - **Telegram controls**: allowlists and mention gating
- - **Email controls**: sender controls + outbound policy limits
- No hosted rho memory backend required.
- ---
- ## Command quick reference
- ```bash
- rho # start and attach
- rho init # initialize ~/.rho config
- rho sync # sync rho config to pi
- rho doctor # health + config checks
- rho login # authenticate providers
- rho start # start background daemon
- rho stop # stop daemon
- rho status # daemon/module status
- rho trigger # force heartbeat now
- rho logs # recent heartbeat output
- rho config # show effective config
- rho calc "2 + 2 * 3" # quick arithmetic calculator
- rho upgrade # update and resync
- rho skills <args> # skills provider wrapper
- ```
- Inside a session:
- ```text
- /rho status heartbeat state
- /rho now immediate check-in
- /rho interval 30m set check-in interval
- /rho enable/disable toggle heartbeat
- /bootstrap status bootstrap lifecycle state
- /brain memory operations
- /vault inbox captured vault items
- /skill run pdd planning workflow
- /skill run code-assist implementation workflow
- ```
- ---
- ## Platform support
- | Platform | Status | Notes |
- |---|---|---|
- | Linux | Supported | Native install + daemon + web UI |
- | macOS | Supported | Native install + daemon + web UI |
- | Android (Termux) | Supported | Extra mobile capabilities via platform skills |
- | iPhone/iPad | Supported (SSH client) | Run rho remotely, connect via SSH |
- ---
- ## Docs map
- - [Demo walkthrough](docs/demo.md)
- - [Telegram setup + troubleshooting](docs/telegram.md)
- - [iPhone/iPad setup](docs/iphone-setup.md)
- - [Android mobile app over Tailscale](docs/mobile-tailscale.md)
- - [VPS setup guide](docs/vps-setup.md)
- - [Skills providers (vercel + clawhub)](docs/skills.md)
- - [Brain bootstrapping guide](docs/bootstrapping-brain.md)
- - [Configuration reference](docs/configuration.md)
- ---
- ## For contributors
- Project structure and internals are intentionally modular:
- - `cli/` for command surface and daemon orchestration
- - `extensions/` for runtime tools/modules
- - `skills/` for portable markdown runbooks
- - `platforms/` for platform-specific installs/capabilities
- - `web/` for browser UI + RPC bridge
- For full tree + extension/skill details, see current `README.md` and `docs/`.
- ---
- ## Links
- - [pi coding agent](https://github.com/badlogic/pi-mono)
- - [@tau_rho_ai](https://x.com/tau_rho_ai)
install.sh · Bundled script · 347 lines · 1 finding marked
- #!/usr/bin/env bash
- # Rho — Universal installer
- #
- # Two modes, auto-detected:
- #
- # User install (curl | bash, or run standalone):
- # curl -fsSL https://rhobot.dev/install | bash
- Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
- Line 7 on GitHub
- # Installs rho via npm. No repo clone needed.
- #
- # Developer install (run from a git checkout):
- # git clone https://github.com/mikeyobrien/rho.git
- # cd rho && ./install.sh
- # Symlinks rho CLI from local source, installs local deps.
- #
- # Both paths end with: rho init + rho sync.
- #
- # Usage: ./install.sh [--force]
- # --force: overwrite existing config files
- #
- # Idempotent: safe to run multiple times.
- set -e
- # ── Colors ─────────────────────────────────────────────────
- RED='\033[0;31m'
- GREEN='\033[0;32m'
- YELLOW='\033[1;33m'
- CYAN='\033[0;36m'
- NC='\033[0m'
- info() { echo -e "${CYAN}>${NC} $1"; }
- ok() { echo -e "${GREEN}ok${NC} $1"; }
- warn() { echo -e "${YELLOW}!!${NC} $1"; }
- fail() { echo -e "${RED}error${NC} $1"; exit 1; }
- # ── Parse args ─────────────────────────────────────────────
- FORCE=0
- for arg in "$@"; do
- case "$arg" in
- --force) FORCE=1 ;;
- esac
- done
- # ── Detect install mode ───────────────────────────────────
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" 2>/dev/null && pwd)"
- detect_mode() {
- # Dev mode: script lives alongside our package.json (git checkout or extracted archive)
- if [ -f "$SCRIPT_DIR/package.json" ]; then
- if grep -q '"@rhobot-dev/rho"' "$SCRIPT_DIR/package.json" 2>/dev/null; then
- MODE="dev"
- REPO_DIR="$SCRIPT_DIR"
- return
- fi
- fi
- MODE="user"
- }
- # ── Detect platform ───────────────────────────────────────
- detect_platform() {
- if [ -n "$TERMUX_VERSION" ]; then
- PLATFORM="android"
- else
- case "$(uname -s)" in
- Darwin) PLATFORM="macos" ;;
- Linux) PLATFORM="linux" ;;
- *) fail "Unsupported OS: $(uname -s)" ;;
- esac
- fi
- }
- # ── Banner ─────────────────────────────────────────────────
- show_banner() {
- echo ""
- echo -e "${CYAN}rho${NC} -- persistent ai agent"
- echo -e "${CYAN}---${NC} $PLATFORM / $MODE install"
- echo ""
- }
- # ── System dependencies ───────────────────────────────────
- install_deps_android() {
- if ! command -v termux-battery-status &>/dev/null; then
- warn "Termux:API not installed"
- echo " Install from F-Droid: https://f-droid.org/packages/com.termux.api/"
- echo " Rho will work without it, but you'll miss notifications, sensors, etc."
- echo ""
- read -p "Continue anyway? [Y/n] " -n 1 -r
- echo
- [[ $REPLY =~ ^[Nn]$ ]] && exit 1
- fi
- info "Installing system packages..."
- pkg update -y -q 2>/dev/null
- pkg install -y -q nodejs-lts tmux 2>/dev/null
- if [ "$MODE" = "dev" ]; then
- pkg install -y -q git 2>/dev/null
- fi
- ok "nodejs $(node --version), tmux"
- }
- install_deps_macos() {
- local missing=()
- command -v node &>/dev/null || missing+=("node")
- command -v npm &>/dev/null || missing+=("npm")
- command -v tmux &>/dev/null || missing+=("tmux")
- if [ ${#missing[@]} -gt 0 ]; then
- warn "Missing: ${missing[*]}"
- if command -v brew &>/dev/null; then
- info "Installing via Homebrew..."
- for pkg in "${missing[@]}"; do
- case "$pkg" in
- node|npm) brew install node ;;
- *) brew install "$pkg" ;;
- esac
- done
- else
- echo ""
- echo " Install Homebrew: https://brew.sh"
- echo " Then: brew install node tmux"
- fail "Missing dependencies"
- fi
- fi
- ok "node $(node --version), tmux"
- }
- install_deps_linux() {
- local missing=()
- command -v node &>/dev/null || missing+=("node")
- command -v npm &>/dev/null || missing+=("npm")
- command -v tmux &>/dev/null || missing+=("tmux")
- if [ ${#missing[@]} -gt 0 ]; then
- warn "Missing: ${missing[*]}"
- echo ""
- if [ -f /etc/NIXOS ] || command -v nixos-rebuild &>/dev/null; then
- echo " Add nodejs and tmux to environment.systemPackages, or:"
- echo " nix-shell -p nodejs tmux"
- elif command -v apt &>/dev/null; then
- echo " sudo apt update && sudo apt install -y nodejs npm tmux"
- elif command -v pacman &>/dev/null; then
- echo " sudo pacman -S nodejs npm tmux"
- elif command -v dnf &>/dev/null; then
- echo " sudo dnf install nodejs npm tmux"
- else
- echo " Install node (18+), npm, and tmux using your package manager"
- fi
- echo ""
- fail "Install missing dependencies and re-run"
- fi
- ok "node $(node --version), tmux"
- }
- # ── Install pi ─────────────────────────────────────────────
- install_pi() {
- if command -v pi &>/dev/null; then
- ok "pi already installed"
- else
- info "Installing pi coding agent..."
- npm install -g @mariozechner/pi-coding-agent
- ok "pi installed"
- fi
- }
- # ── Install rho (user mode: npm) ──────────────────────────
- install_rho_npm() {
- info "Installing rho via npm..."
- if command -v rho &>/dev/null; then
- local current
- current=$(rho --version 2>/dev/null || echo "unknown")
- ok "rho already installed ($current), upgrading..."
- fi
- npm install -g @rhobot-dev/rho
- ok "rho $(rho --version 2>/dev/null)"
- }
- # ── Install rho (dev mode: local checkout) ────────────────
- install_rho_dev() {
- info "Installing rho from local checkout: $REPO_DIR"
- # Local node deps
- info "Installing Node dependencies..."
- (cd "$REPO_DIR" && npm install)
- # Install extension-level dependencies
- for ext_pkg in "$REPO_DIR"/extensions/*/package.json; do
- [ -f "$ext_pkg" ] || continue
- local ext_dir
- ext_dir="$(dirname "$ext_pkg")"
- info "Installing deps for extension: $(basename "$ext_dir")"
- (cd "$ext_dir" && npm install)
- done
- # Clean up old-style symlinks from previous installs
- local pi_dir="$HOME/.pi/agent"
- if [ -L "$pi_dir/extensions" ]; then
- rm -f "$pi_dir/extensions"
- elif [ -d "$pi_dir/extensions" ]; then
- find "$pi_dir/extensions" -maxdepth 1 -type l -delete 2>/dev/null || true
- fi
- if [ -L "$pi_dir/skills" ]; then
- rm -f "$pi_dir/skills"
- elif [ -d "$pi_dir/skills" ]; then
- find "$pi_dir/skills" -maxdepth 1 -type l -delete 2>/dev/null || true
- fi
- # Symlink rho CLI from this checkout
- local bin_dir
- if [ -n "$PREFIX" ] && [ -d "$PREFIX/bin" ]; then
- bin_dir="$PREFIX/bin"
- else
- bin_dir="$HOME/.local/bin"
- mkdir -p "$bin_dir"
- fi
- # Remove legacy wrapper symlinks
- for name in rho-daemon rho-status rho-stop rho-trigger rho-login; do
- [ -L "$bin_dir/$name" ] && rm -f "$bin_dir/$name"
- done
- chmod +x "$REPO_DIR/cli/index.ts" 2>/dev/null || true
- ln -sf "$REPO_DIR/cli/index.ts" "$bin_dir/rho"
- ok "rho CLI -> $bin_dir/rho (linked to $REPO_DIR/cli/index.ts)"
- # Platform-specific scripts
- if [ "$PLATFORM" = "android" ]; then
- local stt_dir="$REPO_DIR/platforms/android/scripts/bin"
- if [ -d "$stt_dir" ]; then
- mkdir -p "$HOME/bin"
- for script in "$stt_dir"/stt "$stt_dir"/stt-send; do
- [ -f "$script" ] || continue
- chmod +x "$script"
- ln -sf "$script" "$HOME/bin/$(basename "$script")"
- done
- ok "STT scripts -> ~/bin"
- fi
- fi
- # Warn about PATH on non-Termux
- if [ "$PLATFORM" != "android" ]; then
- case ":$PATH:" in
- *":$bin_dir:"*) ;;
- *)
- warn "$bin_dir is not in your PATH. Add to your shell profile:"
- echo " export PATH=\"$bin_dir:\$PATH\""
- ;;
- esac
- fi
- }
- # ── Bootstrap config ──────────────────────────────────────
- bootstrap_config() {
- echo ""
- info "Initializing config..."
- local init_args="--name rho"
- if [ "$FORCE" -eq 1 ]; then
- init_args="$init_args --force"
- fi
- if [ "$MODE" = "dev" ]; then
- # Run CLI directly from checkout, sync with local source
- node --experimental-strip-types "$REPO_DIR/cli/index.ts" init $init_args
- echo ""
- info "Syncing config (source: $REPO_DIR)..."
- RHO_SOURCE="$REPO_DIR" node --experimental-strip-types "$REPO_DIR/cli/index.ts" sync
- else
- rho init $init_args
- echo ""
- info "Syncing config..."
- rho sync
- fi
- }
- # ── Platform setup ────────────────────────────────────────
- run_platform_setup() {
- if [ "$MODE" = "dev" ]; then
- local setup="$REPO_DIR/platforms/$PLATFORM/setup.sh"
- if [ -f "$setup" ]; then
- echo ""
- chmod +x "$setup"
- bash "$setup"
- fi
- fi
- }
- # ── Done ───────────────────────────────────────────────────
- show_done() {
- echo ""
- echo -e "${GREEN}rho is ready.${NC}"
- echo ""
- echo " rho start and attach"
- echo " rho start start in background"
- echo " rho login connect your LLM provider"
- echo ""
- echo " /rho status check heartbeat (inside session)"
- echo " /rho now trigger check-in"
- echo ""
- case "$PLATFORM" in
- android)
- echo " optional:"
- echo " install Tasker for UI automation"
- echo " use /brain to manage memory and reminders"
- ;;
- *)
- echo " optional:"
- echo " use /brain to manage memory and reminders"
- ;;
- esac
- echo ""
- }
- # ── Main ───────────────────────────────────────────────────
- detect_mode
- detect_platform
- show_banner
- case "$PLATFORM" in
- android) install_deps_android ;;
- macos) install_deps_macos ;;
- linux) install_deps_linux ;;
- esac
- install_pi
- if [ "$MODE" = "dev" ]; then
- install_rho_dev
- else
- install_rho_npm
- fi
- bootstrap_config
- run_platform_setup
- show_done
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.