@digitwhale_innovations/uhuru-cli
v0.1.5
Published
Create production-ready React apps with Uhuru UI.
Readme
Uhuru CLI
Create a new Vite React TypeScript app with the latest published Uhuru UI package.
Install
npm install -g @digitwhale_innovations/uhuru-cliCreate an app
uhuru init my-uhuru-appThe CLI will:
- Create the project with the latest Vite.
- Install dependencies.
- Install
@digitwhale_innovations/uhuru-ui@latestfrom the registry. - Replace the starter screen with a working Uhuru application shell.
- Configure Tailwind CSS by default for the generated utility classes.
- Import Uhuru styles once through
src/index.css.
The generated app is intentionally focused, but it is a real layout starter rather than a static showcase. It includes:
UhuruProviderwith compact density and the brown Uhuru accent.UhuruAppLayoutwith a responsive, resizable, collapsible left panel.UhuruGroupedPanelwith three route-backed items: Counter, Documentation, and Welcome.- A stateful Counter route at
/counter, selected by default. - A Documentation route at
/documentationexplaining provider and panel usage. - A Welcome route at
/welcomeintroducing Uhuru from Digitwhale Innovations. - Phosphor icons in the panel and actions, with responsive Tailwind layout utilities.
Panel routes are rendered inside the layout rather than replacing the entire app:
<UhuruGroupedPanel
defaultRoute="/counter"
groups={[{
id: "workspace",
label: "Workspace",
items: [
{ id: "counter", label: "Counter", path: "/counter", element: <CounterPage /> },
{ id: "documentation", label: "Documentation", path: "/documentation", element: <DocumentationPage /> },
{ id: "welcome", label: "Welcome", path: "/welcome", element: <WelcomePage /> },
],
}]}
/>The generated app is a foundation to extend, not a full component showcase. Add
your product routes and features in src/App.tsx, keep the one-time Uhuru CSS
import, and prefer Uhuru components before writing custom controls.
Options:
uhuru init my-app --template react-ts --pm npm
uhuru --init my-app --force
uhuru init my-app --no-tailwindThe CLI is interactive when run in a terminal. If no project name is passed,
it asks for one. It also asks whether to configure Tailwind CSS. In scripts or
CI, pass the project name and use --tailwind or --no-tailwind explicitly.
Check Uhuru usage
Run the static checker from the root of an app:
uhuru lint
uhuru lint src
uhuru lint --jsonuhuru lint checks JavaScript and TypeScript source files for removed legacy
panel props and imports, unsupported UhuruProvider, UhuruAppLayout, and
UhuruPanel props, missing UhuruPanel sides, invalid literal theme/density/
radius/position values, and unknown literal keys in PanelConfig,
UhuruAlertConfig, and UhuruColorConfig objects.
Each diagnostic includes a code, absolute file location, source line, reason,
and a concrete fix. The command exits with status 1 when an error is found,
so it can be used in CI. --json emits { command, target, filesChecked,
diagnostics } for editor integrations and AI coding agents. The checker is
static: dynamic objects and values are reported only when their invalid value
is visible in the source, so TypeScript remains the final authority for
complex inferred types.
