Reference
Exit codes:
| Command | 0 | 1 |
|---|---|---|
test | every Showcase passed | a failed Showcase, an unloadable file, or no *.showcase.ts found |
docs | every file loaded — even if nothing was written | a load failure, a Schema that will not introspect, a dispatched tag the union does not carry, --check drift, or no *.showcase.ts found |
mcp | — (serves until the host closes stdio) | the server would not launch |
init | wired — created, updated, or already there | a target that does not exist, or an .mcp.json that will not parse |
| any | unknown or missing verb, an unknown flag, or extra positionals — refused with the usage banner |
--coverage never changes an exit code.
Environment:
| Variable | Read by | Default | Meaning |
|---|---|---|---|
FOLDCASE_SHOWCASE_DIR | mcp only | . | the served catalog root |
FOLDCASE_DOCS_DIR | docs only | foldcase-docs | the out-dir when no second positional names one |
Discovery is a recursive walk for files ending in .showcase.ts, sorted so the report is
deterministic run to run. node_modules is skipped wherever it appears, so a dependency
cannot join your catalog.
CI is the exit code:
- uses: oven-sh/setup-bun@v2
- run: bun install --frozen-lockfile
- run: bunx foldcase-bun test src
- run: bunx foldcase-bun docs src docs/schemas --checkAdd --json and redirect stdout when a later step consumes the report.
Last updated Aug 4, 2026