# How to let an agent create worktrees and drive the app via Orca CLI with orca

Repo: [stablyai/orca](https://github.com/stablyai/orca) | Difficulty: Advanced | Time: 1 hour | Basis: From the README

Use the Orca CLI so an agent can spin up worktrees and click through a UI on its own.

**Who it is for:** Advanced builder automating a repeatable agent workflow instead of clicking through the app

**The problem:** Manually creating worktrees and prompting each agent does not scale when you run the same setup daily.

**The outcome:** A script or agent creates worktrees and drives the browser using Orca's own commands.

## Steps

1. Read the Orca CLI overview docs to see the available commands.
2. Run orca worktree create for a new task branch.
3. Use the snapshot, click and fill commands to drive a page from a script or an agent.
4. Wire the commands into your own automation once one run works.

## Prompt to paste into your agent

```text
Using stablyai/orca's CLI, write a short script that runs orca worktree create for <branch name> and then uses snapshot, click and fill on <local page URL>. Verify each command's output before chaining them.
```

## Caveat

Only the command names worktree create, snapshot, click and fill appear in the README excerpt, so check the CLI docs for exact arguments before scripting.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/stablyai-orca/script-orca-with-agent-driven-cli/
