Skip to content

Upgrading from loko

GitHub →

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.6In ayida 2.x
loko binary and CLIayida
*.loko.hcl source files*.ayida.hcl
loko_version in the project blockayida_version
Constraint such as "~> 1.6""~> 2.0"
lokoVersion in export outputayidaVersion
.dist.loko/ build state (.release.loko/ for --out release).dist.ayida/ (.release.ayida/)
loko- site class names, loko-theme storage keyayida- names, ayida-theme
data-loko-address on SVG cardsdata-ayida-address
window.LOKO_SEARCH search indexwindow.AYIDA_SEARCH
/_loko/events live-reload endpoint of serve/_ayida/events
MCP serverInfo.name lokoayida
Go module github.com/madstone-tech/lokogithub.com/madstone-tech/ayida/v2
Homebrew cask madstone-tech/tap/lokomadstone-tech/tap/ayida
Image ghcr.io/madstone-tech/lokoghcr.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 --version

2. 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"
done

If 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 fmt

4. Validate

ayida validate
ayida fmt --check

validate 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 build

6. 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"
done

Check 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/architecture

CI. 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 validate and ayida fmt --check pass.
  • grep -rn -i 'loko' . finds nothing in the project, apart from history such as a changelog.
  • You can uninstall loko.