This guide will help you set up the WebdriverIO Desktop & Mobile monorepo for development.
Before you begin, ensure you have the following installed:
-
Node.js: Version 24 LTS (contributor toolchain — end-user Node range is defined per-package via
engines)node --version # Should be v24.x -
pnpm: Version 12 (installation);
package.jsonpins the exact version -
Git: For version control
git --version
git clone https://github.com/webdriverio/desktop-mobile.git
cd desktop-mobilepnpm installThis will:
- Install all root-level dependencies
- Install dependencies for all packages
- Link workspace packages together
- Set up Git hooks with Husky
pnpm buildThis builds every package in packages/, in dependency order, and Turborepo caches the results. It doesn't build the fixture apps; see e2e-testing.md for those.
pnpm turbo run test --filter=./packages/*This runs every package's unit tests. Avoid the root pnpm test: it also runs the E2E and package tests, which need built apps.
# Build all packages
pnpm build
# Build a specific package
pnpm --filter @wdio/electron-service build
pnpm --filter @wdio/tauri-service build
# Clean and rebuild
pnpm clean
pnpm build# Run every package's tests
pnpm turbo run test --filter=./packages/*
# Run tests with coverage
pnpm test:coverage
# Run tests for specific package
pnpm --filter @wdio/electron-service test
# Run tests in watch mode
pnpm --filter @wdio/electron-service vitest# Lint all packages
pnpm lint
# Lint and auto-fix
pnpm lint:fix
# Format code
pnpm format
# Type check all packages
pnpm typecheck# Rebuild a package when its source changes
pnpm --filter @wdio/electron-service devSee package-structure.md for detailed guidelines.
Quick steps:
- Create package directory:
packages/my-package/ - Copy structure from
packages/electron-service/ - Update
package.jsonwith your package details - Implement your code in
src/ - Add tests in
test/ - Build:
pnpm --filter @wdio/my-package build(use thenamefrom package.json) - Test:
pnpm --filter @wdio/my-package test
# Add dependency to specific package
pnpm --filter @wdio/electron-service add some-package
# Add dev dependency
pnpm --filter @wdio/electron-service add -D some-dev-package
# Add workspace dependency
pnpm --filter @wdio/electron-service add @wdio/native-utils@workspace:*Common dependencies are managed through pnpm's catalog feature in pnpm-workspace.yaml.
To use a catalog dependency:
{
"devDependencies": {
"typescript": "catalog:default",
"vitest": "catalog:default"
}
}The project uses three catalogs to test against different versions of key dependencies:
| Catalog | Purpose |
|---|---|
default |
Stable production versions — the reliable baseline |
next |
Latest/nightly versions — validates upcoming compatibility |
minimum |
Lowest supported versions — ensures backward compatibility |
pnpm catalog:default # Switch all packages to stable versions
pnpm catalog:next # Switch all packages to latest/nightly versions
pnpm catalog:minimum # Switch all packages to lowest supported versions# Update all catalogs and dependencies interactively, then run update:tauri
pnpm update:dependencies
# Sync the Tauri fixtures to the latest stable Tauri (npm + Cargo.toml) and run cargo update
pnpm update:tauri
# Preview catalog changes without applying them
pnpm catalog:update:dry
# Target a specific catalog
pnpm catalog:update --default
pnpm catalog:update --next
pnpm catalog:update --minimumThe update process shows available updates, lets you select which to apply, updates pnpm-workspace.yaml, then runs pnpm install.
Turborepo caches task outputs to speed up subsequent runs.
The local cache is stored in .turbo/ and is automatically used.
# Clear Turborepo cache
pnpm clean:cache
# Force rebuild (bypass cache)
pnpm build --force# Clean all build artifacts and caches
pnpm clean
# Clean just the Turbo cache
pnpm clean:cache# Run the same checks as CI
pnpm lint
pnpm typecheck
pnpm turbo run test --filter=./packages/*
pnpm build# Update all catalogs and dependencies interactively, then run update:tauri
pnpm update:dependencies
# Sync the Tauri fixtures to the latest stable Tauri (npm + Cargo.toml) and run cargo update
pnpm update:tauriTry cleaning and reinstalling:
pnpm clean
pnpm install
pnpm buildRebuild the project:
pnpm build --forceMake sure packages are built:
pnpm build
pnpm turbo run test --filter=./packages/*Reinstall Husky:
pnpm prepareRecommended extensions:
- ESLint: Microsoft ESLint extension
- Biome: Biome formatter
- TypeScript and JavaScript Language Features: Built-in
Workspace settings (.vscode/settings.json):
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "biomejs.biome",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.organizeImports": true
}
}For working with Tauri packages and plugins:
-
Install Rust (if not already installed):
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-
Install Tauri CLI:
cargo install tauri-cli # or npm install -g @tauri-apps/cli -
Build Tauri Plugin:
cd packages/tauri-plugin cargo build -
Build Tauri Test Apps:
cd fixtures/e2e-apps/tauri pnpm tauri build
See the Tauri Plugin README for detailed setup instructions.
For working with Dioxus packages:
-
Install Rust (if not already installed):
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-
Install Linux system dependencies (Linux only):
# Debian/Ubuntu sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev libxdo-dev # Fedora sudo dnf install -y webkit2gtk4.1-devel gtk3-devel libxdo-devel # Arch Linux sudo pacman -S webkit2gtk-4.1 gtk3 xdotool
-
Build the Dioxus Bridge Crate:
cd packages/dioxus-bridge cargo build -
Build the Dioxus Fixture App (for E2E tests):
cd fixtures/e2e-apps/dioxus cargo build
No Dioxus CLI (dx) is required for testing — the service builds and runs the app binary directly.
See the Dioxus App Setup and Quick Start for detailed setup instructions.
- Read package-structure.md for package conventions
- Read CONTRIBUTING.md for contribution guidelines
- Read AGENTS.md for AI assistant context and coding standards
- Explore the Electron service implementation in
packages/electron-service/ - Explore the Tauri service implementation in
packages/tauri-service/ - Explore the Dioxus service implementation in
packages/dioxus-service/ - See Tauri Plugin README for Tauri plugin setup
- See Dioxus App Setup for Dioxus app setup
AGENTS.md holds the repo's guidance for coding agents. Claude Code, Codex, Cursor and others read it. Claude Code also loads the skills in .claude/skills/, such as add-native-service.
- Issues: Report bugs or request features on GitHub Issues
- Discussions: Ask questions on GitHub Discussions
- WebdriverIO: See WebdriverIO documentation