one-file-cli
v1.4.1
Published
Run shadcn/ui React components instantly with zero config - perfect for quick prototypes
Maintainers
Readme
one-file-cli
🚀 Run shadcn/ui React components instantly with zero config. Perfect for quick prototypes and proof of concepts!
Features
✨ Zero config setup - just run and go!
🎨 Complete shadcn/ui component library pre-configured
🔥 Native Vite hot reload
🎨 Tailwind CSS v4 pre-configured
🧩 TypeScript support out of the box
🔄 Auto cleanup when done
🎯 Direct file import - Vite handles everything
📂 Dual import aliases: @ (template) and ~ (local)
🏗️ Production build support
Usage
Check Version
npx one-file-cli --versionInitialize (Run Once)
npx one-file-cli initThis installs all dependencies in a shared template directory (~30 seconds).
Run a Component
npx one-file-cli main.tsxInstantly starts a dev server with hot reload (< 3 seconds).
Build for Production
npx one-file-cli build main.tsxCreates optimized production build in ./dist.
Import Aliases
@/*- Access shadcn components and utils (e.g.,@/components/ui/button)~/*- Access your local files (e.g.,~/components/hello)
Example Component
import { Button } from "@/components/ui/button"
import { Card } from "@/components/ui/card"
import { Input } from "@/components/ui/input"
export default function App() {
return (
<Card className="p-6 max-w-sm mx-auto mt-8">
<h1 className="text-2xl font-bold mb-4">Hello shadcn/ui</h1>
<div className="space-y-4">
<Input placeholder="Enter something..." />
<Button>Click Me</Button>
</div>
</Card>
)
}Available Components
All components from shadcn/ui are pre-configured and ready to use:
Form Components
- Button
- Input
- Textarea
- Select
- Checkbox
- Radio Group
- Switch
- Form
Layout Components
- Card
- Dialog
- Sheet
- Tabs
- Accordion
- Hover Card
- Popover
- Dropdown Menu
- Navigation Menu
Data Display
- Table
- Avatar
- Badge
- Progress
- Scroll Area
- Separator
And many more! Check out the full list of components.
Why one-file-cli?
- 🚀 Instant shadcn Setup: All components ready to use with zero config
- 💾 Save Space: Share dependencies across projects
- 🧪 Perfect for POCs: Quickly test shadcn/ui ideas without boilerplate
- 🧹 Clean Workspace: Auto-cleanup after you're done
License
MIT
Contributing
Pull requests are welcome! Feel free to open an issue for bugs or feature requests.
TODO:
- [ ] Tests
- [ ] Custom Templates people can specify
- [ ] Command to basically bring all the config files into the directory updating the package files to not use the one-file-cli and to use vite
- [ ] Plugins ? Like on a template can specify if you want theme-selector.tsx component for example.
- [ ] Maybe github repo for the template and you specify what one and can specify custom repo if you want
