Watch Mode
Watch mode is a flag on the build command that re-runs your build (or tests) automatically whenever source files change.
# Watch and rebuild on changesui-runner build --watch
# Watch and re-run tests on changesui-runner build --watch --testWhat Gets Watched
Section titled “What Gets Watched”Sui-runner polls the following paths every 500 ms:
| Path | Notes |
|---|---|
sources/ | Watched recursively — any .move file change triggers a rebuild |
tests/ | Watched if the directory exists |
Move.toml | Triggers a rebuild when the manifest changes |
Build Options
Section titled “Build Options”The build command also accepts these flags independently of watch mode:
| Flag | Description |
|---|---|
--test | Run tests instead of building |
--filter <name> | Only run tests whose name contains <name> |
--skip-fetch | Skip fetching git dependencies |
--doc | Generate Move documentation |
--path <dir> | Path to the Move package (defaults to current directory) |
Examples
Section titled “Examples”# Build the current packagesui-runner build
# Run all testssui-runner build --test
# Run only tests matching "transfer"sui-runner build --test --filter transfer
# Watch and re-run a specific test suitesui-runner build --watch --test --filter transfer