snomiao/agent-yes
Sobre
Run AI coding agents (Claude, Codex, Gemini …) unattended — auto-answer prompts, auto-retry on rate limits, and list/tail/steer every agent locally or from agent-yes.com
Ferramentas de desenvolvimentoO que você pode fazer
- Multi-CLI Support: Works with Claude, Codex, Copilot, and Cursor CLI tools
- Auto-Response: Automatically responds to common prompts like "Yes, proceed" and "Yes"
- Continuous Operation: Keeps the AI assistant running until your task is done, waiting for your next prompt
- Interactive Control: You can still queue more prompts or cancel executing tasks with ESC or Ctrl+C
Crescimento medido de estrelas
- em 24 h
- 0
- em 7 dias
- 0
- em 15 dias
- +1
- em 1 mês
- Coletando histórico
Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.
README.md
OriginalAgent-Yes! for Claude/Codex/Cursor/Copilot/Qwen/Auggie

Scripted with synthetic data; no live agent session is recorded.
A wrapper tool that automates interactions with various AI CLI tools by automatically handling common prompts and responses. Originally designed for Claude CLI, now supports multiple AI coding assistants. Rewritten in Rust for improved performance and reliability.
⚠️ Important Security Warning: Only run this on trusted repositories. This tool automatically responds to prompts and can execute commands without user confirmation. Be aware of potential prompt injection attacks where malicious code or instructions could be embedded in files or user inputs to manipulate the automated responses.
Install
One-liner (installs Bun if needed, then the ay / cy / claude-yes … CLIs):
# macOS / Linux
curl -fsSL https://agent-yes.com/setup.sh | sh
# Windows (works in both PowerShell and cmd)
powershell -c "irm https://agent-yes.com/setup.ps1 | iex"
Or with a package manager you already have:
bun add -g agent-yes # or: npm install -g agent-yes
Then: ay claude (run an agent with auto-yes) · ay serve --share (web console + shareable link) · live console at https://agent-yes.com
ay on its own prints the command list — ay is agent-yes, the fleet manager, so
starting an agent names a CLI (ay claude, ay codex, …). cy remains the one-word
shortcut that launches claude with no arguments. Manage named roles with ay fleet, including ay fleet adopt and ay fleet forget for registry recovery. See Managing agents with a fleet file.
For the local web console, install Portless once with npm install -g portless, then run ay serve. It assigns a free internal port and serves the console at https://agent-yes.localhost/. ay serve --port N remains available for a fixed-port API listener.
Like ay <cli>, ay serve runs the Rust daemon (ayrs serve) by default for the flags it supports — --webrtc [webrtc://url], --port N, --sighost H. The bare ay serve (Portless), --share, and the install/status/logs subcommands still run the TypeScript server; --no-rust (or AGENT_YES_NO_RUST=1) forces it for everything.
Features
When auto-yes is enabled for agy, a queued message row advertising (alt+m to send immediately)
is sent immediately with Alt+M. Spinner redraws do not repeat the shortcut. Manual
mode (Ctrl+Y) and permission prompts suppress this action.
Subagent approval cards in agy are approved with Ctrl+K while auto-yes is enabled.
The shortcut requires the card heading and approval footer, emits no Enter, and
does not repeat on spinner redraws. Manual mode and competing permission menus
suppress automatic approval.
- Multi-CLI Support: Works with Claude, Codex, Copilot, and Cursor CLI tools
- Auto-Response: Automatically responds to common prompts like "Yes, proceed" and "Yes"
- Continuous Operation: Keeps the AI assistant running until your task is done, waiting for your next prompt
- Interactive Control: You can still queue more prompts or cancel executing tasks with
ESCorCtrl+C - Crash Recovery: Automatically restarts crashed processes (where supported)
- Idle Detection: Optional auto-exit when the AI becomes idle
- Named Pipe Input (Linux): On Linux systems, automatically creates a FIFO (named pipe) at
/tmp/agent-yes-YYYYMMDDHHMMSSXXX.stdinfor additional input streams - Isolated Processes: Each
ay <cli>is an independent wrapper — no central daemon owns the agents. They coordinate through files (pids.jsonlindex, per-pid FIFO for stdin, per-cwd.raw.logfor output), so one process crashing (evenay serve) never takes down the others. See docs/architecture.md.
Agent Clis
Install the AI CLI tool(s) you want to use:
Claude
npm install -g @anthropic-ai/claude-code
Learn more: https://www.anthropic.com/claude-code
Codex
# Install Codex CLI (if available)
# Check Microsoft's documentation for installation instructions
GitHub Copilot
# Install GitHub Copilot CLI
# Check GitHub's documentation for installation instructions
Cursor
# Install Cursor agent CLI
# Check Cursor's documentation for installation instructions
Grok
npm install -g @vibe-kit/grok-cli
Learn more: https://github.com/vibe-kit/grok-cli
Auggie
npm install -g @augmentcode-inc/auggie-cli
Learn more: https://www.augmentcode.com/
Then install this project:
npm install agent-yes -g
Usage
Command Line Interface
claude-yes [--exit-on-idle=60s] [tool-command] [prompts]
Examples
Claude (default):
claude-yes -- run all tests and commit current changes
bunx claude-yes "Solve TODO.md"
Other AI tools:
# Use Codex directly
codex-yes -- refactor this function
# Use Grok directly
grok-yes -- help me with this code
# Use Copilot directly
copilot-yes -- generate unit tests
# Use Cursor directly
cursor-yes -- optimize performance
# Use Auggie directly
auggie-yes -- analyze code patterns
# Use GLM (Z.AI) directly — runs Claude Code against Z.AI's
# Anthropic-compatible endpoint. Set ZAI_API_KEY first
# (https://z.ai/manage-apikey/apikey-list).
ZAI_API_KEY=... glm-yes -- help me with this code
# Use Pi directly — minimal multi-provider coding agent
# (https://github.com/earendil-works/pi)
pi-yes -- refactor this module
# Use Antigravity CLI (Google, Gemini-backed) — no *-yes bin, run it via ay
# (https://antigravity.google/docs/cli/)
ay agy -y -- refactor this module
claude-yes "help me with this code"
claude-yes "optimize performance"
Auto-exit when idle (useful for automation):
claude-yes --exit-on-idle=60s "run all tests and commit current changes"
Alternative with claude-code-execute:
claude-code-execute claude-yes "your task here"
Inspect and message running agents (cy ls / tail / send)
From any terminal you can list and interact with agents that are already running on the machine — both TS- and Rust-spawned ones:
cy ls # list all running agents
cy ls codex # filter (matches pid, cwd, cli, or prompt)
ay ls --hosts # list machines instead: local, remotes, room members
cy tail <keyword> # render last 96 lines via @xterm/headless
cy cat <keyword> # full rendered log
ay read <keyword> # same, with pagination (--last/--range/…)
# `read` is `ay`-only: `cy read foo.ts` is a prompt
cy send <keyword> "next: run tests" # append a prompt to that agent's stdin
cy send <keyword> "" --code=ctrl-c # send a Ctrl+C
cy attach <keyword> # interactive attach (detach: Ctrl-\)
cy stop <keyword> # graceful shutdown (claude/codex: /exit)
ay send writes to busy agents without waiting for idle, using native Enter
delivery (including the CLI's own queue). Existing drafts and active typing
remain protected, so these can defer delivery. It never substitutes a
cancellation shortcut based on a busy indicator or a shortcut hint.
To explicitly request agy's immediate-send shortcut, use
ay send <keyword> "message" --code=alt-m. This sends ESC m after pasting and
may interrupt the current turn; native queued delivery remains the default.
The explicit shortcut is supported by --no-wait and the drainer too, and is
never retried automatically.
Use ay send <keyword> "message" --interrupt (or -i) to stop a running local
Claude, Codex, or agy turn first. It sends Escape once, waits up to eight seconds
for an idle input prompt, then pastes and submits the message. If cancellation
does not reach idle, the message is not sent. Permission and confirmation
prompts are never cancelled: the command reports that interruption was skipped
and uses the normal send path. Existing drafts remain protected. --no-wait
still waits for cancellation before skipping message submission confirmation.
Which machines are up (ay ls --hosts)
ay ls groups a WebRTC room's agents under the remote's alias. To see the
machines themselves, which members a room has, and which ones answer, use
ay ls --hosts. It prints one row for local, one per saved remote, and one
per member of a room with several hosts (<alias>:<member>, the address
ay send takes):
HOST KIND STATE AGENTS VERSION OS HOSTNAME PEER NOTE
local local online 4 1.2.3 darwin/arm64 alpha -
build http online 2 1.2.3 linux/x64 build01 -
fleet webrtc online 3 - - - - 3 members: 1 online, 1 offline, 1 self
fleet:alpha member self 4 1.2.3 darwin/arm64 alpha h-1111 this machine (agents under local)
fleet:beta member online 3 1.2.3 linux/x64 beta h-2222
fleet:gamma member offline - - - - h-3333 no answer (offline or asleep)
It probes live, so every remote gets a deadline: --timeout (seconds, default 30) bounds the wait for a remote's first answer. Http remotes are capped at 8s
and room members at the 25s WebRTC connect timeout, as in plain ay ls. Once
one member of a room has answered, the others get --grace seconds (default 3).
A member still silent after that is reported as no answer (offline or asleep): a sleeping laptop can stay listed in the room while its connection
can no longer complete. A member that has left the room keeps an offline row
for a week. ay ls --hosts <alias> (or local) narrows the list, and
--json prints the rows as a flat array. Neither output contains a room
link, secret or token.
Tips
- A single
--code=ctrl-cdoes not stopclaude/codex— they treat it as "cancel current turn" rather than "quit". Prefercy stop <keyword>(which sends/exitfor claude/codex), or send Ctrl+C twice in quick succession. Thecy send … --code=ctrl-coutput prints a one-line hint pointing at this when it detects one of those CLIs.
cy (and ay / agent-yes) writes to a shared registry at
~/.agent-yes/pids.jsonl and a per-pid FIFO at ~/.agent-yes/fifo/<pid>.stdin,
so subcommands work whether the target agent is the TS or Rust runtime.
Detailed reference (Japanese): docs/cy-subcommands.md.
Share this machine (ay share)
ay share makes this machine's agents reachable with one URL: open it in a
browser for the web console, or pass it to ay connect on another machine.
ay share # this help + how this machine is shared (read-only)
ay share ls [--json] # every way it is shared: daemon, HTTP, each mode's URL
ay share new tailscale # share it one more way: local | portless | lan | tailscale | webrtc
ay share and ay share ls only read: they never prompt, install a daemon or
mint a room. ay share new <mode> shows every command it would run for you (the
serve daemon install, tailscale serve, a portless install) and asks [y/N]
first; -y approves them. The older spellings ay share <mode> and
ay share status still work.
daemon: ay serve --http --port 7432 --webrtc — running
http: up on 127.0.0.1:7432
local: on http://127.0.0.1:7432/#k=***
lan: off
portless: off
tailscale: on https://alpha.example.ts.net/ay/#k=*** (https://alpha.example.ts.net/ay/ ok)
webrtc: on https://agent-yes.com/w/#r000000000000:*** (owner of room r000000000000)
A share URL carries this host's serve token or room secret, so whoever holds it
can read and steer every agent here. On a terminal ay share prints it in full;
when stdout is not a terminal (a pipe, a log, an agent's shell), the secrets
are masked as ***, --json included. Add --show to print them anyway.
The daemon args and the commands shown at a [y/N] prompt can carry a room's
join secret, so they are masked unless --show, even on a terminal.
One room, several machines. A WebRTC room can have several member hosts,
and every viewer sees all of their agents (ay ls --hosts lists them):
# on the machine that owns the room
ay share new webrtc
ay share invite --member --name beta # writes ~/.agent-yes/share-invite-member.json (0600)
# copy that file to the other machine privately, then there:
ay share join ./share-invite-member.json
The member invite is a small JSON file, {"version":1,"roomUrl":"<member link>","memberName":"beta"}.
The first ay share invite --member mints the room's join secret. That changes
the room for every host: from then on it requires the secret, and member hosts
already hosting without it are rejected until they re-join with a new invite, so
it asks [y/N] first (-y to skip). Later invites reuse the secret.
ay share members lists the member hosts of this machine's room, probed live
like ay ls --hosts (viewers are not listed: the room never tells a viewer
about other viewers). ay share edit --port 9000, --ice-public-ip auto,
--ice-udp-port 47000 or --name beta changes the daemon's share options and
restarts it; ay share rm <mode> stops sharing that way, and on the last one
offers to uninstall the daemon (agents it started keep running, and the room,
join secret and token stay).
ay share join runs AY_NAME=beta ay serve install --webrtc <link> --join --port <port>
(the daemon's port, else 7432) and then ay connect <view link> fleet, after
showing both and asking [y/N]. It takes the invite file or a link; the file
keeps the link out of your shell history and ay share join's own arguments.
The daemon still carries it: under pm2 its command line holds the member link
(any local user can see it with ps); under oxmgr the link is on the
oxmgr start … --env AY_WEBRTC_URL=… command line while the daemon is
registered, then in oxmgr's private state file. ay share invite (no flag)
writes the plain view link instead, for someone who only watches. Either prints
the file's path; --show prints the link itself.
To replace a secret, ay share rotate deletes it, mints a new one, restarts the
serve daemon and checks the result (for the token: the new one answers, the old
one gets HTTP 401). It shows the plan and asks [y/N] first (-y approves),
and never prints the new secret, only the file it is in:
ay share rotate # the serve token (default): every URL and `ay remote` alias made from it breaks
ay share rotate --room # a new room: every viewer link breaks (and member invites, if it had a join secret)
ay share rotate --join # a new join secret, so a new room too: every viewer link and member invite breaks
Only a room's owner can rotate its room; a member host can still rotate its own serve token.
Recurring reminders (ay cron)
Send a message to an agent on a 5-field cron (timezone $AY_CRON_TZ, default Asia/Tokyo):
ay cron "*/30 9-18 * * 1-5" lane:alpha "progress report please ({now})"
ay cron ls # id, cron, target, next run, last result
ay cron rm c1
ay schedule list --json # read the local timetable as JSON
ay schedules ls # everything: cron reminders + legacy `ay schedule` jobs
ay schedules daemon status # the per-machine scheduler daemon
Reminders live in one store (~/.config/agent-yes/schedules.json). One scheduler
daemon per machine fires them (it sleeps until the next fire, no polling, and wakes when the store changes) with ay send --force; it is kept alive by oxmgr when
installed, else systemd --user, launchd, Windows Task Scheduler, or a detached process.
A tick missed while the daemon was down is skipped. Fires are logged as JSONL to
~/.local/share/agent-yes/schedules.log; a target that isn't live is logged and skipped.
Shared task list across agents (ay todo)
A lifecycle-tracked task list that every agent working on a repo reads and
writes. The store is one append-only file at <repo>/.agent-yes/todos.jsonl,
resolved from the repo's common root — so agents running in different git
worktrees of the same repo share one list rather than each keeping a private
one. Pass --root <dir> (or set AGENT_YES_TODO_ROOT) to point somewhere else.
ay todo # help: every verb, with descriptions
ay todo new fix the flaky test --kind code # owner defaults to the calling agent
ay todo ls # OWNER column marks dead agents: lane-3(exited)
ay todo ls --owner me # just my tasks
ay todo claim T4 # take it over (refuses to steal from a live agent)
ay todo claim T4 --force # take it anyway
ay todo block T4 --type waiting-on-agent --agent lane-2
ay todo dep add T5 T4 # T5 waits for T4 (cycles rejected)
ay todo digest # per-tag board + "unblocked, resume these"
ay todo reconcile # orphan tasks whose owner agent exited, clear stale blocks
Ownership is cross-referenced against the same agent registry ay ls reads, so
"who owns this and are they still alive?" is answerable in one command:
--owner me resolves to the calling agent's registry id, ls annotates each
owner with that agent's live status, and reconcile orphans tasks whose owner
exited (listing idle agents as reassignment candidates). Use --owner none to
create a task nobody owns, and --format json for machine-readable output —
JSON keeps owner verbatim and reports liveness in a separate ownerLiveness
field, so filters that match on owner keep working.
Tasks move through a lifecycle per --kind, and gated transitions require
independent verification: whoever did the work cannot approve it. See
ts/todoStore.ts for the gate model.
Ask another agent a question (ay ask)
ay send の送信確認では、今回のメッセージ識別子が入力欄から履歴へ移ったことを調べます。終了コードは 0 = 送信確認済み、1 = NOT SUBMITTED(宛先を確認してから再送)、3 = 宛先到達不能、4 = QUEUED(受付済み・処理待ち)です。4 は失敗として本文を再送せず、宛先の処理を待ってください。確認できない画面や入力候補・ダイアログには Enter を追加しません。--no-wait は従来どおり確認を省略するため、終了コード 0 でも送信確認を意味しません。
ay send delivers a question but leaves no trace of it: if the asker moves on
and the other agent dies, wedges, or simply never replies, nothing records that
an answer is owed. ay ask delivers the same way — returning immediately — and
also writes a task carrying both parties, so an unanswered question is
self-describing.
ay ask lane-b "does the cache need invalidating before deploy?"
# asked lane-b → T4
# monitor the answer: ay todo get T4 --root "/path/to/repo"
# monitor the answerer: ay status lane-b
ay answer T4 --root "/path/to/repo" "yes — bump CACHE_VERSION first"
The task stores the asker as its owner and the answering agent as a
waiting-on-answer block, so ay todo ls shows both, each with that agent's
live status:
ID STATE KIND OWNER WAITING-ON SUMMARY
T4 pending question lane-a(active) lane-b(exited) does the cache need inv…
That is the failure mode a bare send cannot report: whoever died holding the
question is visible in one command. ay todo reconcile says the same thing in
words (T4: lane-b exited without answering) and orphans the task if the
asker is the one that died — without ever closing the question itself, since
the answer is still owed.
Answering is gated on independent verification, which the store enforces: the
validator must differ from the task's owner, so an asker can never quietly mark
its own question answered. Targets are agents on this machine (same registry
ay ls reads). ay ask respects ay send's recency guard — pass --force to
skip it; ay answer replies without it, since its recipient comes off the task
record rather than from a typed keyword.
Docker Usage
You can run agent-yes in a Docker container with all AI CLI tools pre-installed.
Pull the image:
# From GitHub Container Registry (recommended)
docker pull ghcr.io/snomiao/agent-yes:latest
# Or from Docker Hub
docker pull snomiao/agent-yes:latest
Basic usage:
# Run with Claude (default)
docker run --rm -v $(pwd):/workspace -w /workspace \
ghcr.io/snomiao/agent-yes:latest \
-- run all tests
# Run with other AI tools
docker run --rm -v $(pwd):/workspace -w /workspace \
ghcr.io/snomiao/agent-yes:latest \
--cli=codex -- debug this code
Persisting credentials:
To persist API keys and configuration across container runs, mount the config directories:
# For Claude
docker run --rm \
-v $(pwd):/workspace \
-v ~/.config/claude:/root/.config/claude \
-v ~/.anthropic:/root/.anthropic \
-w /workspace \
ghcr.io/snomiao/agent-yes:latest \
-- help me with this code
# For multiple AI tools (mount all config directories)
docker run --rm \
-v $(pwd):/workspace \
-v ~/.config:/root/.config \
-v ~/.anthropic:/root/.anthropic \
-v ~/.openai:/root/.openai \
-v ~/.cursor:/root/.cursor \
-w /workspace \
ghcr.io/snomiao/agent-yes:latest \
--cli=claude -- optimize performance
Complete example with environment variables:
# Pass API keys via environment variables
docker run --rm \
-v $(pwd):/workspace \
-e ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY \
-e OPENAI_API_KEY=$OPENAI_API_KEY \
-e GOOGLE_API_KEY=$GOOGLE_API_KEY \
-w /workspace \
ghcr.io/snomiao/agent-yes:latest \
-- refactor this module
# Or use an env file
docker run --rm \
-v $(pwd):/workspace \
--env-file .env \
-w /workspace \
ghcr.io/snomiao/agent-yes:latest \
--exit-on-idle=60s -- run all tests and commit
Docker Compose example:
version: "3.8"
services:
agent-yes:
image: ghcr.io/snomiao/agent-yes:latest
volumes:
- .:/workspace
- ~/.config/claude:/root/.config/claude
- ~/.anthropic:/root/.anthropic
working_dir: /workspace
environment:
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
command: ["--", "help me solve all todos"]
Sharing from a container (ay serve --webrtc):
docker.io/snomiao/agent-yes:<version> (and :latest) runs ay serve --webrtc by default.
Docker Desktop on macOS puts containers behind a symmetric NAT: each
destination gets a new public port, so viewers cannot reach the container
directly, and the share host logs a symmetric NAT warning at startup.
Publish one UDP port and advertise an address viewers can reach (the Rust
host only):
docker run --rm -it -v ay-home:/home/agent -p 47000:47000/udp \
-e AGENT_YES_ICE_UDP_PORT=47000 \
-e AGENT_YES_ICE_PUBLIC_IPS=192.0.2.10 \
snomiao/agent-yes
AGENT_YES_ICE_UDP_PORT puts every peer connection on that one UDP port;
AGENT_YES_ICE_PUBLIC_IPS (comma-separated, or auto for the STUN-reported
public IP) replaces the container's own address in its candidates, e.g. with
the Docker host's LAN IP for viewers on the same network. Viewers elsewhere
need that port forwarded to the host, or a TURN relay (CF_TURN_KEY_ID +
CF_TURN_API_TOKEN). On a Linux host, --network host gives the container
the host's own network and skips Docker's NAT.
ay serve install and ay serve status print the serve token and share links in
full on a terminal and mask them when stdout is not one (a pipe, a log, an
agent's shell), like ay share; --show prints them anyway. A script that
needs the token reads ~/.agent-yes/.serve-token instead of parsing the output.
When the daemon is installed with ay serve install / ay share new under oxmgr
(e.g. a container without systemd), the AGENT_YES_* / AY_* and CF_TURN_*
settings of the installing shell are forwarded to it and kept across later
re-installs; set one to an empty value (AGENT_YES_ICE_PUBLIC_IPS= ay serve install)
to drop it.
Available platforms:
linux/amd64(x86_64)linux/arm64(aarch64)
Cloud deployment:
For deploying to cloud platforms like Google Cloud Run, AWS, Azure, see Cloud Deployment Guide.
Supported CLI Tools
| Tool | CLI Name | Description | Installation/Update |
|---|---|---|---|
| Claude | claude |
Anthropic's Claude Code (default) | npm install -g @anthropic-ai/claude-code@latest |
| Codex | codex |
OpenAI's Codex CLI | npm install -g @openai/codex-cli@latest |
| Copilot | copilot |
GitHub Copilot CLI | npm install -g @github/copilot@latest |
| Cursor | cursor |
Cursor agent CLI | See https://cursor.com/ja/docs/cli/installation |
| Grok | grok |
Vibe Kit's Grok CLI | npm install -g @vibe-kit/grok-cli@latest |
| Qwen | qwen |
Alibaba's Qwen Code CLI | npm install -g @qwen-code/qwen-code@latest |
| Auggie | auggie |
Augment Code's Auggie CLI | npm install -g @augmentcode-inc/auggie-cli@latest |
| DeepSeek Harness | dsh-legacy |
DeepSeek Harness (interactive TUI) | npm install -g @deepseek-ai/dsh@latest |
| Antigravity | agy |
Google Antigravity CLI (Gemini) | See https://antigravity.google/docs/cli/install/ |
The tool will:
- Run the specified AI CLI tool
- Automatically respond "Yes" to common yes/no prompts
- Handle tool-specific patterns and responses
- When using
--exit-on-idleflag, automatically exit when the tool becomes idle
CLI Tools Comparison
Pros & Cons Analysis
Claude Code CLI (Anthropic)
Pros:
- Industry-leading performance on SWE-bench (72.5%) and Terminal-bench (43.2%)
- Advanced checkpointing feature for code state management
- Deep terminal integration with Unix philosophy support
- Enterprise-ready with AWS/GCP deployment options
- Excellent at complex refactoring and debugging tasks
Cons:
- Higher cost compared to alternatives ($5+ per session)
- Terminal-based interface may not suit all developers
- Closed ecosystem with limited community plugins
- Requires API subscription for full features
Codex CLI (OpenAI/Microsoft)
Pros:
- Cloud-based scalability for team collaboration
- Powers GitHub Copilot ecosystem
- Supports multimodal input (images, diagrams)
- Strong GitHub integration
- Flexible API for custom implementations
Cons:
- Requires more setup and technical knowledge
- Internet dependency for all operations
- Less mature/polished than competitors
- Higher computational requirements
Copilot CLI (GitHub)
Pros:
- Seamless GitHub integration
- Terminal-native development experience
- Wide language and model support
- Command explanation and suggestion features
- Enterprise policy controls available
Cons:
- Requires active subscription
- English-only support
- May struggle with complex/uncommon commands
- Organization admin approval needed for business users
Cursor CLI
Pros:
- Superior performance in setup and deployment
- Multi-model support from various providers
- Excellent context awareness with RAG system
- Enterprise features for CI/CD integration
- Can run multiple agents in parallel
Cons:
- Steeper learning curve
- UI/UX can be clunky with cramped interface
- Manual context management required
- Screen real estate limitations
Grok CLI (xAI/Vibe Kit)
Pros:
- Open source and free for basic use
- Cost-effective premium tier ($30/month)
- Real-time data access via X integration
- Strong community support
- Cross-platform compatibility
Cons:
- Requires API key for advanced features
- Internet dependency for AI features
- Additional setup and authentication needed
- Newer with less mature ecosystem
Qwen Code CLI (Alibaba)
Pros:
- Fully open source (Apache 2.0)
- Exceptional benchmark performance (87.9 on MultiPL-E)
- 256K-1M token context support
- No subscription required
- Enterprise-ready with full infrastructure control
Cons:
- Newer entrant with developing ecosystem
- Geopolitical considerations for adoption
- Less established tooling and integrations
- Regional trust and security concerns
Auggie CLI (Augment Code)
Pros:
- AI-powered code assistant with context awareness
- Supports multiple programming languages
- Real-time code suggestions and completions
- Integration with popular IDEs
- Team collaboration features
Cons:
- Requires subscription for full features
- Newer product with evolving feature set
- Limited documentation compared to established tools
- May require configuration for optimal performance
Choosing the Right Tool
- For Solo Developers: Claude Code (complex tasks) or Grok CLI (cost-conscious)
- For Teams: Codex CLI (cloud collaboration) or Cursor CLI (parallel agents)
- For Enterprises: Claude Code (performance) or Qwen Code (self-hosted)
- For Budget-Conscious: Qwen Code (open source)
- For GitHub Users: Copilot CLI (native integration)
Options
--cli=<tool>: Specify which AI CLI tool to use (claude, codex, copilot, cursor, grok, qwen, auggie). Defaults toclaude.--exit-on-idle=<seconds>: Automatically exit when the AI tool becomes idle for the specified duration. Useful for automation scripts.--use-skills: Automatically discover and prepend SKILL.md headers from the directory hierarchy (walks from current directory up to git root). Multiple SKILL.md files are merged with most specific first. Particularly useful to bring Claude Skills-like context to non-Claude agents such as Codex. Supports nested skills for monorepos.
Advanced Features
Named Pipe Input (Linux Only)
On Linux systems, agent-yes automatically creates a named pipe (FIFO) for additional input streams. This allows you to send input to the CLI from multiple sources simultaneously.
How it works:
- When started on Linux, a FIFO is created at
/tmp/agent-yes-YYYYMMDDHHMMSSXXX.stdin - The FIFO path is displayed in the console output
- You can write to this FIFO from another terminal or script
- Input from both the FIFO and standard stdin are merged together
Example usage:
# Terminal 1: Start the CLI
claude-yes "help me with my code"
# Output will show: [claude-yes] Created FIFO at /tmp/agent-yes-20260109123456abc.stdin
# Terminal 2: Send additional input via the FIFO
echo "also check the tests" > /tmp/agent-yes-20260109123456abc.stdin
This feature is useful for:
- Scripting complex interactions
- Sending input from multiple sources
- Integrating with other tools and automation systems
Library Usage
You can also use this as a library in your Node.js projects:
import claudeYes from "claude-yes";
// Use Claude
await claudeYes({
prompt: "help me solve all todos in my codebase",
cli: "claude",
cliArgs: ["--verbose"],
exitOnIdle: 30000, // exit after 30 seconds of idle
continueOnCrash: true,
logFile: "claude.log",
});
// Use other tools
await claudeYes({
prompt: "debug this function",
cli: "codex",
exitOnIdle: 60000,
});
// Use Auggie
await claudeYes({
prompt: "analyze code patterns",
cli: "auggie",
exitOnIdle: 60000,
});
Chat with your agent from any web page
agent-yes/liagent is liagent: a
floating chat box for your own web pages (a framework-free custom element),
the hub it talks to (a Cloudflare Durable Object), and the liagent CLI that
delivers each message into an agent-yes agent. It needs none of agent-yes's
CLI dependencies, so it bundles cleanly for browsers and Workers.
import { connectHub, defineChatBox } from "agent-yes/liagent";
import { chatHub, routeChat } from "agent-yes/liagent/hub";
See liagent's README and docs for the hub setup and each framework.
Implementation
The tool uses node-pty to spawn and manage AI CLI processes, with a sophisticated pattern-matching system that:
- Detects Ready States: Recognizes when each CLI tool is ready to accept input
- Auto-Responds: Automatically sends "Yes" responses to common prompts
- Handles Fatal Errors: Detects and responds to fatal error conditions
- Manages Process Lifecycle: Handles crashes, restarts, and graceful exits
Each supported CLI has its own configuration defining:
- Ready patterns: Regex patterns that indicate the tool is ready for input
- Enter patterns: Patterns that trigger automatic "Yes" responses
- Fatal patterns: Patterns that indicate fatal errors requiring exit
- Binary mapping: Maps logical names to actual executable names
- Argument handling: Special argument processing (e.g., adding
--searchto Codex)
Dependencies
node-ptyorbun-pty- For spawning and managing AI CLI processesfrom-node-stream- Stream processing utilitiessflow- Functional stream processingterminal-render- Terminal rendering and text processingphpdie- Error handling utilities
Inspiration
This project was inspired by: Claude Code full auto while I sleep : r/ClaudeAI
Contributing
Contributions from humans and coding agents are welcome. Please read CONTRIBUTING.md first: everything in this repository (code, docs, commits, PRs, issues) is written in English, and only synthetic data may be committed.
License
MIT
Claude stream sessions (preview)
PTY remains the default. When Claude's own arguments request
--output-format stream-json, ay detects the protocol, records mode: "stream",
and captures NDJSON through pipes in the TypeScript runtime. It does not add
stream flags to a native invocation:
ay claude -p --input-format stream-json --output-format stream-json --verbose --replay-user-messages -- "task"
ay --stream claude "task" is optional shorthand that appends those native
flags (and the stdio permission protocol). There is no config transport default.
Output-only stream invocations are also captured; bidirectional sends require
explicit --input-format stream-json --replay-user-messages.
Each session writes normalized <pid>.events.jsonl, original <pid>.native.jsonl,
and a readable <pid>.raw.log under the working directory's .agent-yes/.
Stream capture currently requires macOS or Linux. ay --detach claude ... starts a
background TypeScript wrapper and prints its registered CLI pid.
Permission requests are recorded; use an explicit Claude permission policy for
unattended sessions until approval commands are available.
For stream sessions, ay status and ay ls --watch derive state from events.
Permission requests and questions appear as needs_input; protocol errors appear
as stuck. ay ls shows the latest reported cumulative session cost in COST
(and cost_usd in JSON), with - when cost is unavailable.
ay send <pid> "message" sends one JSON line and returns success only after
Claude echoes that message's unique ID. Bodies are sent verbatim; sender provenance
stays in mailbox history rather than adding reply instructions to the task. --interrupt sends Claude's native
interrupt request before the new message. Receipt timeouts report an uncertain
outcome and never retry automatically. Stream sessions require receipts, so
--no-wait and terminal control codes are not supported. ay tail, including
follow and --until, reads the transcript without terminal wrapping.
A local preview executable such as aysj can forward arguments unchanged to a
worktree build. It behaves exactly like ay, including the PTY default; its name
does not enable stream capture.
Native stream flags also work after the wrapper separator, for example
ay --detach claude -- -p --input-format stream-json --output-format stream-json --verbose --replay-user-messages --model haiku "task".
The initial stream task is passed verbatim, without PTY init-message envelopes.
The registry mirrors active/idle turn transitions, and event files preserve stream
identity when an older registry writer drops the transport field.
Successful CLI exit also cleans up its detached process group, including remaining descendants that inherited the output pipes.
ay status uses the same normalized stream state and pending question as ay ls,
including permission requests. Output-only native stream invocations forward piped
stdin unchanged and preserve EOF; they do not convert text input into JSON messages.
Explore projetos relacionados
Carregando…