gpuicn-cli 0.9.8

Install editable gpuicn Rust components without Node.js.
Documentation

gpuicn

gpuicn gives native GPUI apps 45 polished, shadcn-styled components, from Button and Dialog to Sidebar, Resizable and Virtual List. Like shadcn/ui, it copies the Rust source into your app, so you own every line and can change any of it. Behavior comes from GPUI Kit; gpuicn adds the Nova styling, a themeable token system and larger desktop components.

[!WARNING] gpuicn is experimental. APIs and styling can change between releases; gpuicn diff shows exactly what an update would change in your copy.

Quick start

cargo install gpuicn-cli --version 0.9.8 --locked
gpuicn new my-app --base-color zinc  # cargo new + pinned deps, Geist fonts, theme, Button and a starter window
cd my-app && cargo run
gpuicn add sidebar dialog
gpuicn theme set --radius 0.5rem --appearance dark

That's the whole setup. No Node.js is involved. In an existing app, run gpuicn init from its root instead of gpuicn new; it keeps everything you already have. Installing the CLI also adds cargo gpuicn as an alias.

The starter main.rs is one call: ui::app::run opens the window with the Lucide icons, the Geist fonts and the light and dark themes generated from assets/theme.css, and follows the system appearance. Pick any of shadcn's base colors (neutral, stone, zinc, mauve, olive, mist, taupe), or gpuicn theme import theme.css with a theme from the shadcn theme editor or tweakcn.

Then use components like any other Rust code in your crate:

use ui::button::Button;

Button::new("save")
    .label("Save")
    .on_click(cx.listener(|this, _, _, cx| this.save(cx)))

Or use it as a crate

If you'd rather not keep the source in your app, use crate mode. Every component comes from the gpuicn crate, and you copy out only the ones you want to change:

gpuicn new my-app --crate   # or `gpuicn init --crate` in an existing app
gpuicn eject button         # src/ui/button.rs is now yours; ui::button uses it
gpuicn remove button        # back to the crate's Button

Your code reads ui::button::Button either way, so moving a component between the crate and your app never changes a call site. The theme always stays in the crate, so every component reads the same theme.

Everyday commands

Command What it does
gpuicn list Every component in the registry
gpuicn add <name>… Copy components and the shared files they need; your edits are kept
gpuicn status Which installed components differ from the registry
gpuicn diff [name…] The exact change an update would make
gpuicn add <name> --overwrite Replace your copy with the registry version
gpuicn remove <name>… Delete a component, keeping files others still use
gpuicn remove --unused Delete every installed component your code does not reference
gpuicn eject <name>… Crate mode: copy a component out of the crate to edit it
gpuicn theme set --base-color stone --radius 0.5rem --appearance dark Regenerate assets/theme.css and src/ui/app_theme.rs
gpuicn theme import <file or URL> Use a shadcn theme CSS instead of a base color
gpuicn theme preview Every theme token in light and dark mode
gpuicn update [--to 0.9.0] [--overwrite] Move gpuicn.toml, the Cargo pins and the fonts to a release
gpuicn doctor Check the app against the CLI's release, with a fix for each finding

Learn more

Requirements and platform scope

Rust 1.98 or newer. gpuicn v0.9.8 targets GPUI Kit 0.9.0 and its pinned gpui-pre 0.3.11 runtime; import GPUI types through gpui_kit. Apps on another GPUI revision must migrate first. macOS native builds need Xcode's Metal toolchain; Linux needs the usual GPUI system libraries (fontconfig, xkbcommon, Wayland/X11).

The browser catalog renders the same Rust components through WebGPU and WASM. The WASM canvas does not expose a browser accessibility tree. Differences from shadcn and platform limits are documented per component in docs/parity/ and in the catalog.

Example app

cargo run --release -p gpuicn-showcase --features gpui_platform/runtime_shaders

gpuicn Workspace combines projects, tasks and local chat with saved state; pass -- --catalog for the component gallery. See showcase packaging.

Contributing

Bug reports, parity gaps and component requests are welcome as issues. See CONTRIBUTING.md for the development setup, the checks to run, and how to add a component. Project planning and validation records live in docs/internal.

License

gpuicn is available under the MIT License.