mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 19:41:09 +02:00
Assign version numbers based on app maturity: Calendar/Contacts/Todo (1.0.0), Chat/Picture (0.3.0), 11 beta apps (0.2.0), Context/Planta/Questions (0.1.0), Traces (0.0.1). Set up @changesets/cli for future version management. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| bin | ||
| src | ||
| .gitignore | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
@memoro/ui CLI
CLI tool for copying UI components into your app (shadcn-style).
Installation
npm install -g @memoro/ui
Or use directly with npx:
npx @memoro/ui add button
Commands
add <component>
Add a component to your project.
memoro-ui add button
memoro-ui add text
memoro-ui add card
Options:
-y, --yes- Skip confirmation prompts
The CLI will:
- Check if the component exists in the registry
- Resolve and install dependencies automatically
- Copy component files to your
components/directory - Show import instructions
list
List all available components.
memoro-ui list
Options:
-c, --category <category>- Filter by category (ui, navigation)
Shows:
- All available components
- Which components are already installed (✓)
- Component descriptions
- Dependencies
How it Works
This CLI follows the shadcn approach:
- No NPM dependencies - Components are copied into your project
- Full control - You own the code, modify as needed
- Dependencies - Automatically installs component dependencies
- Type-safe - All components are fully typed with TypeScript
Component Structure
Components are copied to:
your-project/
└── components/
├── ui/
│ ├── Button/
│ │ ├── Button.tsx
│ │ ├── index.ts
│ │ └── README.md
│ ├── Text/
│ └── ...
└── navigation/
└── ...
Import Pattern
import { Button } from '@/components/ui/Button';
import { Text } from '@/components/ui/Text';
function MyScreen() {
return <Button title="Click me" onPress={() => {}} />;
}
Development
Build the CLI:
npm run build
Watch mode:
npm run dev
Link locally for testing:
npm link
memoro-ui list
Available Components
Run memoro-ui list to see all available components.
Current components:
- UI (14): Button, Text, Icon, Container, EmptyState, ErrorBanner, Slider, Skeleton, FAB, Tag, Badge, Card, Select, ToggleGroup
- Navigation (coming soon): Header, TabBar, HeaderButton
Philosophy
Copy, don't install - This CLI doesn't create NPM dependencies. It copies component source code into your project. This gives you:
- ✅ Full control over the code
- ✅ No version conflicts
- ✅ Customize freely without worrying about updates
- ✅ Smaller bundle size (only what you use)
- ✅ Better for AI context (components in your codebase)
When you want updates, run memoro-ui add <component> again to get the latest version (with confirmation).
License
Private - memoro internal use only.