Check the app
Check an app and read what Tifa knows about it
The commands that look at an app without building the program: the one check to run before you finish a change, the code generation step, the route list and the versions in use.
tifa check
tifa check [--dir app-root]
Runs every check of the app with one command and stops at the first step that fails:
analyze: the static analysis oftifa build. Each convention violation is printed asfile:line: reason. It also reads the code for idioms of other frameworks, such asnext/link,'use client'or an exportedloader, and says what to write in Tifa (see Coming from another framework). It also warns of a string thatOnRequestcompares withc.Pattern()(==,!=,switchandstrings.HasPrefix) when no route of the app can have it, such as a guard left behind by a renamed folder. The warning names the file and line, the string and the closest routes, and does not fail the check. The idioms in TypeScript are read in thegeneratestep, which has Node.generate: writes.tifa/, astifa builddoes, so the types the TypeScript step needs are current. It starts Node only for an app with pages. While atifa devortifa buildruns in the app, it holds the lock of.tifa/and keeps the files up to date, and the files of a build are not the onestifa devneeds. So this step writes nothing then and prints a line that says so, and the checks go on with the files it generated in memory. It never waits for the lock.go vet ./...go test ./...typescript (tsc --noEmit): thetscof thetypescriptpackage the app installs, run withnodein the app root, with thetsconfig.jsonof the app. Tifa finds the package the way Node does, innode_modulesof the app or of a folder above it and behind the links of pnpm, so it works with npm and pnpm and installs nothing. An app that does not installtypescriptfails here and is told to run the install of its package manager. An app without pages skips this step and printstypescript: skipped, the app has no pages (no Node needed).
Each step prints a line that starts with ==> , then whatever its tool prints. Go runs with CGO_ENABLED=0, as in tifa build. A failure ends the command with a non-zero status and an error that names the step. The steps after it do not run.
==> analyze
==> generate
==> go vet ./...
vetbad.go:5:29: fmt.Printf format %d has arg "text" of wrong type string
tifa: check failed at go vet ./...: exit status 1
tifa new writes go tool tifa check into the AGENTS.md of a new app as the one command to run before finishing a change.
tifa gen
tifa gen [--dir app-root]
Runs the analysis and writes .tifa/, the first two steps of tifa check, and builds nothing. tifa dev and tifa build write it too, so you need it only where none of them has run yet, such as a fresh clone: the tsconfig of the app extends .tifa/tsconfig.json, and the types of the routes are in .tifa/. A convention violation fails it as it fails the build. It starts Node only for an app with pages. While a tifa dev or tifa build runs in the app, tifa gen leaves .tifa/ alone: it prints one line that says the running command keeps it up to date and succeeds, so it never breaks an install.
The package.json that tifa new writes runs it on install:
"scripts": {
"prepare": "go tool tifa gen"
}
pnpm and npm run the prepare script of the project after pnpm install and npm install, so installing the npm packages of a clone also writes .tifa/. Run go mod download (or go mod tidy) before, as go tool tifa needs the modules. An install with --ignore-scripts skips prepare, so run go tool tifa gen after it.
The typecheck script of the same file is go tool tifa gen && tsc --noEmit. The types in .tifa/ come from route.go, so they are old after a change to a route's return type or after a page or Layout is added or removed. Running gen first makes tsc read the new ones, and when the Go code does not compile it stops there and prints the Go file and line. tifa check already generates before it runs tsc, so it does not need the script. An app made before this can change its typecheck script to the same line.
Each type that a route.gen.ts or session.gen.ts declares from a Go struct has a comment in front of it that names where it comes from: the import path of the Go package, the name and the file and line, for example /** Go: example.com/app/projects.Project (projects/project.go:12) */. The editor shows it when you hover over the type, and the file is the one to change. A type of another module has the package and the name only, since a path in the module cache is not the same on every machine. The comment is in the generated file only: types leave no trace in the bundles, and the build ID comes from the files of the bundle, so moving a struct to another line changes .tifa/ and not the build.
Tifa routes
tifa routes [--dir app-root] [--json]
Runs the same static analysis as tifa build, without generating or building anything, and prints three tables. The first has the routes: folder, URL, Layouts, methods (page for a page), and the SSR and Memo switches. The second has the Layouts. The third, BUILT IN, has the addresses the program answers that are not a folder of app/, and when each one is there. Convention errors are printed the same way as by tifa build. --json prints the route manifest instead, with the Go types of each Load result and each handler's input and result. It has no built-in addresses.
BUILT IN WHEN
/sitemap.xml site.url is set
/sitemap-<n>.xml site.url is set and the sitemap has more than 50000 URLs or 50 MiB
/robots.txt site.url is set, but public/robots.txt answers instead
/llms.txt site.url is set
/llms-full.txt site.url is set
/<path>.md site.url is set and tifa.SetSitemap lists a page with Content
/__tifa/session the app calls tifa.SetSession
/assets/<file> the app has a page
/<file> public/ has 4 files (2 dot files left out)
/.well-known/acme-challenge/<token> server.tls_domains is set, on server.http_addr only
site.urlcan be set when the program starts, with an option or an environment variable, andtifa routesdoes not see that. So the site rows are always there, and(not in tifa.yaml)followssite.url is setwhentifa.yamlhas nosite.url.- A file of
public/or a route of the app at the same path answers instead of Tifa, and the row says which.(no content collections)ends the.mdrow when the app has none. - The
/<file>row counts the files ofpublic/that are copied and the dot files or folders left out (seebuild.public_dotfiles). A folder with only dot files gets the row too, aspublic/ has no files (1 dot file left out). /__tifa/session,/assets/<file>and/<file>are listed only when they hold: the app callstifa.SetSession, has apage.tsx, or has files inpublic/(the folder set bybuild.public)./<file>stands for each file of that folder at its own path./.well-known/acme-challenge/<token>is answered onserver.http_addrwhile the program gets its own certificates (see HTTPS). It is read from the running program's settings, sotifa routesalways lists it.
Version and info
tifa version
tifa --version
tifa info [--dir app-root] [--json]
tifa version prints tifa v0.6.0, and tifa --version prints the same line. Run as go tool tifa in an app, it is the version the go.mod of the app requires. A tifa that you installed globally hands the command to the one the app pins (see Installing the command globally), so it prints that version too. A build made in a checkout of Tifa, or with a replace for the module, prints tifa devel.
tifa info prints what a bug report or a coding agent needs to know about the machine:
Tifa v0.6.0
Go go1.26.1
Node v24.13.0
pnpm 10.33.0
System darwin/arm64
tifa.yaml found
The versions of Go, Node and pnpm are those of the programs on the PATH, which are the ones tifa build and tifa dev run. A program that is not there, or that does not answer within 5 seconds, is not found and does not fail the command. An app without pages needs no Node, so not found there is fine. tifa.yaml says whether the folder --dir names, the current one by default, has that file. With --json the command prints one object with the keys tifa, go, node, pnpm, os, arch and tifaYaml, which is true or false. A program that is missing is the string "not found" there too.