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:- the
--kit <source>flag; - the
GATO_KIT_SOURCEenvironment variable (the older nameWA_KIT_SOURCEstill works; an empty value counts as unset); kitRepofrom.wa/kit.json, whichgato createsets tohttps://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:
Remote sources
add and list clone a URL source into a temporary directory, which is removed when the command ends, also after an error:
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:
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. Foradd and list:
- The directory must contain
kit/kit.json, otherwiseBrak kit/kit.json w <path> — to nie jest repozytorium wa-kit(“nokit/kit.json, not a kit repository”). - Its
versioninkit/kit.jsonmust equal the project’skitVersion, otherwiseKit 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
mainthat still carries the same version is accepted. addneeds the checkout to be a git repository, because it lists files withgit 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 yougit addit.listreads only manifests, so it works without.git.
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 withgato update, then run gato add.