| Crates.io | yewi-cli |
| lib.rs | yewi-cli |
| version | 1.0.0 |
| created_at | 2026-01-10 07:19:42.912508+00 |
| updated_at | 2026-01-20 07:17:52.74581+00 |
| description | CLI tool for managing yewi-kit components in Yew projects |
| homepage | https://yewi.pages.dev |
| repository | https://github.com/Emii-lia/yewi-cli |
| max_upload_size | |
| id | 2033697 |
| size | 43,885 |
Yewi-cli is a command-line tool for managing UI components in your Yew projects, inspired by shadcn/ui.
git clone https://github.com/Emii-lia/yewi-cli.git
cd yewi-cli
cargo install --path .
Or install globally:
cargo install yewi-cli
yewi new my-app
cd my-app
yarn install
yarn build
trunk serve
Your project is now ready to go.
Add any component from yewi-kit:
yewi add button
yewi add input
yewi add badge
This automatically:
src/components/<component-name>/src/components/mod.rssrc/styles/components.scssyewi new my-project
yewi create my-project # alias
yewi add button
yewi add input
yewi add select
yewi add badge
yewi add card
After yewi new, your project will have this structure:
my-app/
├── src/
│ ├── components/ # Reusable UI components (add with yewi add)
│ │ └── mod.rs
│ ├── features/ # Feature-level components
│ ├── app/ # App routes and layout (next.ts style)
│ │ ├── not-found/ # 404 page
│ │ ├── page.rs
│ │ ├── route.rs
│ │ └── mod.rs # App component
│ ├── styles/ # Global and component styles
│ │ ├── main.scss # Global Tailwind + SCSS imports
│ │ ├── global.css # Generated Tailwind CSS after `yarn build`
│ │ ├── components.scss # Auto-imported component styles
│ │ └── features.scss
│ ├── types/ # Custom types and enums
│ └── main.rs # Entry point
├── index.html
├── Cargo.toml
├── Trunk.toml
├── package.json
├── tailwind.config.js
├── postcss.config.js
└── yarn.lock
Each component downloaded with yewi add has this structure:
components/
└── button/
├── mod.rs # Component view
├── hooks.rs # Component logic (if needed)
├── types.rs # Component types (if needed)
└── button.scss # Component styles
└── ...
Each component uses Tailwind CSS utilities combined with SCSS:
// src/components/divider/divider.scss
.Divider {
@apply flex items-center gap-2 w-full;
@apply text-slate-500 font-medium;
&:before, &:after {
@apply w-1/2 h-0.5 rounded-full bg-slate-500 content-[""];
}
&:not(&.has-children) {
@apply w-full h-0.5 bg-slate-500 rounded-full;
}
&.vertical {
@apply h-full flex flex-col items-center w-0.5 relative min-h-10 bg-inherit;
&:before, &:after {
@apply w-0.5 h-1/2 rounded-full bg-slate-500 content-[""] min-h-4;
}
&:not(&.has-children) {
@apply w-0.5 h-full bg-slate-500;
}
}
}
The template includes pre-configured:
Edit src/styles/main.scss for global styles:
@tailwind base;
@tailwind components;
@tailwind utilities;
body {
@apply font-sans;
}
Make sure the component exists in the yewi-kit repository:
yarn install to install all dependencies, then run yarn build to generate Tailwind CSSsrc/styles/components.scss has the component importtrunk serve after adding componentstrunk serve --port <another-port>
If git is not installed, the CLI will fall back to downloading the template via GitHub API automatically.
To add your own components to the project, follow these steps:
src/components/{component-name}/mod.rs and {component-name}.scsssrc/components/mod.rssrc/styles/components.scssMIT
For issues, questions, or suggestions, please open an issue on the GitHub repository
Visit the Yewi-Kit website for documentation, examples, and more information about the components available.