···686686### watch<NonProjectOption />
687687688688- **Type:** `boolean`
689689-- **Default:** `!process.env.CI`
689689+- **Default:** `!process.env.CI && process.stdin.isTTY`
690690- **CLI:** `-w`, `--watch`, `--watch=false`
691691692692Enable watch mode
693693+694694+In interactive environments, this is the default, unless `--run` is specified explicitly.
695695+696696+In CI, or when run from a non-interactive shell, "watch" mode is not the default, but can be enabled explicitly with this flag.
693697694698### root
695699
+2-2
docs/guide/cli.md
···991010### `vitest`
11111212-Start Vitest in the current directory. Will enter the watch mode in development environment and run mode in CI automatically.
1212+Start Vitest in the current directory. Will enter the watch mode in development environment and run mode in CI (or non-interactive terminal) automatically.
13131414You can pass an additional argument as the filter of the test files to run. For example:
1515···50505151### `vitest watch`
52525353-Run all test suites but watch for changes and rerun tests when they change. Same as calling `vitest` without an argument. Will fallback to `vitest run` in CI.
5353+Run all test suites but watch for changes and rerun tests when they change. Same as calling `vitest` without an argument. Will fallback to `vitest run` in CI or when stdin is not a TTY (non-interactive environment).
54545555### `vitest dev`
5656