Components are distributed as source, the way shadcn/ui does it: you copy a component's file into your project and change it there. amenui add does the copying.
cargo run --release --bin amenui -- add dialog --to ../my-app
cargo run --release --bin amenui -- add button number input --to ../my-app --forceadd <name>…takes one or more names asregistry.jsonlists them (button,scroll-area,context_menu…).- It resolves what each one depends on (every component needs
base, the shared sizes insrc/widgets/mod.rs; a dialog needs the button) and copies every file to the same path under the target. - A file that is already there is left alone;
--forceoverwrites it. --to <dir>is the project (the current directory when left out).- A misspelt name is an error that names the closest one.
The logic is amenui::add (src/add.rs); tests/add.rs runs it into a scratch directory. Every component page shows its own add line and the files it copies.