phone-a-friend
Health Warn
- License — License: Apache-2.0
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 5 GitHub stars
Code Warn
- network request — Outbound network request in dist/public/js/app.js
Permissions Pass
- Permissions — No dangerous permissions requested
This is a CLI orchestration layer for AI coding agents. It relays tasks, prompts, and repository context to various AI backends (like Claude, Codex, or Gemini) for collaborative review, analysis, or autonomous multi-agent sessions.
Security Assessment
Overall Risk: Medium. The tool inherently makes outbound network requests to external AI provider APIs to function, which is its core purpose. However, it also relays your local repository context to these third-party services. No dangerous filesystem or system-level permissions were requested, and no hardcoded secrets were detected. The network request flag on the compiled JavaScript (`app.js`) aligns with its documented web dashboard feature rather than indicating hidden telemetry.
Quality Assessment
The project is very new and currently has low visibility with only 5 GitHub stars, meaning it has not yet been broadly vetted by the developer community. However, it shows strong active maintenance indicators, with its last code push happening today. It is properly licensed under the standard and permissive Apache-2.0 license, making it safe for organizational and commercial use.
Verdict
Use with caution: the code is actively maintained and properly licensed, but its low community adoption means you should review exactly what repository context it shares with external AI APIs before using it on proprietary code.
CLI relay for AI coding agents: send prompts and repo context to Claude, Codex, Gemini, Ollama, or OpenCode with streaming, sessions, and Claude-based multi-agent orchestration
phone-a-friend is a CLI orchestration layer for AI coding agents.
Relay tasks to any backend, spin up multi-model teams, or run persistent multi-agent sessions with a live web dashboard.
| Mode | What it does | Best for |
|---|---|---|
| Relay | One-shot delegation to Codex, Gemini, Ollama, Claude, or OpenCode | Quick second opinions, code reviews, analysis |
| Team | Iterative multi-backend refinement over N rounds | Collaborative review, converging on a solution |
| Agentic | Persistent multi-agent sessions with @mention routing | Autonomous collaboration, adversarial review, deep analysis |
TUI Dashboard
Web Dashboard
Quick Start
Prerequisites: Node.js 22.13+ and at least one backend:
Install:
npm install -g @freibergergarcia/phone-a-friend
phone-a-friend # first run shows a guided menu — choose Setup
The setup wizard detects your backends, offers to install detected host integrations, and verifies everything works.
Claude Code marketplace (commands and skills only):
If you use Claude Code,
you can install directly from the marketplace:
/plugin marketplace add freibergergarcia/phone-a-friend
/plugin install phone-a-friend@phone-a-friend-marketplace
This fetches the latest version from npm automatically. To update later:
/plugin marketplace update phone-a-friend-marketplace
/plugin update phone-a-friend@phone-a-friend-marketplace
[!NOTE]
Marketplace install gives you Claude Code integration (slash commands
and skills). For the full CLI including agentic mode, the TUI dashboard, and
the web dashboard on localhost, install globally withnpm install -g @freibergergarcia/phone-a-friend.
OpenCode commands and skills:
If you use OpenCode, install the same Phone-a-Friend skills plus thin slash-command shims into your OpenCode config:
phone-a-friend plugin install --opencode
This installs to ~/.config/opencode/skills/ and ~/.config/opencode/commands/ (or $XDG_CONFIG_HOME/opencode/...). From OpenCode, ask naturally, for example:
Ask Codex through phone-a-friend for a short sanity review of this repo; do not edit files.
From source:
git clone https://github.com/freibergergarcia/phone-a-friend.git
cd phone-a-friend
npm install && npm run build
./dist/index.js # first run guides you through setup
Then from Claude Code or OpenCode, just talk naturally — the host integration loads the skills automatically:
Ask Gemini to review the error handling in relay.ts
Spin up Codex and Gemini to review the docs.
Then spin another agent to review their reviews and report back.
Build a team with Claude and Ollama. Have them review the website copy,
loop through 3 rounds, and converge on final suggestions.
No slash commands needed. Once the host integration is installed (the setup wizard offers to do this), the host can route single-backend tasks through /phone-a-friend. In Claude Code, mention multiple backends and Claude can use /phone-a-team for iterative multi-agent refinement; /phone-a-team is Claude-only because it depends on Claude Agent Teams primitives. In OpenCode, use repeated /phone-a-friend calls and synthesize the results manually. You can explicitly invoke /phone-a-friend in both hosts, and /phone-a-team in Claude Code only.
[!TIP]
Power-user setup: Run Claude Code in tmux and enable bypass permissions (⏵⏵) for trusted repos. Agent teams show up in split panes, so you can watch agents work in parallel without approval pauses. Pair it with phone-a-friend agentic mode for fully autonomous multi-agent sessions.
CLI Usage
Relay
Delegate a task to any backend and get the result back:
phone-a-friend --to codex --prompt "Review this code"
phone-a-friend --to gemini --prompt "Analyze the architecture" --model gemini-2.5-flash
phone-a-friend --to claude --prompt "Refactor this module"
phone-a-friend --to ollama --prompt "Explain this function"
phone-a-friend --to opencode --prompt "Audit this repo" --model qwen3-coder # Local agentic (OpenCode + Ollama)
phone-a-friend --to claude --prompt "Review this code" --stream # Stream tokens live
phone-a-friend --to codex --prompt "Audit the auth module" --quiet # Run silently, save result
phone-a-friend --to opencode --prompt "Explain this" --fast # Skip OpenCode plugins (faster)
phone-a-friend --to codex --prompt "Review my fix" --include-diff # Append `git diff HEAD` to the prompt
phone-a-friend --to codex --prompt "Quick question" --no-include-diff # Override defaults.include_diff = true
Structured output
Request JSON responses matching a schema:
phone-a-friend --to codex --prompt "List files that need refactoring" \
--schema '{"type":"object","properties":{"files":{"type":"array","items":{"type":"string"}}},"required":["files"],"additionalProperties":false}'
Claude and Codex enforce the schema natively. Gemini, Ollama, and OpenCode use prompt injection (best-effort).
Sessions
Resume previous relay conversations for multi-turn workflows:
phone-a-friend --to codex --prompt "Review the auth module" --session auth-review
# Later, continue the conversation:
phone-a-friend --to codex --prompt "Now fix those issues" --session auth-review
Sessions work reliably with Claude, Codex, and OpenCode. Ollama replays history (may hit token limits on long conversations). Gemini sessions are currently unsupported.
Job tracking
The --quiet flag saves the result to a local job store for later retrieval:
phone-a-friend --to codex --prompt "Review this" --quiet # Returns job ID immediately
phone-a-friend job status # List all jobs
phone-a-friend job result <id> # Show stored output
phone-a-friend job cancel <id> # Cancel a pending/running job
Review
Context-aware code reviews — automatically pulls the current git diff so you don't have to paste code:
phone-a-friend --to claude --review # Review current diff
phone-a-friend --to codex --review --base develop # Review against a specific branch
phone-a-friend --to opencode --review # Review with local model (reads repo via tools)
--review is the diff-scoped review mode (uses the backend's native review path when available). For ad-hoc prompts where you want the working-tree diff appended, use --include-diff with normal prompt mode. To override a defaults.include_diff = true config setting on a single call, use --no-include-diff (or set PHONE_A_FRIEND_INCLUDE_DIFF=false in the environment for older binaries).
[!TIP]
Don't paste code into--promptjust to review it — the backend can read the repo directly via--repo "$PWD"(default: current working directory). Pasting risks leaking uncommitted edits and burns tokens for content the backend can fetch itself.
Agentic
Spawn multiple agents that collaborate via @mentions (see Agentic Mode below):
phone-a-friend agentic run --agents reviewer:claude,critic:claude --prompt "Review this code"
phone-a-friend agentic logs # View past sessions
phone-a-friend agentic replay --session <id> # Replay transcript
phone-a-friend agentic dashboard # Launch web dashboard (localhost:7777)
Ops
phone-a-friend # Interactive TUI dashboard (TTY only)
phone-a-friend setup # Guided setup wizard
phone-a-friend doctor # Health check all backends + host install status
phone-a-friend plugin install --claude # Install Claude Code plugin
phone-a-friend plugin install --opencode # Install OpenCode commands and skills
phone-a-friend config show # Show resolved config
phone-a-friend config edit # Open in $EDITOR
doctor reports CLI backends, local backends (Ollama), host integration status (Claude / OpenCode plugin install state), and a summary count. The OpenCode CLI is treated as optional: if you only use Claude Code and don't have OpenCode installed, doctor will not flag that as a degraded state.
Backends
| Backend | Type | Streaming | How it works |
|---|---|---|---|
| Codex | CLI subprocess | No | Runs codex exec with sandbox and repo context |
| Gemini | CLI subprocess | No | Runs gemini --prompt with --yolo auto-approve |
| Ollama | HTTP API | Yes (NDJSON) | POSTs to localhost:11434/api/chat via native fetch |
| Claude | CLI subprocess | Yes (JSON) | Runs claude with sandbox-to-tool mapping |
| OpenCode | CLI subprocess | Yes (NDJSON) | Runs opencode run with repo-local tool access |
Ollama configuration via environment variables:
OLLAMA_HOST-- custom host (default:http://localhost:11434)OLLAMA_MODEL-- default model (overridden by--modelflag)
Phone-a-friend environment variables:
PHONE_A_FRIEND_INCLUDE_DIFF=false-- disable diff inclusion across every relay; equivalent to passing--no-include-diffon every command. Useful whendefaults.include_diff = truein your config but you want a session without the diff. Also the canonical mechanism used by OpenCode shims for stale-binary compatibility (the--no-include-diffflag was added in v2.2.0+; older binaries reject it but accept this env var since v1.7.2).PHONE_A_FRIEND_HOST=opencode-- mark the calling process as OpenCode for the recursion guard. Set automatically by the OpenCode shims; only relevant if you're invoking PaF programmatically from inside an OpenCode session.
OpenCode configuration via TOML:
[backends.opencode]
provider = "ollama" # model prefix (default: "ollama")
model = "qwen3-coder" # default model
pure = false # skip OpenCode plugins (maps to --fast)
Streaming
Backends that support streaming deliver tokens as they arrive via --stream:
phone-a-friend --to claude --prompt "Review this code" --stream
Streaming is enabled by default in the config (defaults.stream = true). Disable with --no-stream or config set defaults.stream false.
Agentic Mode
Let one agent review while another critiques — catching bugs, inconsistencies, and blind spots before you even see the code.
Agentic mode spawns multiple Claude agents that communicate via @mentions within a shared session. An orchestrator routes messages between agents, enforces guardrails, and streams every event to a live web dashboard where you can watch the collaboration in real time.
Each agent accumulates context through persistent CLI sessions — later responses build on earlier ones, so agents develop genuine understanding of the problem as the session progresses.
Currently supports Claude agents only. See AGENTS.md for full architecture details.
# Start an agentic session
phone-a-friend agentic run \
--agents reviewer:claude,critic:claude \
--prompt "Review the auth module"
# View past sessions and replay transcripts
phone-a-friend agentic logs
phone-a-friend agentic replay --session <id>
# Launch web dashboard (real-time session visualization)
phone-a-friend agentic dashboard # default: localhost:7777
phone-a-friend agentic dashboard --port 8080
How it works:
- The orchestrator spawns each agent with the initial prompt and a unique name (e.g.,
ada.reviewer,fern.critic) - Agents respond and
@mentionother agents (or@all/@user) - The orchestrator routes messages to the targeted agents
- Agents reply in subsequent turns, building on accumulated context
- The session ends when agents converge (no new messages), hit the turn limit, or time out
What you get:
- Live web dashboard -- watch agents collaborate in real time at
localhost:7777(SSE-powered) - Persistent sessions -- agents accumulate context across turns via UUID-based session resumption
- @mention routing -- agents address each other by name (
@ada.reviewer:), broadcast with@all, or surface findings with@user - Guardrails -- max turns (20), ping-pong detection, session timeout (15 min), turn budget warnings
- Full audit trail -- SQLite-backed transcript persistence for replay, logs, and post-session analysis
- Creative agent naming -- agents get memorable human names so you can follow the conversation
Documentation
Full usage guide, examples, CLI reference, and configuration details:
freibergergarcia.github.io/phone-a-friend
Uninstall
npm uninstall -g @freibergergarcia/phone-a-friend
The Claude Code plugin and OpenCode commands/skills are removed automatically when installed through the CLI.
Contributing
All changes go through pull requests -- no direct pushes to main.
- Branch off main using a recognized prefix (see table below)
- Open a PR against
main-- a version label is auto-applied from the branch name - CI must pass before merge (includes label check)
- PRs are squash-merged (one commit per change, clean linear history)
- Head branches are auto-deleted after merge
- On merge, version is auto-bumped based on the label
Branch prefixes:
| Prefix | Label |
|---|---|
fix/, bugfix/ |
patch |
chore/, docs/, ci/, refactor/ |
patch |
feat/, feature/ |
minor |
breaking/ |
major |
Unrecognized prefixes require adding patch, minor, or major manually.
Development
npm install # Install dependencies
npm run build # Build dist/ (tsup)
npm test # Run tests (vitest)
npm run typecheck # Type check (tsc --noEmit)
License
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found