Skip to main content
A project does not contain the kit. When gato add, gato list and gato update need kit manifests or files, they fetch the kit at the version the project is on. gato remove and gato generate never need it: everything they use is in .wa/kit.json. gato create is different: it takes a local checkout through --kit only and ignores the rules on this page. See gato create.

Resolution order

The CLI picks the first source that is set:
  1. the --kit <source> flag;
  2. the GATO_KIT_SOURCE environment variable (the older name WA_KIT_SOURCE still works; an empty value counts as unset);
  3. kitRepo from .wa/kit.json, which gato create sets to https://github.com/webamigos/gatojs.git.

Allowed source forms

A value that starts with - (so it cannot turn into a git option), or that contains :// or :: without one of the four URL prefixes (for example ext::sh), is rejected before anything runs:
It means “invalid kit source”.

Remote sources

add and list clone a URL source into a temporary directory, which is removed when the command ends, also after an error:
Each command clones the tag v<kitVersion>, so every add and list with the default kitRepo needs network access to GitHub. The kit repository is public, so no token is needed. A failed clone (no access, no network, a missing tag) prints git’s own error first, then:
It means “could not fetch kit v<version> from <source>; check access or pass --kit <path>”.
Git may print a one-line warning such as warning: refs/tags/v0.1.0 <sha> is not a commit! above the result. It appears for tags with an annotation and is not an error: the clone gets the right commit.

Local checkouts

A local path is the way to work offline or against a kit you are changing. For add and list:
  • The directory must contain kit/kit.json, otherwise Brak kit/kit.json w <path> — to nie jest repozytorium wa-kit (“no kit/kit.json, not a kit repository”).
  • Its version in kit/kit.json must equal the project’s kitVersion, otherwise Kit w <path> ma wersję <x>, projekt używa <y> (“the kit has version x, the project uses y”).
  • Only the version is compared, not the tag or commit. A checkout of main that still carries the same version is accepted.
  • add needs the checkout to be a git repository, because it lists files with git ls-files. The file list comes from the git index, the content from the working tree: an uncommitted edit to a tracked file is copied, a new file is not until you git add it. list reads only manifests, so it works without .git.
For update, a local path is cloned like a URL (without --depth), at both tags. Its content always comes from the tags v<kitVersion> and v<version>, never from the working tree, so the checkout must have both tags.

Why the versions must match

A project holds the code of exactly one kit version. A module from a newer kit would copy files that expect a newer core. To use modules from a newer kit, first move the project there with gato update, then run gato add.

Per command