tynd dev
tynd devtynd dev --inspecttynd dev --no-debugtynd dev keeps application development TypeScript-first while the native Rust CLI supervises every process.
| Flag | Effect |
|---|---|
--cwd <dir> |
Run against another project directory |
--inspect |
Enable the Bun inspector |
--inspect-brk |
Enable the Bun inspector and wait before user code runs |
--no-debug |
Do not expose the local authenticated debug socket used by tynd-mcp |
--no-fix |
Disable automatic scaffold/editor setup repair |
-y, --yes |
Apply supported development setup fixes before launch |
The debug endpoint is private to your account. On Linux and macOS tynd dev creates it in a fresh tynd-dev-* directory with mode 0700 (under $XDG_RUNTIME_DIR when set, else the temp directory) and removes the directory when the host exits. On Windows it is a named pipe \\.\pipe\tynd-<app>-<pid>-<random> with an owner-only access list. An already set TYND_DEBUG_SOCKET is used as given. If the private directory cannot be created, tynd dev warns debug socket disabled and starts without it.
Global flags include --verbose, --quiet, --env, --log-format, and --log-file.
Launch sequence
Section titled “Launch sequence”- Loads and validates config through the native Rust config loader.
- Detects Vite, Create React App, Angular, Parcel, Rsbuild, or Webpack.
- Starts the detected/configured frontend dev command and waits up to 30 seconds for
devUrlto become reachable. - Warns about every source file that imports an undeclared
@tynd/plugin-<api>package (runtynd add <api>). - Resolves the project’s pinned Bun executable and generated backend bootstrap.
- Compiles the app’s Rust host (core plus the declared plugins’ APIs) with the Cargo
devprofile under.tynd/build. The first build takes a few minutes and prints a notice; a later run whose inputs did not change skips Cargo. - Starts the host and Bun backend. Frontend HMR remains owned by the frontend framework.
Before spawning the frontend dev command, tynd dev fails if something already answers on devUrl, because the window would otherwise load that foreign page. If you start the dev server yourself, set devCommandArgs: [] in tynd.config.ts: Tynd then neither spawns a dev command nor runs this check, and only waits for devUrl to become reachable.
Relevant backend, plugin, config, and dotenv inputs are watched without following links. Backend-compatible changes send a reload request to the running host, so the native window stays open.
A config change can alter compiled APIs, plugin crates, environment, or host arguments. In that case tynd dev stops with an explicit message to restart, allowing the host plan to be rebuilt safely.
Frontend overrides
Section titled “Frontend overrides”Use either a command string or an argument array:
export default defineConfig({ backend: "backend/main.ts", frontendDir: "dist", devUrl: "http://localhost:4173", devCommandArgs: ["bunx", "vite", "--port", "4173"],});devCommandArgs avoids shell parsing. devCommand remains available for simple quoted command strings.
Stopping
Section titled “Stopping”Ctrl+C terminates the host and frontend child process.
Common failures
Section titled “Common failures”- Frontend process exits before readiness: run the project’s install step and verify
devCommand/devUrl. - Unsupported SSR framework: use its static SPA variant.
- Config changed during development: restart
tynd devso native capabilities and host arguments are rebuilt. cargo/rustcmissing or older than 1.95: the command stops with a message pointing to https://rustup.rs. Tynd does not download a toolchain on demand.- Tynd host sources missing: run
bun add -d @tynd/host-src.
Related
Section titled “Related”tynd start— cache-only production-shaped launch.tynd build— explicit build and native pack step.- Development Workflow.