Start with doctor
anypick doctor
anypick doctor --fix --dry-run
anypick doctor --fix -ydoctor inspects the whole installation — it does not narrow to one client
or provider. It checks the AnyPick data directory, the SQLite database, saved
accounts and gateways, file permissions, PID records, running proxies, and
any operation journal entry that did not finish.
What --fix may touch
--fix works from a hard allowlist of six actions. It can:
- delete a stale PID file
- stop an orphaned proxy
- delete a temporary client overlay left behind by
run - repair permissions on AnyPick-owned paths
- rebuild derived caches
- complete an interrupted journal rollback
It will not switch accounts, install packages, touch native auth files, or change your bindings. Anything outside the allowlist is reported as manual only, with the suggestion printed next to it — the terminal UI shows the same split.
The temporary-overlay action is the one to read carefully. An overlay is a
directory under the system temp directory, and nothing in it records which
process owns it, so --fix judges it by age alone and refuses anything modified
in the last hour. A long anypick run session can outlive that hour, and the
repair would then delete the isolated home of a running client. If you have a
long-running run open, skip this action and delete the directory by hand once
that session ends. Every other action on the list proves its target is dead
before touching it.
A stale lock file is deliberately not on the list. AnyPick’s locks are
flock(2) descriptors that the kernel releases when the holding process exits,
so a crash leaves nothing stale to delete — and a “repair” that removed a lock
file a live process still holds would defeat the coordinator that keeps
concurrent account changes from corrupting each other (ADR 0009). An earlier
draft of this page promised the action; it cannot exist.
Reading exit codes
| Code | Meaning | Usual cause |
|---|---|---|
1 |
Operational failure | Unexpected runtime error during a command |
2 |
Invalid usage | use without --with or --current, or a bad flag |
3 |
Not found | Account, gateway, preset, or client name does not exist |
4 |
Auth required | A login or API key is missing or expired |
5 |
Capability conflict | The source cannot serve that client, or no binding exists |
6 |
Health failure | A health check failed |
7 |
Missing dependency | An external proxy binary, such as kirolink, is not installed |
8 / 9 |
Import refused | Bad export envelope, or the archive is too large |
130 |
Cancelled | You pressed Ctrl-C |
Common situations
A client launches but ignores the source
Check what is actually in effect — a project binding in the current directory beats your global default:
anypick current claudeIf a stale project binding is winning, anypick unlink claude removes it.
run exits 5 with no binding
There is no ephemeral, project, or global binding for that client. Set one:
anypick use claude --with grok/workA proxy will not start
Look at the log, then at the port:
anypick proxy status gemini work
anypick proxy logs gemini work --lines 100
anypick proxy config gemini work --port 4131 # move itA configured port that is already held no longer fails the start: AnyPick moves
the proxy to a free port, persists it, rewrites bound clients, and reports the
move as a warning. A proxy left from an earlier session can still be stopped by
naming it: anypick proxy stop gemini work. There is no “stop everything”
form; the anypick proxy command with no arguments prints its usage.
The Gemini proxy rejects a model
An OAuth-only Gemini account can sign a client in but cannot drive the proxy,
which needs GEMINI_API_KEY in the saved login’s .env. If both sign-ins exist,
save the source the proxy should serve:
anypick add account gemini --current --source gemini-cli --name work
anypick add account gemini --current --source antigravity --name workThe saved login and the live login disagree
The terminal UI marks this ◐ changed. It means the provider’s CLI wrote a new
credential after AnyPick took its snapshot. Adopt the new one:
anypick account refresh codexTwo saved accounts share one snapshot
anypick doctor reports duplicate-snapshot when two names for the same
provider hold the same credential snapshot. Switching between them cannot
change the login. AnyPick refuses to create new pairs and only asks you to clean
up ones saved earlier:
anypick doctor --json # exact names, and which to keep
anypick account remove workbuddy/workDoctor names the account to keep as keep <provider>/<account> and prints the
removal commands. When both names are live — one active, another still
referenced by a client binding — it asks you to re-bind clients to one account
instead of printing removals, so a cleanup never breaks a route.
macOS will not open the app
The macOS app is signed ad-hoc, not with an Apple Developer ID, so Gatekeeper has no notarization ticket to check. macOS may refuse the first launch with either of these:
- “AnyPick.app cannot be opened because the developer cannot be verified.”
- “AnyPick.app is damaged and can’t be opened. You should move it to the Trash.”
Neither message means the download is corrupt. There are two ways to open it, and you only need one.
Allow it from System Settings. Try to open the app once and dismiss the warning, then open System Settings → Privacy & Security, scroll to Security, and click Open Anyway next to the AnyPick entry. macOS records the approval, so this is a one-time step per version.
Clear the quarantine flag. Use the absolute path:
/usr/bin/xattr -dr com.apple.quarantine /Applications/AnyPick.appThe absolute path matters. xattr also names a Python package, and a
version-manager shim can put it ahead of the system binary on PATH. That
program has no -r flag, so a bare xattr -dr exits with a usage error and
clears nothing.
Installing with the Homebrew cask does not skip this step. Homebrew applies the
same quarantine attribute a browser does, and Homebrew has removed the
--no-quarantine flag, so the first launch still needs the approval above.
Once the app has run, later launches and in-app updates do not ask again: the updater downloads through Go’s HTTP client, which does not set the quarantine attribute at all.
Proxies keep running after I close the UI
Closing the native app’s main window does not quit the app. Use Quit AnyPick from the app or menu-bar quick panel to stop its bundled Go service gracefully.
Closing the source TUI also leaves existing compatibility processes unchanged. To stop that compatibility supervisor from this checkout:
make run ARGS="tray stop"make run ARGS="proxy stop" stops running account proxies directly. The TUI starts its
compatibility supervisor only when you explicitly press Shift+D or
start it from the tray runtime screen; it does not control a separately launched
AnyPick.app.
An activation failed halfway
Mutating activation steps are recorded in an operation journal with backup
paths, so a failed activation restores the prior state — client config, native
auth, and any proxy it started. If the process was killed before rollback could
finish, anypick doctor --fix completes it.
An account switch is the same transaction: if the newly selected account cannot be applied to bound clients, the active pointer, the client binding and the previous account’s proxy are all restored, and the error says so. You should never see the app claim a new active account while a client still points at the old proxy.
Digging deeper
anypick --trace use claude --with grok/work # name each step, no secrets
anypick proxy status <provider> <account> # live listener state
anypick doctor --json # machine-readable findings--trace prints the activation plan step by step, which is usually enough to see
which stage failed. Combine with --dry-run to see the plan without running it.