Upgrading from loko
loko is now ayida. Version 2.0.0 was the first ayida release. The language, the diagnostics and
the rendered output did not change, but every name that contained loko now contains ayida.
Projects, scripts, themes and assistant configurations refer to these names, so you must change
them by hand.
ayida 2.0 also added ayida diff, ayida changelog and the MCP diff tool. They need no
migration.
What changes
| In loko 1.6 | In ayida 2.x |
|---|---|
loko binary and CLI | ayida |
*.loko.hcl source files | *.ayida.hcl |
loko_version in the project block | ayida_version |
Constraint such as "~> 1.6" | "~> 2.0" |
lokoVersion in export output | ayidaVersion |
.dist.loko/ build state (.release.loko/ for --out release) | .dist.ayida/ (.release.ayida/) |
loko- site class names, loko-theme storage key | ayida- names, ayida-theme |
data-loko-address on SVG cards | data-ayida-address |
window.LOKO_SEARCH search index | window.AYIDA_SEARCH |
/_loko/events live-reload endpoint of serve | /_ayida/events |
MCP serverInfo.name loko | ayida |
Go module github.com/madstone-tech/loko | github.com/madstone-tech/ayida/v2 |
Homebrew cask madstone-tech/tap/loko | madstone-tech/tap/ayida |
Image ghcr.io/madstone-tech/loko | ghcr.io/madstone-tech/ayida |
--verbose / -v flag (it had no effect) | removed |
Before you start, commit or stash your work so that each change shows in git diff. Keep loko
installed until the project validates with ayida; the two binaries do not conflict.
1. Install ayida
Use the same channel that you used for loko:
brew uninstall --cask loko && brew install --cask madstone-tech/tap/ayida # Homebrew
go install github.com/madstone-tech/ayida/v2@latest # Go
docker pull ghcr.io/madstone-tech/ayida:latest # Docker
ayida --version2. Rename the source files
ayida reads only *.ayida.hcl files. A project that still has *.loko.hcl files fails with
No *.ayida.hcl files were found. Rename every source file:
for f in $(find . -name '*.loko.hcl' -not -path './dist/*'); do
git mv "$f" "${f%.loko.hcl}.ayida.hcl"
doneIf the project is not in git, use mv instead of git mv.
3. Change the project block
After step 2, ayida stops at the old attribute:
Error: Unsupported attribute
on main.ayida.hcl:3:3:
3 | loko_version = "~> 1.6"
^^^^^^^^^^^^
"loko_version" is not an attribute of a project block. Supported attributes
are: ayida_version, description, footer, ignore_warnings, layout, outside.Change loko_version to ayida_version and set the constraint to "~> 2.0". ayida 2.x does not
satisfy "~> 1.6". The attribute name has a different length, so format the source again:
ayida fmt4. Validate
ayida validate
ayida fmt --checkvalidate reports the same diagnostics that loko 1.6 reported. The diagnostic codes did not change.
5. Remove the old build output
ayida keeps its build state in .dist.ayida/. It does not read .dist.loko/, and it removes only
files that it wrote itself, so files from a loko build stay in the output directory until you
remove them:
rm -rf .dist.loko dist # or .release.loko and release for --out release
ayida build6. Update a site theme
Do this step only if the project has a templates/ directory. This command renames the class
names, the storage key, data-loko-address, the search index and the live-reload endpoint in one
pass:
grep -rl -i 'loko' templates/ | while read -r f; do
perl -pi -e 's/\bloko-/ayida-/g; s/\bLOKO_SEARCH\b/AYIDA_SEARCH/g; s{/_loko/}{/_ayida/}g' "$f"
doneCheck the result with git diff templates/, then build the site and open it.
7. Update the tools around the project
Assistants (MCP). Change the command in each MCP client configuration from loko to ayida.
For Claude Code:
claude mcp remove loko
claude mcp add ayida -- ayida mcp --project /path/to/your/architectureCI. Change loko to ayida in each pipeline command, the image to
ghcr.io/madstone-tech/ayida, and the install path to github.com/madstone-tech/ayida/v2. Remove
-v and --verbose, because ayida stops with “unknown flag” when it gets them.
Scripts that read export output. Read ayidaVersion instead of lokoVersion. The export’s
schemaVersion did not change.
Shell completion. Generate it again under the new name, and delete the old loko file:
ayida completion bash > /etc/bash_completion.d/ayida
ayida completion zsh > "${fpath[1]}/_ayida"When you are done
ayida validateandayida fmt --checkpass.grep -rn -i 'loko' .finds nothing in the project, apart from history such as a changelog.- You can uninstall loko.