> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gatojs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Exit codes and messages

> Every exit code and message of the gato CLI, with what it means and how to fix it.

## Exit codes

| Code | When |
| - | - |
| `0` | The command succeeded, including runs that printed `Uwaga: …` warnings. `gato list` also when the kit could not be fetched. `gato update` without conflicts or files that need a decision, `gato update --dry-run` (even with conflicts in the plan), and `gato update` to the version the project already has. `help` and `version`. |
| `1` | Every error below, every raw error (Node, Zod, JSON, a failed child process), a missing or unknown command. `gato update` that wrote changes but left a conflict or a file that needs a decision. |

`npm run wa -- …` exits with the same code as the CLI. Error messages go to stderr as one line, or several when they list files. Commands the CLI runs (`git`, `npm`, `docker compose`, `npx prisma`, and in `update` the target version's CLI) print straight to the terminal, above the CLI's own message.

> [!NOTE]
>
> Most messages are currently in Polish. The tables quote them verbatim, with `<placeholders>` for variable parts, and give the meaning in English. Messages of [`create-gato-app`](https://docs.gatojs.com/cli/create-gato-app#errors) are in English and listed on its page.

## Any command

| Message | Meaning | Fix |
| - | - | - |
| `Usage: gato <command> [options]` and the command list, on stderr | No command given. | Pass a command; `gato help` prints the same text on stdout with code `0`. |
| `Unknown command: <name>` and the usage | Unknown command, or `kit` without `sync`. | Check the spelling. |
| `Nieoczekiwany argument: <value>` | Unexpected extra argument. | Remove it; each command takes at most one positional argument. |
| `Nieznana opcja: <option>` | Unknown option. | See the command's page. |
| `Opcja <option> wymaga wartości` | The option needs a value: none was given, the next argument is another option, or the value is empty (`--kit=`). | Pass a value. |
| `Opcja <option> nie przyjmuje wartości` | A flag got a value, for example `--force=1`. | Drop the value. |

## Reading `.wa/kit.json`

`add`, `remove`, `list`, `update` and `generate` read it first.

| Message | Meaning | Fix |
| - | - | - |
| `Brak .wa/kit.json w <dir> — to nie jest projekt wa-kit` | No `.wa/kit.json`: not a GatoJS project directory. | Run the command in the project root. |
| A JSON parser error, or a list of Zod issues | The file is not valid JSON or does not match the [schema](https://docs.gatojs.com/cli/kit-json.md). | Fix the file, or restore it from git. |
| `projectModules.<key>: name "<name>" nie zgadza się z kluczem` | A project module's `name` differs from its key. | Make them equal. |
| `Moduł <x> jest jednocześnie modułem kitu i modułem projektu` | The same name is a kit module and a project module. | Rename the project module. |
| `Moduł projektu <x> wymaga niezainstalowanego modułu: <y>` | A project module requires a module that is not installed. | `gato add <y>`, or fix `requires`. |
| `Moduł projektu <x>: files musi obejmować src/features/<x>/**` | A project module's `files` lacks its feature directory. | Add the pattern. |

## `create`

| Message | Meaning | Fix |
| - | - | - |
| `Podaj katalog projektu` | No target directory. | Pass `<dir>`. |
| `gato create needs --kit <path to a GatoJS checkout>` | `gato create` without `--kit`. | Pass a kit checkout, or use [`create-gato-app`](https://docs.gatojs.com/cli/create-gato-app). |
| `--setup wymaga instalacji zależności (bez --no-install)` | `--setup` with `--no-install`. | Drop one of them. |
| `--locales: dozwolone pl,en; pl jest wymagany` | Invalid locales: only `pl` and `en`, `pl` required, no duplicates. | Fix `--locales`. |
| `--cli-source: <path> does not exist` | The tarball for `--cli-source` is missing. | Fix the path. |
| `Nazwa projektu "<slug>": dozwolone małe litery, cyfry i myślniki, pierwsza litera, 2–50 znaków` | Invalid project name. | Lowercase letters, digits and hyphens, starting with a letter, 2 to 50 characters. |
| `Katalog <path> istnieje i nie jest pusty` | The target directory exists and is not empty. | Pick another directory or empty it. |
| `--kit: <path> does not exist` | The kit path does not exist. | Fix `--kit`. |
| `<path> is not a GatoJS checkout (no kit/kit.json)` | The kit path has no `kit/kit.json`. Also for `npm run wa -- create` inside a project. | Point `--kit` at a kit checkout. |
| `Brak terminala: użyj --yes` | A question was needed but there is no terminal. | Pass `--yes`. |
| `Przerwano` | Ctrl+C on a checkbox list. | Run again. |
| `Nieznany moduł: <name>. Dostępne: <list>` | Unknown module in `--modules`. | Use a name from the list. |
| `kit/modules/<file>: name "<name>" nie zgadza się z nazwą pliku` | A kit manifest's `name` differs from its file name. | Fix the kit checkout. |
| `<path> nie jest repozytorium git` | The kit checkout has no `.git`. | Use a git checkout. |
| `spawn git ENOENT` | `git` is not on `PATH` (needed even with `--no-git`). | Install git. |
| `Projekt utworzony w <path>, ale npm install się nie powiódł. Uruchom: cd <path> && npm install` | Project created, `npm install` failed. No commit, no setup. | Fix npm, run the printed command, then commit. |
| `<command with arguments> zakończone kodem <n>` | `git init` failed with that exit code. | Check git. |
| `Project created at <path>, but the setup failed (<reason>). Continue with:` and the remaining commands | A setup step (`docker compose`, migration, `admin:create`) failed. The project and the first commit exist. | Fix the cause (often a port in use) and run the listed commands. |

## `add`

| Message | Meaning | Fix |
| - | - | - |
| `Podaj nazwę modułu` | No module name. | Pass `<module>`. |
| `Moduł <x> jest już zainstalowany` | Already installed (also `core`). | Nothing to do. |
| `Moduł <x> jest modułem projektu; zmień jego nazwę albo usuń wpis z projectModules` | The name belongs to a project module. | Rename the project module or remove its entry. |
| `Nieznany moduł: <name>. Dostępne: <list>` | No such module at the project's kit version. | Use a listed name; newer modules need [`gato update`](https://docs.gatojs.com/cli/update) first. |
| `Pliki już istnieją, przerwano bez zmian:` and a list of paths | Something already exists at a path the module would copy to. Nothing changed. | Move or delete those paths. |
| A raw Node error such as `ENOTDIR: not a directory, mkdir '<path>'` | Writing failed while copying; the add was rolled back. | Fix the cause and run again. |
| `Moduł dodany, ale npm install się nie powiódł. Uruchom: npm install` | Module added, install failed. | `npm install`. |

## `remove`

| Message | Meaning | Fix |
| - | - | - |
| `Podaj nazwę modułu` | No module name. | Pass `<module>`. |
| `Nie można usunąć rdzenia` | `core` cannot be removed. | — |
| `Moduł <x> należy do projektu; wa remove usuwa tylko moduły kitu. Usuń jego pliki i wpis w projectModules ręcznie` | It is a project module. | Delete its files and `projectModules` entry by hand. |
| `Moduł <x> nie jest zainstalowany` | Not installed. | Check `gato list`. |
| `Moduł <x> jest wymagany przez: <list>` | Another module requires it. | Remove those modules first, or change their `requires`. |
| `Ścieżka poza projektem: <path>` | A recorded file resolves outside the project. | Inspect `.wa/kit.json` and the symlinks. |
| `Zmienione pliki modułu <x> (użyj --force):` and a list of files | You changed some module files. Nothing was deleted. | Save what you need, then pass `--force`. |
| A raw `EISDIR` or `ENOTDIR` error | A recorded path is a directory or lies under a file. | Fix `.wa/kit.json` or the files. |
| A JSON parser error or `ENOENT` for `package.json` | `package.json` is invalid or missing. | Fix it. |
| `Moduł usunięty, ale npm install się nie powiódł. Uruchom: npm install` | Module removed, install failed. | `npm install`. |

## `add`, `list` and `update`: kit source

| Message | Meaning | Fix |
| - | - | - |
| `Nieprawidłowe źródło wa-kit: <source>` | Rejected kit source: starts with `-`, or an unsupported transport. | Use a path or an `https://`, `ssh://`, `file://` or `git@` URL ([Kit source](https://docs.gatojs.com/cli/kit-source.md)). |
| `Nie udało się pobrać wa-kit v<version> z <source>. Sprawdź dostęp (gh auth status) albo podaj --kit <ścieżka>` | Cloning the tag failed (no network, no access, missing tag). Git's own error is printed above. | Check access, or pass a local checkout with `--kit`. |
| `Brak kit/kit.json w <path> — to nie jest repozytorium wa-kit` | The local path is not a kit checkout. | Fix the path. |
| `Kit w <path> ma wersję <x>, projekt używa <y>` | The local checkout is at another kit version. | Check out the project's version. |

In `list` these appear in a `Dostępne: nie udało się pobrać kitu (<reason>)` line and the exit code stays `0`.

## `update`

| Message | Meaning | Fix |
| - | - | - |
| `Podaj wersję kitu` | No version. | Pass `<version>`. |
| `Nieprawidłowa wersja: <value>; podaj na przykład 0.2.0` | Bad version format. | Use `x.y.z` without `v`. |
| `Projekt ma wa-kit <x>, nowszą niż <version>; wa update nie obniża wersji` | Target is lower than the project's version. | Downgrades are not supported. |
| `<dir> nie jest repozytorium git; wa update wymaga gita, żeby dało się cofnąć zmiany` | The project is not a git repository. | `git init` and commit first. |
| `Nie znaleziono polecenia git; zainstaluj git, żeby uruchomić wa update` | `git` is not installed. | Install git. |
| `Niezacommitowane zmiany w projekcie; zrób commit albo stash przed wa update` | The tree is not clean (untracked files count). | Commit or stash; or use `--dry-run`. |
| `Bundel pochodzi z wa-kit <x>, a aktualizacja prowadzi do <version>` | You ran a kit clone's bundle whose version is not the target. | Clone the target tag. |
| `Kit w <clone> ma wersję <x>, oczekiwano <version>` | The tag's `kit/kit.json` has another version. | Report it; the tag is inconsistent. |
| `Kit docelowy ma wersję <x>, oczekiwano <version>` | The handed-over target kit has another version. | Same as above. |
| `Moduł <x> nie istnieje w wa-kit <version>` | An installed module is missing at the base or target version. | Handle that module by hand. |
| `Moduł <x> w wa-kit <version> wymaga niezainstalowanych modułów: <list>` | At the target version a module requires one you do not have. | Add it first if it exists at your version; otherwise see [Known limitations](https://docs.gatojs.com/known-limitations.md). |
| `Ścieżka poza projektem: <path>` | A planned path resolves outside the project. | Inspect symlinks. |
| `Dowiązanie symboliczne na ścieżce zapisu: <path>` | A path the update would write has a symlink in it. Nothing changed. | Replace the symlink with a real file or directory, commit, run again. |
| `git merge-file: <git message>` | `git merge-file` failed for a reason other than a conflict. | Check git. |
| The original error, then `Sprawdź git status; całość cofa: git restore . && git clean -fd` | Writing failed and was rolled back. | Check `git status`; the printed command undoes everything. |
| `Zaktualizowano do wa-kit <version>, ale wa generate się nie powiódł. Uruchom: npm run wa -- generate` | Files are updated, generate failed. | Fix the cause, run `generate`, then `npm install`. |
| `Zaktualizowano do wa-kit <version>, ale npm install się nie powiódł. Uruchom: npm install` | Files are updated, install failed. | `npm install`. |
| `Nie udało się uruchomić bundla wa-kit <version>: <message>` | The target version's CLI could not be started, for example `spawn node ENOENT`. | Check Node. |
| No message of its own | The target version's CLI failed and already printed its error. | Read the error above. |

## `generate`

See [`gato generate`](https://docs.gatojs.com/cli/generate#errors).

## Lines that do not fail the command

These go to stdout.

| Command | Line | Meaning |
| - | - | - |
| `create` | `Uwaga: nie utworzono commita (<reason>). Skonfiguruj git i zrób commit ręcznie.` | No first commit; configure git (`user.name`, `user.email`) and commit by hand. |
| `create` | `cd <path>`, `docker compose up -d`, …, `npm run dev` | Next steps. |
| `add` | `Uwaga: <package> (<section>) ma w projekcie <version>, moduł <x> wymaga <version>; zostaje wersja projektu` | Dependency version conflict; the project's version stays. |
| `add`, `update` | `Nie udało się posprzątać: <path> (<code>)` | One cleanup step failed during a rollback; the original error follows with code `1`. |
| `add` | `npx prisma migrate dev --name add-<module>` | Create this migration. |
| `remove` | `npx prisma migrate dev --name remove-<module>` | Create this migration. |
| `list` | `Dostępne: nie udało się pobrać kitu (<reason>)` | The kit could not be fetched; exit code `0`. |
| `update` | `Projekt ma już wa-kit <version>` | Already at that version; exit code `0`. |
| `update` | `Aktualizacja wa-kit <x> → <version>` and file lines | The applied plan. |
| `update` | `Plan aktualizacji wa-kit <x> → <version> (bez zmian w projekcie)` and file lines | The dry-run plan; exit code `0`. |
| `update` | `  bez zmian w plikach` | The plan changes no files. |
| `update` | `Uwaga: <n> plików różni się od v<x> z tagu; potraktowano je jak zmienione w projekcie` (wording varies with the number) | Some files differ from the tagged base even though their recorded hash matches; they were treated as changed in the project. |
| `update` | `Rozwiąż konflikty, potem: npm run wa -- generate && npm install` and `Cofnięcie całej aktualizacji: git restore . && git clean -fd` | Conflicts; exit code `1`. |
| `update` | `npx prisma migrate dev --name kit-<version>` | The kit changed the Prisma schema; create this migration. |
| `update` | `Nowe zmienne w .env.example: <list>; uzupełnij .env` | New module variables; add them to `.env`. |
| `generate` | `Bez zmian` / `zmieniono <file>` | No changes / file written. |
| `kit sync` | `Bez zmian` / `Zaktualizowano .wa/kit.json` | No changes / file rewritten. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.