Skip to content
soham-vermaPublic

About

No description, website, or topics provided.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Flux

CI Release License: GPL v3

A drive utility — format, partition, clone, flash boot images, and recover data from internal and external drives — built with Tauri 2 + Rust. Implements the Flux.dc.html design from claude.ai/design.

Real disk operations (drive listing, SMART health, format/erase) are implemented for macOS today via diskutil. The app builds and runs its full UI on Windows and Linux too, but the disk backend for those platforms isn't written yet — see Platform support.

Platform support

Platform Builds & runs Drive listing Format / Erase Partition / Clone / Flash / Recovery
macOS 12+ ✅ ✅ real (diskutil) ✅ real, elevated Simulated (see Roadmap)
Windows ✅ ❌ not implemented ❌ not implemented Simulated
Linux ✅ ❌ not implemented ❌ not implemented Simulated

Every simulated feature has a small in-app banner saying so — nothing pretends to touch a real disk when it isn't.

Quick start

npm install
npm run tauri dev      # dev mode, hot reload
npm run tauri build    # produces installers under src-tauri/target/release/bundle

Requires Rust and, on macOS, Xcode Command Line Tools (xcode-select --install). On Linux you'll additionally need the Tauri v2 system packages (libwebkit2gtk-4.1-dev, libgtk-3-dev, librsvg2-dev, patchelf, ...) — see .github/workflows/ci.yml for the exact apt-get install list used in CI.

Optional, for fuller macOS functionality:

brew install smartmontools   # real SMART temperature / power-on hours / reallocated sectors
brew install ntfs-3g-mac     # real NTFS formatting (mkntfs) — macOS has no native NTFS write support

Flux detects both at runtime and shows a clear inline message if they're missing, rather than faking data.

Downloads

Tagged releases (vX.Y.Z) are built automatically for macOS (universal), Windows, and Linux (AppImage) by .github/workflows/release.yml and published as draft GitHub Releases. Builds are unsigned:

  • macOS: right-click the app → Open the first time, to bypass Gatekeeper.
  • Windows: click More info → Run anyway to bypass SmartScreen.
  • Linux: chmod +x Flux*.AppImage before running.

Testing

npm run typecheck   # tsc --noEmit
npm run test:e2e    # Playwright, against a mocked Tauri IPC bridge — see tests/
cargo check          # from src-tauri/ — Rust compiles cross-platform even where the disk backend is macOS-only

Playwright tests run against test-harness.html, a dev-only entry point that mocks window.__TAURI_INTERNALS__ with @tauri-apps/api/mocks and fixture drive data, then mounts the real FluxApp — so tests exercise production rendering and state logic without a live Rust backend or real disk access. See docs/ARCHITECTURE.md for how that's wired up.

What's real vs. simulated

Real, backed by actual diskutil/system calls (macOS only):

  • Drive + partition listing (sidebar, dashboard header, capacity/connection/SMART cards).
  • SMART temperature / power-on hours / reallocated sectors, via smartctl if installed.
  • Format / Erase (Quick and Secure) — real diskutil eraseDisk / diskutil secureErase, elevated via a native macOS admin prompt, with live progress streamed to the UI.
  • The Flash tab's ISO/IMG file picker opens a real native file dialog (the file isn't written to a drive yet).

Simulated, clearly banner-labeled in the UI:

  • Speed Test, Convert File System, Clone, Recovery, Flash ISO writing.
  • Partitions tab shows real partition data; Add/Delete Partition are disabled with a "coming soon" note rather than faking edits against real disk state.

Documentation

  • docs/ARCHITECTURE.md — render runtime, job execution model, elevation approach, real-vs-simulated boundaries in code.
  • CONTRIBUTING.md — dev environment setup, how to run tests, PR expectations.

Known risk areas

  1. src-tauri/src/drives.rs plist parsing. Written against Apple's documented diskutil ... -plist schema; every field read is defensive (missing key → "Unknown", never a crash), but if drives show up wrong, compare diskutil list -plist physical | plutil -p - against the get_str/get_u64/get_array calls in that file.
  2. Elevated command streaming (privilege.rs). Progress streaming works by redirecting the elevated shell command's output to a temp file and tailing it, since osascript itself has no streaming API.
  3. Secure Erase pass count. The UI's "Secure Erase (7-pass)" maps to diskutil secureErase level 2 (DoD 7-pass) — Apple's levels don't include every possible pass count, this was the closest standard match.
  4. Cancel is best-effort. Once an elevated diskutil command is running, macOS's Authorization framework owns that process, not Flux directly. A fully interruptible version would need a signed privileged helper (SMJobBless/launchd) instead of osascript.
  5. NTFS. macOS's built-in NTFS support is read-only. Real NTFS formatting is routed through ntfs-3g's mkntfs, which isn't wired into format.rs yet — the UI's NTFS option currently fails with a clear "not supported directly" error rather than pretending to work.

Roadmap

  • Real partitioning (diskutil partitionDisk / apfs addVolume / apfs deleteVolume).
  • Real cloning (asr restore for exact copy; block-level dd as an alternative).
  • Real ISO flashing (dd + shasum checksum verification).
  • Real recovery scanning (raw-device filesystem-signature scan for lost partitions).
  • Windows backend (diskpart/PowerShell + UAC elevation) and Linux backend (udisks2/lsblk/parted + pkexec).
  • Code signing for release builds (Apple Developer ID + notarization; Windows Authenticode).

License

GPLv3 — see LICENSE.

About

No description, website, or topics provided.

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages