Skip to content
Foldcase

Reference

Exit codes:

Command01
testevery Showcase passeda failed Showcase, an unloadable file, or no *.showcase.ts found
docsevery file loaded — even if nothing was writtena 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
initwired — created, updated, or already therea target that does not exist, or an .mcp.json that will not parse
anyunknown or missing verb, an unknown flag, or extra positionals — refused with the usage banner

--coverage never changes an exit code.

Environment:

VariableRead byDefaultMeaning
FOLDCASE_SHOWCASE_DIRmcp only.the served catalog root
FOLDCASE_DOCS_DIRdocs onlyfoldcase-docsthe 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:

yaml
- 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 --check

Add --json and redirect stdout when a later step consumes the report.

Last updated Aug 4, 2026