Update
A guide to keeping MoAI-ADK up to date. A single moai update refreshes both the binary and the templates, and the custom assets you created are preserved automatically.
Run without flags, it refreshes both the binary and the templates — this is the default behavior.
moai updateflowchart TD
A["moai update runs"] --> B["Stage 1: check package version"]
B --> C{"Latest version?"}
C -->|"Yes"| D["Stage 2: compare config versions"]
C -->|"No"| E["Already up to date"]
D --> F{"Config format changed?"}
F -->|"Yes"| G["Migrate config (after backup)"]
F -->|"No"| H["Keep config"]
G --> I["Stage 3: sync templates"]
H --> I
I --> J["Completion report"]Compares the currently installed version with the latest version on GitHub Releases.
# Check the current version
moai --version
# Only check for available updates (no actual update)
moai update --checkThe binary download in moai update cannot bypass checksum verification. If the download or parsing of the release’s checksums.txt fails, the update flow is aborted — it does not attempt the binary download.
The checksums.txt download is retried 3 times with exponential backoff:
| Attempt | Wait time |
|---|---|
| 1st (immediate) | 0s |
| 2nd retry | wait 2s |
| 3rd retry | wait 4s |
| No further retries | fails after ~6s total wait |
If all retries fail, a message like the following is printed:
error: checksum unavailable: persistent retry failure after 3 attemptsThere is no bypass option such as --skip-checksum (an intended CWE-345 policy).
- Check network connectivity:bash
curl -I https://github.com/modu-ai/moai-adk/releases/latest - Check proxy / firewall — whether the GitHub release asset domains (
github.com,objects.githubusercontent.com) are allowed - Possible temporary GitHub CDN outage — retry after a while
- Manual binary install (if permanently blocked):For a manual install, it is recommended to verify the release’sbash
curl -fsSL https://adk.mo.ai.kr/install.sh | bashchecksums.txtseparately.
For the detailed threat model, see Security Notes — CWE-345.
Checks the format and compatibility of the configuration files. When the format has changed, it backs up automatically and then migrates.
Files checked:
- YAML files under
.moai/config/sections/
InfoThe.moai/config/directory is always backed up before a config migration.
Syncs the project templates and default files to the latest version. Files you modified are preserved, and on conflict with the new version they are backed up and merged.
graph TD
A["Template sync"] --> B["SKILL.md templates"]
A --> C["Agent templates"]
A --> D["Rule files"]
A --> E["Config defaults"]
B --> F{"User changes?"}
C --> F
D --> F
E --> F
F -->|"No"| G["Auto update"]
F -->|"Yes"| H["3-way merge after backup"]
G --> I["Sync complete"]
H --> I| Flag | Description |
|---|---|
--check | Only check whether a new version exists (no update) |
-c, --config | Re-run the configuration wizard (no template sync) |
--force | Force update (skip version match, force backup+merge) |
--yes | Auto-approve all confirmations (CI/CD mode) |
--templates-only | Skip the binary update and sync templates only |
--binary | Skip template sync and update the binary only |
--version <tag> | Install a specific release tag (stable / rc / previous version) instead of the latest |
--dry-run | Show planned actions only, with no filesystem changes |
--no-hooks | Skip Git hook installation |
--verbose | Show all warnings (diagnostic mode) |
--shell-env | Configure shell environment variables for Claude Code |
--profile <high|medium|low> | Override the model+effort profile (stored in profile of llm.yaml) |
| Command | Binary update | Template sync |
|---|---|---|
moai update | ||
moai update --binary | ||
moai update --templates-only | ||
moai update --check | (version check only) |
Update only the binary without syncing templates:
moai update --binarymoai update --version <tag> installs a specific GitHub release tag — stable,
release-candidate (rc), or a previous version — through the same
checksum-verified download path as the default update. It covers three use
cases in one flag: pin to a known-stable version, switch to an rc for testing,
or roll back to a previous version after a regression.
# Pin to a stable release
moai update --version v3.0.0
# The leading "v" is optional
moai update --version 3.0.0
# Try a release candidate
moai update --version v3.1.0-rc1
# Roll back to a previous version
moai update --version v2.14.0InfoThe flag stays on theapi.github.comhost onhttpsand verifies the downloaded binary against the release’s published checksum — there is no--skip-checksum/--insecurebypass. A tag with no matching binary asset for your platform, or a checksum mismatch, exits non-zero and leaves the filesystem untouched.
--version is mutually exclusive with a few flags and permitted with others:
| Other flag | --version | Behavior |
|---|---|---|
--check | mutually exclusive (usage error before any network call) | |
--templates-only | mutually exclusive | |
--restore | mutually exclusive | |
--dry-run | mutually exclusive | |
--binary | install only the binary of the requested tag, skip template sync | |
--force | force re-install even when the running version already matches | |
--yes | skip the downgrade confirmation (CI/CD mode) |
When the requested tag is older than the running version, moai update prompts
for confirmation on an interactive terminal. Pass --yes (or run with a
non-TTY stdin, e.g. in CI) to skip the prompt and proceed.
The default moai update (no --version) fetches GitHub’s /releases/latest,
which automatically excludes pre-releases — so rc and pre-release tags are
never surfaced by the default flow. --version <tag> is the only way to
install an rc or a specific previous tag explicitly.
Sync only the templates without updating the binary:
moai update --templates-onlyRe-run the configuration wizard to change the project setup (does not perform a template sync):
moai update -c
# or
moai update --configPreview the planned archive and install actions without making any actual changes:
moai update --dry-runAuto-approve all confirmations:
moai update --yesmoai --versionmoai doctormoai --helpOn a MoAI-ADK update, CLAUDE.md and settings.json are synced to the new version. Keep your personal modifications in separate files.
| File | Location | Update impact |
|---|---|---|
CLAUDE.md | Project root | Changed on update (MoAI-ADK managed) |
settings.json | .claude/ | Changed on update (MoAI-ADK managed) |
CLAUDE.local.md | Project root | No impact (personal settings) |
.claude/settings.local.json | Project | No impact (personal settings) |
InfoSettings priority: Local > Project > User > Enterprisesettings.local.jsonoverrides the project settings.
MoAI-ADK manages files only in the following folders:
.claude/
├── agents/
│ ├── moai/ # MoAI-ADK agents (update target)
│ └── harness/ # User harness agents (excluded from update, preserved)
│
├── hooks/
│ └── moai/ # MoAI-ADK hook scripts (update target)
│
├── skills/
│ ├── moai-* # MoAI-ADK skills (moai- prefix, update target)
│ └── hns-* # User-created skills (excluded from update, preserved)
│
└── rules/
└── moai/ # Rule files (moai managed)| Type | Location | Update impact |
|---|---|---|
| Agents | agents/moai/ | Changed on update |
| Hooks | hooks/moai/ | Changed on update |
| Skills | skills/moai-* | Changed on update |
| Rules | rules/moai/ | Changed on update |
| User agents | agents/harness/ | No update impact (preserved) |
| User skills | skills/hns-* (including legacy harness-*, my-*) | No update impact (preserved) |
WarningImportant: Skills with themoai-prefix are managed by MoAI-ADK and are overwritten on update. For skills you create yourself, use thehns-prefix (the user-owned namespace), and for agents use the.claude/agents/harness/directory.
If a problem occurs after an update, you can roll back to a previous version:
# Roll back to a specific version in-process (recommended)
moai update --version <release-tag>
# Bootstrap path (before moai is installed): use the install script
curl -fsSL https://adk.mo.ai.kr/install.sh | bash -s -- --version <release-tag>
# Restore the config from backup
cp -r .moai/config.bak .moai/configWarningCommit your current work before rolling back.
# Check the network
curl -I https://github.com/modu-ai/moai-adk/releases/latest
# Manual reinstall
curl -fsSL https://adk.mo.ai.kr/install.sh | bash# Restore from backup
cp -r .moai/config.bak .moai/config
# Validate the config
moai doctorTemplate files you modified are backed up automatically and then 3-way merged. If a conflict occurs, check the detailed warnings with --verbose:
moai update --verboseTo force an overwrite, use --force (your existing changes are backed up to .moai/archive/):
moai update --force- Check the changelog — learn the new features
- Core Concepts — master the new agents and features
- Quick Start — apply the new features to your project