Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Development Setup

Prerequisites

  • Node.js (LTS)
  • Rust (stable toolchain via rustup)
  • Tauri CLI (cargo install tauri-cli)
  • git and gh (GitHub CLI) for git/GitHub features

Windows users: See the Windows-specific prerequisites section below before proceeding.

Install Dependencies

npm install

Development

Native Tauri App

npm run tauri dev

Starts Vite dev server + Tauri app with hot reload.

Browser Mode

When the MCP server is enabled in settings, the frontend can run standalone:

npm run dev

Connects to the Rust HTTP server via WebSocket/REST.

Build

npm run tauri build

Produces platform-specific installers:

  • macOS: .dmg and .app
  • Windows: .nsis (.exe setup installer)
  • Linux: .deb and .AppImage

Note: The .msi bundle may fail on Windows due to WiX tooling issues. Use --bundles nsis to produce a working .exe installer:

cargo tauri build --bundles nsis

Testing

npm test              # Run all tests
npm run test:watch    # Watch mode
npm run test:coverage # Coverage report

Test tiers:

  • Tier 1: Pure functions (utils, type transformations)
  • Tier 2: Store logic (state management)
  • Tier 3: Component rendering
  • Tier 4: Integration (hooks + stores)

Framework: Vitest + SolidJS Testing Library + happy-dom

Coverage: ~80%+ (830 tests)

Project Structure

See Architecture Overview for full directory structure.

Key Files

FilePurpose
src/App.tsxCentral orchestrator (829 lines)
src-tauri/src/lib.rsRust app setup, command registration
src-tauri/src/pty.rsPTY session management
src/hooks/useAppInit.tsApp initialization
src/stores/terminals.tsTerminal state
src/stores/repositories.tsRepository state
SPEC.mdFeature specification
IDEAS.mdFeature concepts under evaluation

Configuration

App config stored in platform config directory:

  • macOS: ~/Library/Application Support/tuicommander/
  • Linux: ~/.config/tuicommander/
  • Windows: %APPDATA%/tuicommander/

See Configuration docs for all config files.

Makefile Targets

make dev      # Tauri dev mode
make build    # Production build
make test     # Run tests
make lint     # Run linter
make clean    # Clean build artifacts

Windows Prerequisites

Building on Windows requires a few extra tools beyond the standard prerequisites. Install them in this order.

1. Visual Studio Build Tools (C++ compiler)

Download and install Visual Studio Build Tools and select the “Desktop development with C++” workload. VS Build Tools 2019 or later is fine.

Or via winget:

winget install Microsoft.VisualStudio.2022.BuildTools

2. Rust

winget install Rustlang.Rustup

Restart your terminal after installation, then verify:

rustc --version
cargo --version

3. Node.js

winget install OpenJS.NodeJS.LTS

4. CMake

Required to compile whisper-rs (the on-device dictation library).

winget install Kitware.CMake

5. LLVM 18 (libclang — required for whisper-rs bindings)

whisper-rs uses bindgen to generate Rust bindings for whisper.cpp, which requires libclang. Use LLVM 18 — LLVM 19+ produces broken bindings for this crate on Windows.

Download the LLVM 18 installer from GitHub releases (LLVM-18.1.8-win64.exe) and install it. Then set the environment variable so bindgen can find it:

# Add to your PowerShell profile or set permanently in System Environment Variables
$env:LIBCLANG_PATH = "C:\Program Files\LLVM\bin"

If you have LLVM 22+ installed (e.g. from winget), install LLVM 18 to a separate directory and point LIBCLANG_PATH there instead.

6. Tauri CLI

cargo install tauri-cli --version "^2"

Full Windows Build Command

Always set LIBCLANG_PATH before building:

$env:LIBCLANG_PATH = "C:\Program Files\LLVM\bin"   # adjust path if LLVM 18 is elsewhere
cargo tauri build --bundles nsis

The installer will be at:

src-tauri\target\release\bundle\nsis\TUICommander_0.x.x_x64-setup.exe

Windows Known Issues

SymptomCauseFix
whisper-rs-sys build fails with “couldn’t find libclang”LLVM not installed or LIBCLANG_PATH not setInstall LLVM 18 and set LIBCLANG_PATH
whisper-rs-sys compile error: attempt to compute 1_usize - 296_usizeLLVM 19+ generates broken bindings for this crateUse LLVM 18 specifically
WiX .msi bundle failsWiX light.exe tooling issueUse --bundles nsis instead
App window opens but shows a black screenNavigation guard in lib.rs blocked http://tauri.localhost/ (Windows’ internal Tauri URL)Fixed in current code — tauri.localhost is explicitly allowed
Update check failed: windows-x86_64-nsis not foundCustom local build isn’t listed in official release manifestHarmless — auto-update simply won’t trigger