Upgrade and migrate
upgrade
Update agnostic-ai using the method you installed it with. update is an alias.
agnostic-ai upgrade
agnostic-ai upgrade --check # show install details without updating
agnostic-ai upgrade --version v0.92.0 # install a specific release
--check looks up the latest release online and waits up to 2 seconds. When the lookup fails, it prints Latest: unknown with the reason.
With --quiet, upgrade prints only ! notes, errors, the build provenance result and the package manager's own output. A companion update prints only its ! warnings and the build provenance result, or its full output when it fails. --check prints its report either way.
Install the new CLI before upgrading its projects. If you already have the latest release and the project requires an older one, the message points to agnostic-ai upgrade --requires.
Stop agnostic-ai sync --watch before upgrading. The new release includes the migrations. Run these steps in each project.
- Run
agnostic-ai upgrade --requires. It raisesrequires, updates the editor schema URL, syncs, and lists applicable migrations. Old spec forms still work. - Run
agnostic-ai migrate --dry-run, review the changes, then runagnostic-ai migrate. - Make any manual spec edits listed on the release page.
- Run
agnostic-ai sync, review the generated diff, then runagnostic-ai sync --check. - Restart watch.
Automatic upgrade offers
In a terminal, a stable release build checks for updates at most once a day (five-second network limit) and offers:
Update available: <installed> -> <latest>
Release guidance: https://github.com/Chemaclass/agnostic-ai/releases/tag/v<latest>
Update now? [Y/n]
Commands check their flags against the project before showing the offer. For example, graph --spec missing reports the unknown spec without reading a reply.
Enter or y accepts. n runs your original command and silences the offer for the day.
In a project, accepting does four things:
- Installs the new release and checks the new executable's version.
- Raises
requiresto the new version, keeping its form, and updates the editor schema link, as--requiresdoes. - Previews and applies the migrations to old spec files.
- Runs
sync, thensync --check.
Outside a project, it updates only the tool. Rerun your command afterward; the release page lists manual steps.Offer limits and opt-out
.agnostic-ai, or .agnostic-ai/local links to another project or the user specs folder, the offer is skipped and names it. Links within the project are fine.AGNOSTIC_AI_NO_UPDATE_CHECK=1 turns the checks off. They are silent offline and skip CI, redirected input or output, JSON output, quiet mode, user-level commands, checks, previews, hooks, completion, editor services, and development builds.
Upgrade options
| Flag | Description |
|---|---|
--check | Show install details without changing anything. With --version, also show Requested:. |
--version <tag> | Install a specific release, including an older one. The leading v is optional. For package-manager installs, choose the version through that manager instead. |
--requires | Raise this project's requires to the installed release, keeping its form, update the editor schema link, then sync. See below. |
--run | Accepted for compatibility; upgrading is already the default. |
After updating through a package manager, run its installed CLI from the project root, as in A missing key is added only to the base config. When a range becomes a minimum, the command prints the value it replaced. If sync fails, the version changes stay: fix the problem and run The config needs one root setting per line and a single-line pnpm exec agnostic-ai upgrade --requires.How --requires rewrites the requires value
--requires changes the base config and any existing local requires, keeping comments and other settings. With 0.92.0 installed:Current value New value missing, empty, or null">=0.92.0"a minimum ( >=X.Y.Z)">=0.92.0"an exact pin ( X.Y.Z)"0.92.0"an exact pin with = (=X.Y.Z)"=0.92.0"a range or upper bound ">=0.92.0"sync again.--requires needs a stable release build. On a source build or a release candidate, install a stable release with agnostic-ai upgrade, or edit requires by hand. It also reads agnostic.config.yaml and cannot combine with --check, --version, or --run. Update user-level config and package-manager files with their own commands.requires. Before upgrading, expand a root {...}, YAML << merges, or a requires shared through &/* or split across lines.
The Scoop and WinGet paths match in any letter case. An installed companion is rebuilt through the updated CLI and restarted if it was running. If that update fails, the CLI stays upgraded and the error gives a retry command. See companion upgrades.upgrade picks the update command from where the binary lives. Package-manager installs use that manager; a standalone binary on macOS or Linux is replaced in place after a checksum and provenance check.Details: update command per install location
Binary location Upgrade */Cellar/*, */Caskroom/*, /opt/homebrew/*, /home/linuxbrew/.linuxbrew/*brew update && brew upgrade --cask Chemaclass/tap/agnostic-ai$GOBIN or $GOPATH/bin (defaults to $HOME/go/bin)go install github.com/chemaclass/agnostic-ai/cmd/agnostic-ai@latest*\scoop\apps\*, *\scoop\shims\*scoop update agnostic-ai*\Microsoft\WinGet\*winget upgrade Chemaclass.agnostic-aiVerified global npm package npm install -g --prefix "<prefix>" agnostic-ai@latest, using the prefix that contains the running CLIStandalone binary on macOS or Linux upgrade downloads the release, checks its checksum and its build provenance, and replaces the binary.Standalone binary on Windows Use the PowerShell install script. Windows cannot replace a running program. PATH copies and companion upgrades
upgrade also reports other copies on PATH that would run instead of the one it found.upgrade --check shows the verified npm prefix. For a project npm install, an npx cache, or an install whose global prefix cannot be verified, update the package with the tool that installed it.companion update-status --json reports a command for a verified global npm install. It runs upgrade through the CLI's absolute path. The field is omitted when the npm prefix cannot be verified.
migrate
Update spec files that use old field names or formats. Old forms keep working and sync writes the same files afterward, except that a literal MCP credential becomes a ${NAME} reference. doctor and upgrade --requires name the migrations that apply.
agnostic-ai migrate --list # which migrations apply here
agnostic-ai migrate --dry-run # preview the rewrites
agnostic-ai migrate # apply them
agnostic-ai migrate --scope user # rewrite the user specs
| Flag | Description |
|---|---|
--dry-run | Print each rename and a diff of each rewrite, and write nothing. Every env and headers value, args item, URL, and credential-like value prints as <redacted>; a ${NAME} reference and a !literal tag still show. See credential previews. |
--list | List every migration, one per line: whether it applies here, then its ID, group, release, and summary. It names each pack whose author needs to update its specs. Cannot be combined with --dry-run. |
--only <group> | Run only these groups, comma-separated. A migration ID starts with its group, such as config-file-name in group config. |
--scope user | Rewrite the specs in $AGNOSTIC_AI_HOME (default ~/.agnostic-ai) and its local/ folder. |
Migration rules and limits
- A migration rewrites only what keeps its meaning; anything else stays, with the reason.
secrets-mcp-literalsnames each variable to set, never the value. secrets-mcp-literalstakes a credential's literal value out of its file and keeps no copy.--dry-runnames the key and the file, so save the value before you apply.-qprints that line too.- A run that changes files ends with a count and the next command:
migrateafter a dry run,syncafter a real run.-qdrops that line. migratetakes no argument. Pass a group with--only.- A symlinked spec keeps its link, and its target gets the rewrite. A pack, or a spec linked into one, is never rewritten; the output names the pack.
- Migrations stay within the project (or, with
--scope user, the user specs folder) and its local folder, even a linked one. - A migration that cannot plan, such as on a spec that does not parse, prints
cannot planwith the reason; the others run, andmigrateexits 1. doctornames a migration only when it rewrites something or a skip needs you, such as a spec setting both old and new forms.--dry-runand--listshow every skip.
The migrations, by ID:Details: what each migration rewrites
Migration Rewrites config-file-nameagnostic.config.yaml to agnostic-ai.yaml, in a project only. When both exist with the same content, it removes the old file; it skips when they differ or Git ignores agnostic-ai.yaml.hooks-portable-eventsA hook's event and matcher to the portable on and match, such as PreToolUse on Bash to before-tool on shell. Comments, quoting, and key order stay. Skipped when the portable form would change a tool's event or matcher (such as matcher: Read on Codex, or matcher: Edit|Write on Claude Code, since match: edit also covers MultiEdit and NotebookEdit), when a local/ spec extends the hook, and for a pack's hook.capabilities-agent-tools, capabilities-settings-permissions, capabilities-skill-toolsAgent tools to can, and Claude Code names in permissions and skill allowed-tools to names shared across tools. An adjacent WebFetch, WebSearch pair becomes web; names without a shared form stay. A skill's comma-separated allowed-tools string is rewritten in place and stays a string, with such a pair left as written. Run with --only capabilities.secrets-mcp-literalsPlain MCP env and headers values: credentials become ${NAME} references, named as import names them, and other values get !literal. Skips keys with credential names whose values do not look like credentials, credentials mixed with a reference, and pack specs. Run with --only secrets.mcps-codex-environment-idThe Codex MCP field experimental_environment: local to environment_id: local. Skips remote and other values, which name no executor, a spec that sets both fields, a spec a local/ spec extends, and pack specs. Run with --only mcps.