Litho
Flash disk images to USB drives (and other block devices) and clone devices back to image files. Litho ships a CLI (litho), an interactive terminal UI (litho-tui), and a Rust library used by the Lithographer desktop app.
Supported for full use: Linux and Windows. macOS is experimental.
What you need
| Requirement | |
|---|---|
| OS | Linux or Windows |
| Privileges | Root (sudo) on Linux, Administrator on Windows — for flash and clone only |
| Images | .img, .iso, or .img.xz |
| TUI terminal | At least 60×24 characters |
Querying devices does not require elevation.
Install / build (end users)
If you only want the GUI, install Lithographer instead.
Important: enable real-io for actual flash/clone
By default this crate builds in simulation mode (simulated-io): progress is shown but disks are not written. That keeps development and accidental installs safe.
For a real flash/clone tool, always pass --no-default-features --features real-io.
Install from crates.io (when published)
Crate name on crates.io: liblitho (binaries are still named litho and litho-tui).
# Required for real disk I/O
# Then:
Without those flags, cargo install liblitho installs a simulation-only build (safe, but it will not write images to devices).
Build from source
# Real disk I/O (what you want for actual flash/clone)
| Binary | Path |
|---|---|
| CLI | target/release/litho |
| TUI | target/release/litho-tui |
# Dev / tests only — simulation, no real writes
Quick start — CLI
Always double-check the device path. Flashing the wrong disk destroys data.
# List devices (no root needed)
# Flash (Linux example)
# Flash compressed image + verify write
# Clone a device to a file
Common options
| Option | Meaning |
|---|---|
-f, --file |
Image path (flash source or clone output) |
-d, --device |
Block device (e.g. /dev/sdb, \\.\PhysicalDrive1) |
-b, --block-size |
I/O buffer size in bytes (default 4096) |
--verify |
After flash, read back and compare SHA-256 (flash only) |
-s, --silent |
Less progress output |
--dry-run |
Validate only; do not write |
--yes |
Confirm automatic volume unmount / dismount |
-o terminal|gui |
Human progress bar vs GUI sidecar protocol |
On Windows, confirm volume dismount in the TUI, or pass --yes on the CLI.
Quick start — TUI
# or unprivileged: you will be prompted to elevate (pkexec / UAC)

Everyday shortcuts
| Key | Action |
|---|---|
Tab |
Move between sections |
1 / 2 |
Flash / Clone mode |
d / f |
Device / file picker |
r |
Refresh devices |
Space |
Toggle verify (flash) |
Enter |
Activate focused control / start |
c / Esc |
Cancel running operation |
q |
Quit |
Launch with options
| Option | Description |
|---|---|
-m, --mode |
flash or clone |
-d, --device |
Pre-select device |
-i / -f |
Pre-fill image path |
--start |
Start immediately if already elevated |
--log-file |
Default: ~/.cache/litho/litho-tui.log (Windows: %LOCALAPPDATA%\litho\) |
--log-level |
error … trace (default info) |
Safety
- Prefer removable USB/SD media as the flash target when possible.
- Litho refuses the system disk, partitions (use the whole disk), and busy/mounted volumes until you confirm unmount/dismount.
- Cancel stops between I/O blocks; a cancelled flash may leave a partially written device.
GUI
For a graphical frontend, use Lithographer. It runs as a normal user app and elevates only the litho helper for flash/clone.
More documentation
| Audience | Document |
|---|---|
| Developers (library API, architecture, platform modules, build flags, GUI protocol, portable builds) | docs/developer-docs.md |
| Platform trait design notes | docs/platform-segregation-plan.md |
| Changelog | CHANGELOG.md |
License
MIT — see Cargo.toml.