tynd doctor
tynd doctortynd doctor --jsontynd doctor --fixtynd doctor --statetynd doctor --repair --dry-runtynd doctor --repair --yesdoctor checks inputs already needed by Tynd. A failed check produces a non-zero exit code.
Project checks
Section titled “Project checks”Checks run in this order. A failing check prints the reason and a fix: line; a hint (!) is reported without failing the run.
| Check | Pass condition |
|---|---|
| Configuration | A supported config loads, merges, and validates |
| Backend entry | Resolved backend is a file |
| Frontend assets | frontendDir is a directory. Before the first build (no .tynd/cache/bundle.dist.js) a missing directory is a hint |
| Native host plan | apis and plugins resolve to a host plan; every listed plugin package is installed |
| Rust toolchain | cargo and rustc are on PATH and rustc is 1.95 or newer (fix: install from https://rustup.rs or run rustup update). Probed from .tynd/build when it exists, so a rust-toolchain.toml override applies |
| Shared host build cache | Informational: shows the path of the shared host build cache (override with TYND_CACHE_DIR, remove with tynd clean --cache). Hints when no cache directory can be resolved or, on Windows, when its target directories would exceed 80 characters; set TYND_CACHE_DIR to a short, writable directory |
| Tynd host sources | @tynd/host-src is installed (fix: bun add -d @tynd/host-src@<range>) |
| Native host | A compiled host binary exists at .tynd/build/bin/release/<app> or .tynd/build/bin/debug/<app>. Before the first tynd dev/tynd build this is a hint, not a failure |
| Native bundler | tynd-bundler resolves |
| Bun executable and version pin | Bun resolves and matches .bun-version when a pin exists |
doctor runs rustc --version --verbose but never Cargo. It does not query the Windows registry, probe WebView availability, access the network, or inspect every packaging/signing tool. A command reports its own missing prerequisite when that path is used.
Repair modes
Section titled “Repair modes”--fixruns thetynd initscaffold on the project root without--forcebefore the checks: it createstynd.config.tsand the app scaffold when no config exists, createspackage.jsonwhen missing, and normalizes the Tynd scripts and TypeScript editor types. Existing scaffold files are kept. With--dry-run, it prints the planned changes (would ...) and writes nothing; script and editor-type normalization is always listed, even when nothing needs to change.--stateadds a report for.tynd/cache,.tynd/build, andrelease, including existence and byte size.--repairremoves rebuildable.tynd/cacheand.tynd/build; it does not removerelease.--repairrequires--yesor--dry-run.
State mode does not parse application databases or rename corrupt files. It only validates generated paths and their readable size.
| Flag | Effect |
|---|---|
--cwd <dir> |
Project directory |
--json |
Emit the complete report as JSON |
--fix |
Apply project scaffold/editor repair |
--state |
Add generated-state inspection |
--repair |
Remove rebuildable cache/build state |
--dry-run |
Preview --fix or --repair; invalid without one of them |
-y, --yes |
Authorize generated-state repair |
Use tynd validate --ci for build/release gating.