/corgi:setupfrom corgi
Guides through end-to-end setup of the corgi development environment, including CLI installation, workspace registration, and agent initialization.
Ships in corgi. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Read ../_shared/conventions.md first.
One pass, from nothing to a phone that can start a session on this laptop. Every step is idempotent: run the whole thing again and it only fixes what is missing. Do the automatic steps yourself; collect the manual ones and print them at the end as a checklist, with the exact command or click.
brew, code, open, gh are the tools. If one is missing, say so and
give the install line; do not invent a workaround.uname -s before those steps.command -v corgi || brew install andriiklymiuk/homebrew-tools/corgi
brew trust andriiklymiuk/tools 2>/dev/null || true # Homebrew 5 asks once; harmless otherwise
corgi update # or corgi upd
corgi doctor # required tools, Docker, ports
corgi doctor --fix --yes starts Docker and frees ports without asking;
installing a missing tool asks unless --yes.
In the project directory:
corgi-compose.yml? Offer /corgi-new (writes one with Claude) or
corgi create (a starter), or corgi run -l for an example. Do not go on
to agent mode without a directory the user actually works in; agent mode
works in any git repo, compose or not.corgi agent init registers the directory and enables supervision
(autostart). corgi agent init --config-dir ~/.claude-work for a repo on
another Claude account. corgi agent scan ~/dev registers every stack
under a folder without enabling them..corgi/corgi_services/ beside
.corgi/agent.yml. A checkout with a top-level corgi_services/ is moved
there by any corgi command; corgi migrate does it out loud (--dry-run
to look first). Nothing moves while services are up - corgi stop first.
Git worktrees under it are repaired, so the source repo still points at
them. The move also touches .gitignore - before committing that, run
git check-ignore -v .corgi/corgi_services - a broader rule already in
the file (a repo that ignores all of .corgi/) covers the new path, and
the commit would be pure noise.corgi agent up --at-login
One command: daemon at login (launchd / systemd), MCP endpoint, a
Cloudflare quick tunnel, a single-use pairing QR, the launcher URL. Print
the QR block and the or open: link to the user; that is the link they
asked for. corgi agent up again reprints a fresh pairing window; corgi agent status --json has dashboardUrl.
Stable URL (the quick tunnel changes on every restart and un-pairs the phone). Pick one, once:
| choice | commands | manual part |
|---|---|---|
| same Wi-Fi, no tunnel | corgi agent up --http 0.0.0.0:8765 --at-login | none; phone opens http://<lan-ip>:8765/app |
| Cloudflare named tunnel | brew install cloudflared · cloudflared tunnel login · corgi agent tunnel setup corgi.yourdomain.com | a domain on Cloudflare; the login opens a browser |
| ngrok static domain | brew install ngrok · ngrok config add-authtoken <token> · corgi agent tunnel setup <name>.ngrok-free.dev --provider ngrok | free account, copy the dev domain from dashboard.ngrok.com/domains |
After tunnel setup, corgi agent restart keeps the same URL.
corgi agent track enable # hooks into ~/.claude and every profile's config dir
corgi agent hooks enable --all # "needs you" notifications for every registered workspace
corgi agent board --slots 6 # 6 for a Stream Deck Mini, 15 for an MK.2
Sessions started before this report on their next event; corgi agent rescan picks up running ones. Run track enable again after every corgi upd: a new version can add hooks, and corgi agent doctor flags the old
set as "from an older corgi".
Telegram (free on iOS, unlike ntfy):
/newbot, follow it, and
hand you the token (into the command, not the chat).corgi agent notify telegram --token <TOKEN> - checks the token, waits up
to three minutes for the user to message the bot, reads the chat id,
writes notifyUrl, sends a test. Tell the user to open the bot and send
it any message when the command says so./sessions, /usage, /allow, /deny, /focus.Slack, Discord, ntfy: corgi agent notify set <webhook-url>; corgi agent notify test sends one. A daily digest: digestAt: "18:00" in the user
config, corgi agent digest --send to try it.
code --install-extension Corgi.corgi --force # VS Code: Agent sessions view, status bar, focus by tab
open "macappstore://apps.apple.com/app/corgi-agents" # Corgi Agents for Mac: the menu bar + window (not on brew - the app is on the store)
Then the person: reload each VS Code window once (Developer: Reload Window), grant corgi-bar Accessibility (Talk and typed prompts press
keys) and Notifications when macOS asks. corgi-bar turns Launch at login
on by itself the first time it runs from /Applications (its Settings › App
toggle turns it off); corgi agent up --at-login opens it once for that.
Two macOS traps corgi agent doctor checks: the daemon must run from its own
copy of the binary (corgi agent install does this; an older install that
ran Homebrew's path makes macOS ask "corgi wants access to Documents" after
every update), and the menu bar must be running for its login item to exist.
Stream Deck: gh release download -R Andriiklymiuk/corgi-agent-deck -p '*.streamDeckPlugin' -D /tmp && open /tmp/*.streamDeckPlugin installs the
plugin; the person drags Session keys, a Talk key, a Prompt and a
Budget key onto the deck.
Voice: in Claude Code run /voice tap once; bind voice:pushToTalk to
ctrl+y in ~/.claude/keybindings.json (and in each profile's config dir).
The Claude Code panel uses its own cmd+d.
Ask whether they want the daemon to notice things while they are away, and offer the list rather than asking an open question - people answer "which of these do you use?" far better than "what do you want watched?". Say it as a menu and take whatever they name:
corgi can watch these, and you pick the ones you actually use:
- Linear or Jira - new tickets assigned to you, new comments on them
- GitHub or GitLab - reviews and comments on your pull requests, requests to review someone else's, red builds
- Slack - someone naming you or writing to you directly; a channel you want every message of; a code-review channel where pull requests get posted
Which do you use? I only need a token for the ones you name.
Then take only those, in one pass. Do not ask for a token for a service they did not name, and do not run a second round of questions per service: the table below has everything each one needs. Get the token into the command, never into the chat:
| service | where the token comes from | command |
|---|---|---|
| Linear | linear.app → Settings → Security & access → Personal API keys → New key (read is enough) | corgi agent watch auth linear --token lin_api_… or LINEAR_API_KEY |
| Jira Cloud | id.atlassian.com → Security → API tokens → Create API token, the plain one. Not "create with scopes": corgi authenticates with Basic auth (email + token), which a scoped bearer token is not. Plus the site URL and the login email | corgi agent watch auth jira --url https://you.atlassian.net --email [email protected] --token … or JIRA_URL, JIRA_EMAIL, JIRA_API_TOKEN |
| GitHub | gh auth login is enough (the watch reads the notifications feed through it); or a fine-grained PAT with Notifications read | nothing, or corgi agent watch auth github --token ghp_… / GITHUB_TOKEN |
| Slack | api.slack.com/apps → your app → OAuth & Permissions → User Token Scopes: search:read, channels:history, groups:history, im:history, mpim:history, channels:read, groups:read, im:read, mpim:read, users:read, chat:write, reactions:write → Install to workspace → copy the User OAuth Token (xoxp-). A bot token (xoxb-, scopes chat:write, reactions:write, chat:write.public) is optional and only changes whose name a reply carries | corgi agent watch auth slack --token xoxp-… [--bot xoxb-…] or SLACK_USER_TOKEN, SLACK_BOT_TOKEN |
| GitLab | Preferences → Access tokens → legacy token, scope read_api only. A fine-grained token is scoped to groups and projects; corgi reads /api/v4/todos, which belongs to the user and sits outside that scoping. Self-hosted needs the URL | corgi agent watch auth gitlab --token glpat-… --url https://gitlab.example.com or GITLAB_TOKEN, GITLAB_URL |
Those are the machine-wide tokens: every watched workspace falls back to
them. A workspace at another company gets its own - a second Jira site,
a different Linear key, a self-hosted GitLab. Add --local inside it (or
--workspace <id> from anywhere) and that token beats both the machine-wide
one and the environment:
cd ~/dev/acme-api
corgi agent watch auth jira --url https://acme.atlassian.net --email [email protected] --token … --local
corgi agent watch auth gitlab --token glpat-… --url https://gitlab.acme.com --local
corgi agent watch auth linear --clear --local # drop this workspace's override again
Tokens never go into the repository. --local writes to the user-level
agent directory, mode 0600, beside the machine-wide ones. corgi agent watch prints one row per workspace holding an override.
Then, in each workspace:
corgi agent watch enable --tracker jira --project ABC --repos acme/api,acme/web --labels bug,defect --prs
corgi agent watch enable --tracker linear --project ABC --prs --action fix # also run the fix skill, draft PRs only
corgi agent watch run --dry-run # prove the tokens work: no bookmark moved
corgi agent restart
corgi agent watch # tokens per workspace, watched workspaces, last polls
For Slack, ask two more things and nothing else:
--review-channel '#code-review'--trust @teammate @reviewerThe second is a security question wearing a friendly hat: everyone in a channel can type a mention, so the answer is a list of named people and the default is nobody. Never suggest a wildcard, and never fill it in from the channel's membership.
corgi agent watch enable --mentions --trust @teammate
corgi agent watch enable --review-channel '#code-review' --action fix --auto-for reviews
Always set --project and --repos. They are what routes an event to a
workspace - an issue by its key prefix, a PR by its repo. With neither, an
event falls through to the first watched workspace that merely matches the
rules, so a review on one client's PR can start an agent in another's
checkout. --tracker linear|jira picks the tracker when both have tokens.
Never guess either one - read them off the repos. A key that is one letter off routes nothing, silently, and looks exactly like a quiet week:
# the tracker key, from the ids the team already writes
for d in */; do git -C "$d" log --oneline -30; git -C "$d" branch -a; done 2>/dev/null \
| grep -oE '\b[A-Z][A-Z0-9]{1,9}-[0-9]+\b' | sort | uniq -c | sort -rn | head
# the repo list, from the remotes
for d in */; do git -C "$d" remote get-url origin 2>/dev/null; done \
| sed -E 's#.*[:/](.+)\.git#\1#' | sort -u | paste -sd, -
What the first round actually does depends on the source. GitHub sends
If-Modified-Since and starts from now. Linear and Jira start from
24 hours ago on an empty cursor, so the first poll reports a day of
tickets. Say so before enabling, or the first notification looks like a bug.
Prove each token is the right person before going further. A token that works but belongs to another account sees nothing as "mine", and that looks exactly like a quiet week:
corgi agent watch board # columns · `you <email>` - the tracker's idea of who holds the token
gh auth status # the GitHub account the feed reads as
corgi agent watch run --dry-run # every source polls once, nothing moves
If you is not the person whose tickets these are, redo watch auth with
that person's key (or --local for this workspace) before anything else.
Filter new issues by state, or the backlog arrives every time. Take the
names from corgi agent watch board - it reads the tracker's real columns
(Linear and Jira alike); a state you invented matches nothing. Name only the
ready column:
corgi agent watch enable --states "Ready for dev"
With no --states the watch takes every open ticket except the ones in
flight - In Progress, Code review, QA and the like, which someone already
has (2.30.4). Naming such a column in --states takes it anyway, so "In
Progress" belongs there only when the team parks ready work in it. A ticket
a live session is on - its ticket or its branch names it, on this laptop or a
peer - is never picked, whatever the column.
The state filter applies to new issues only. Comments on your issues and reviews on your PRs come through whatever the state is - those are already about you.
When something fires that should not have, or does not fire at all, ask rather than theorise. It walks routing, rules, dedupe, caps and quiet hours and prints the gate that stopped it. Nothing runs:
corgi agent watch test issue.new --ref <KEY>-123
Unattended. corgi agent watch enable --auto is --action fix --prs --comments: it works on what arrives instead of only telling you. Say what
that means before turning it on - it opens draft pull requests on their real
repositories without being asked:
corgi agent watch enable --auto --quiet 18:00-09:00
Draft PRs only, never a merge. One run at a time per ticket, nothing done
twice (an event key is handled once across polls and webhooks), at most
3/hour and 10/day, and nothing above 95% of a usage window (--limit-ceiling 100 lifts that for a workspace that may spend the account down). --quiet HH:MM-HH:MM closes a window completely: no fix starts and nothing
buzzes - what arrived is recorded, shows in the inbox, and is delivered as
one summary when the window opens. A run the daemon was killed in the middle
of is closed on the next start and its event offered again, so a reboot
loses nothing and repeats nothing.
What it did outlives the notification: corgi agent watch lists the last
fixes with their pull requests, and so do the phone ("worked on for you")
and the VS Code status bar.
--action fix (and so --auto) runs unattended only after corgi agent init --dangerously-skip-permissions; say that before enabling it. Suggest quiet
hours at the same time - an unattended agent with no window acts at 3am.
Turning fix mode on, in order - each line answers a question the user will otherwise ask after the first run:
corgi agent watch board # the columns, read once
corgi agent watch enable --action fix \
--states "Ready" --pickup "In Progress" --review-status "Code review" \
--isolate --hand-over --max-per-hour 2 --max-per-day 6 --quiet 17:00-09:00 --days-off sat,sun
corgi agent harden # deny rules for secrets, force-push, reset --hard
corgi agent init --dangerously-skip-permissions # only after saying what it means
corgi agent restart
corgi agent doctor # no ✗ - `security · <ws>` names the workspace to harden
--isolate keeps every run in worktrees of its own; without it a fix
edits the checkout a person may be typing in.--hand-over types a review comment, a red build or a colleague's word in
the review channel into the session already on that branch instead of
starting a second one.--pickup / --review-status move the ticket as the run goes, so the
board tells the team what the agent has.--auto-merge), never for a "LGTM" in Slack.corgi upd: corgi agent restart, then corgi agent track enable once more - the hooks live in the Claude config and an upgrade
can leave them behind.Codex as an agent (corgi agent init --agents claude,codex, or --kind codex): Codex has no plugin, so give it the skills - corgi agent skills install copies them into ~/.codex/skills with the _shared files they
read; corgi agent doctor reports when that copy is behind, and install
again after corgi upd brings it up. corgi agent track enable wires its
notify hook the same way as Claude's.
Two clients on one laptop: tokens --local per workspace, --tracker
and --repos set explicitly in each, and a look at corgi agent watch to
see one token row per workspace. corgi agent doctor and corgi agent watch prune --dry-run are the check for leftovers; git worktree list in each
repo shows what prune does not track (a worktree a skill made in /tmp).
Webhooks (instant instead of every three minutes): run corgi agent watch hooks --install inside each watched workspace - it creates or updates
the hook on every GitHub and GitLab repo in --repos (GitLab needs
Maintainer, GitHub repo admin) and prints what is left by hand. Polling
stays on beside the webhooks as the safety net; a comment from both runs
once. Sources mix freely: GitLab on webhooks while Jira polls is fine. A
named tunnel (step 3) keeps the URLs alive across restarts; with a quick
tunnel they change on every restart, so --install again after one. Verify
with a comment on a test MR/PR, then corgi agent watch status shows a
webhook <time> on that source. What is left by hand goes on the manual
checklist:
<base>/hooks/linear, the
secret, events Issues and Comments.--install reported ✗ for (no admin /
Maintainer there) - the same settings by hand, as watch hooks prints them.<base>/hooks/jira?token=<secret>, events Issue created, Comment created.corgi agent doctor # every check green: claude binary, daemon, login, trust, tracking, board
corgi agent status # workspaces online as devices
corgi agent sessions # the board
corgi agent notify test # the phone buzzes
Print, in this order: the launcher link, the pairing QR (or the or open:
URL), and the manual checklist that is still open.
Then one line on what to try first, because a new person does not know it is
there: "Say give me a link for the team after you brainstorm a spec with your
agent - corgi idea share <spec.md> turns it into a page your team comments
on, and the agent answers. It is the Ideas tab on the phone, the Mac and the
dashboard." Offer to make the first one now from a spec in the repo
(docs/**/*.md) if there is one.
A second machine is not a second setup. Paired as peers, two machines that watch the same trackers agree on one leader per tracker: it runs the fixes, the bots and the routines and rings the phone; the other records and stays quiet. Tasks move between them. Sessions stay per machine. The user says "my new laptop", "the server", "join the cluster": this is the pass.
home laptop ◀── peers pulse, once a minute ──▶ new laptop / server
│ │
└──────────── the phone pairs with both ────────┘
One command does most of it, from the machine already set up:
corgi agent peers bootstrap me@build-1 --dry-run # the plan, nothing sent
corgi agent peers bootstrap me@build-1 --with-tokens --lead # a server that does the unattended work
corgi agent peers bootstrap me@laptop-2 --lan # a second laptop on the same network
Over ssh it installs corgi and claude, clones every workspace with a git remote (or --workspace api)
under the same names with its watch, models and routines, starts the daemon at login, sets linger and the
timezone on Linux, pairs the two as peers and, with --lead, hands the unattended work over. Tokens go only
with --with-tokens, inside the ssh session, never on a command line. --dangerously-skip-permissions is
for a server nobody answers (add corgi agent harden there). It ends with what is left by hand: claude auth login and gh auth login on the other machine, and a stable tunnel. Without ssh, the same in two halves:
corgi agent peers export --json here, corgi agent peers import there with the pack on stdin.
By hand, or to check what it did:
claude auth login prints a URL to open anywhere and a code to paste back; docs/agent.md
"Running it on a server" is the full list (git identity, gh/glab login, the plugin, linger, TZ).
Register the same stacks under the same workspace names: a task sent across looks for its
checkout by that name.claude auth login for each account (--config-dir for the
second), gh auth login or glab auth login, and corgi agent watch auth <tracker> again. Nothing
is copied from the first machine, and nothing should be: the peer link carries events, never tokens.corgi agent watch enable with the same tracker and repos). Two machines
that watch the same project are how corgi knows they are peers of one tracker; a workspace watched on
one machine only is simply that machine's.corgi agent up --at-login with a named tunnel (step 3's table),
or --http 0.0.0.0:8765 when both sit on one network. A server: corgi agent install for the unit,
loginctl enable-linger $USER so it outlives the SSH session.corgi agent peers invite on the first machine
prints a URL and a ten-minute code, corgi agent peers join <url> <code> on the new one pairs both ways.
corgi agent peers on either shows who is paired, awake and leading.corgi agent peers lead on the machine that should do the unattended work, the one
that stays plugged in: usually the server, or the laptop that stays home. The leader that goes silent
for three minutes is replaced, and takes the lead back when it returns.corgi agent init --dangerously-skip-permissions (else a
Bash step waits for an answer), corgi agent harden, watch enable --isolate --prune-after 7d, quiet
hours, export TZ=… before install. corgi agent doctor --away is the list for a machine nobody
touches for weeks: updates, lid, power, network, heat, the pulse.corgi agent peers names the other side and says who leads each tracker;
corgi agent doctor is green; the phone's board shows the other machine's sessions under
"on ". corgi agent task add "…" --on <peer> puts a task straight on the other machine.What does not travel: tokens, transcripts, sessions and their permission prompts, the agent config of the
first machine. What does: the board, the day's runs, ignores and mutes (watch ignore on one ignores on
both), tasks waiting for a run (after the home machine is silent for ten minutes, or task send).
corgi agent up
prints a new one). Save <url>/app to the home screen.notify telegram
waits.cloudflared tunnel login opens a browser. ngrok: copy the
authtoken and the dev domain from the dashboard./voice tap and the ctrl+y binding inside Claude Code.claude once in each workspace and accept the trust dialog,
or corgi agent doctor keeps saying trust · <id>.gh auth login,
GitLab access token (table in step 7). Webhook entries in each service,
from corgi agent watch hooks.claude auth login and gh auth login over SSH (URL +
code), a stable tunnel there, and peers lead on the one that does the
unattended work when bootstrap ran without --lead.corgi agent doctor has no ✗.corgi agent status lists the workspace online.corgi agent watch board says you <the right person> in every watched
workspace, and watch run --dry-run polled every source without an error.corgi agent watch board --refresh first, always. It reads the workspace's real
columns once and caches them; a column name you guessed is refused, and Jira also
decides which moves are legal from where the ticket currently sits, so a refused
move names the ones that were.
--pickup "In Progress" moves a ticket when someone picks it up - from the
phone's Work on it and from an unattended run. Unset writes nothing, which
is the default: no existing setup starts changing a board it was not asked to.corgi agent watch undo [REF] closes what a run opened and puts the ticket
back. --dry-run says what it would do. The branch is left alone: it holds the
work, and deleting it is the part that cannot be undone in turn.--action fix alone means every kind the rules match, including a fresh ticket,
which is the one with no test for "done". Split it:
corgi agent watch enable --action fix --auto-for reviews,comments
corgi agent watch enable --action fix --auto-for ci
--ci to arrive at all. A red build is the best unattended
target there is: a precise signal and a pass condition nobody can argue with.--reviews to arrive at
all, and corgi posts a review rather than pushing to their branch. Almost
never belongs in --auto-for.Two more flags belong with a ticket workflow:
--review-status "In Review" moves the ticket again once a run opened a pull
request, and posts the link on it. Without it a board full of "In Progress"
is a board of finished work nobody has looked at.--lease claims the ticket on the tracker first, so a second machine
watching the same board leaves it alone. Only worth it with two machines.Before turning any of it on, and after:
corgi agent watch replay --since 168h # the week it would have had
corgi agent watch replay --auto-for ci # try a setting without saving it
corgi agent while-away # the morning card
corgi agent watch undo ABC-1 --dry-run # close what it opened, ticket back
A kind that was not named is reported, not worked, and corgi agent watch test
answers notify for it, so the split is visible before an event arrives.
The phone pairs by scanning the QR corgi agent up prints. A browser on the
machine running the daemon needs no code - anything that can run the command
can already read the daemon's files:
corgi agent dashboard # opens it and authorises this browser
corgi agent dashboard --print # the link, refused into a pipe or --json
It is a real device with a name: corgi mcp devices list shows it,
corgi mcp devices revoke this-laptop takes it away.
--from max narrows comments and reviews to the people you are actually
waiting on, across every repo. The rules are otherwise shaped like a board.--states names
that column, because asking for it means you meant it.--quiet 17:00-09:00 holds notifications as well as fixes, and delivers one
summary when the window opens. It applies to a reporting watch too.Codex, Cursor, Cline, Droid, an in-house agent - do not tell them corgi has
no plugin for their tool. The skills are plain Markdown in the repository and
the skills CLI installs them anywhere:
npx skills add Andriiklymiuk/corgi
Then say which skills matter for what they actually do, rather than listing
all of them. The frontmatter must stay valid YAML for this to work: a
description containing a colon has to be quoted, or a strict parser skips
that skill silently while Claude Code goes on reading it fine.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub andriiklymiuk/corgi --plugin corgi33 skills in this plugin
/agentUse for corgi agent mode: Remote Control from a phone, the session board ("who is waiting on me"), watching trackers and PRs ("tell me when someone comments"), why a watch fired, and handoffs ("leave a handoff for ABC-7"). NOT compose authoring (corgi), starting a stack (run), debugging (debug)./alignUse when the user says "align", "let's agree first", or a request can be read two ways before any code. Reaches a shared understanding cheaply, then codes. NOT a plan gate or a long interview./autopilotUse for a SUPERVISED loop that drains the ticket queue into draft PRs: "autopilot", "keep shipping the queue", "drain the backlog overnight". One spec gate per batch, never merges. NOT a single batch (/corgi-queue)./before-afterUse to prove a visual change against what it replaced: "before and after", "screenshot comparison", "attach screenshots to the PR". Captures the same screen on the base branch and yours. NOT a design match (design-parity) or store shots (mobile-screenshots)./budgetUse for "how much budget do I have", "can I start another task", "when does the limit reset". Reads `corgi agent usage --json`, answers in numbers, suggests `corgi agent carry` near a limit./ciUse to put a corgi stack in CI or run e2e across repos: "set up CI for this workspace", "wire this to GitHub Actions/GitLab CI", "full-stack e2e on the PR". NOT compose authoring, local runs, broken stacks or PR review.Other plugins' skills for the same job