Pich logoPichdocs
Docs menu: Predicates

Reference

Predicates

The fixed vocabulary of 8 conditions Pich can check in files.

SERV may only use these 8 predicates. Each is observed as present, absent, or unknown.

PredicateHow Pich observes it
app_routerAn app/ or src/app/ directory exists
pages_routerA pages/ or src/pages/ directory exists
middleware_presentmiddleware.(ts|js) or proxy.(ts|js) at the root or in src/
middleware_enforces_authThat file checks a session, token, or cookie and then redirects or returns 401/403
deployment_on_vercelRead from pich.deploy.json hosting; unknown if the file is missing
turbopack_buildFrom the build script (--turbopack / --webpack) or the installed version’s default; unknown for custom build scripts
i18n_configurednext.config declares an i18n block
i18n_single_localei18n.locales is a literal array with exactly one entry; unknown if not a literal

Declaring hosting

Hosting cannot be seen from code, so Pich reads an optional file at the app root:

pich.deploy.json
{ "hosting": "self-hosted", "platform": "docker on a VPS" }

Use "hosting": "vercel" for Vercel. Without this file, hosting is unknown.

Edit this page on GitHub