Socket
Book a DemoInstallSign in
Socket

desishub-cli

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

desishub-cli

🚀 A modern, beautiful CLI tool to scaffold production-ready applications across multiple frameworks. Create Node.js, Next.js, Expo, Hono, and full-stack monorepos with TypeScript, best practices, and zero configuration.

latest
Source
npmnpm
Version
2.1.1
Version published
Weekly downloads
13
160%
Maintainers
1
Weekly downloads
 
Created
Source

🚀 DesisHub CLI

DesiHub CLI

A modern CLI tool for scaffolding production-ready applications

npm version License: MIT Node.js Version Downloads

From idea to full-stack application in 2 minutes

✨ What is DesiHub CLI?

DesiHub CLI is a modern scaffolding tool that creates production-ready applications with zero configuration. Choose from 5 carefully crafted templates, each packed with industry best practices, modern tooling, and real-world features.

🚀 Quick Start

# Install globally
npm install -g desishub-cli

# Create a new project
desishub new my-awesome-app

# Start developing
cd my-awesome-app
pnpm run dev

📦 Available Templates

TemplateDescriptionFeaturesBest For
🏗️ Full-Stack MonorepoComplete development ecosystemNext.js + Hono API + Expo + Shared TypesEnterprise apps, MVP development
🟢 Node.js + ExpressBackend API with TypeScriptPrisma ORM, Sample endpointsREST APIs, Microservices
⚛️ Next.js 15Full-stack React app5 API routes, Frontend pages, DashboardWeb applications, E-commerce
🔥 HonoEdge-optimized APIOpenAPI docs, 3 endpoints, Vercel readyServerless APIs, Edge computing
📱 ExpoReact Native mobile appProduct listing, Dynamic routes, NativeWindMobile applications, Cross-platform

🏗️ Full-Stack Monorepo (NEW!)

Complete development ecosystem with Next.js web app, Hono API, Expo mobile app, and shared TypeScript types - all in one repository.

🛠️ What's Included

  • Turborepo - High-performance monorepo build system
  • Next.js 15 Web App - Modern React frontend with App Router
  • Hono Edge API - Ultra-fast serverless backend
  • Expo Mobile App - Cross-platform React Native app
  • Shared Types Package - TypeScript types across all apps
  • Unified Development - Single command to run all apps
  • Type Safety - End-to-end type safety across the entire stack

🏛️ Architecture

my-fullstack-app/
├── apps/
│   ├── web/           # Next.js 15 application
│   ├── api/           # Hono API server
│   └── mobile/        # Expo React Native app
├── packages/
│   └── types/         # Shared TypeScript types
├── turbo.json         # Turborepo configuration
└── package.json       # Root package.json

🌐 Next.js Web App Features

  • Modern React 18+ with App Router
  • 5 API Routes - Products, categories, users, stats
  • Frontend Pages - Home, store, product details, dashboard
  • Admin Dashboard - Analytics, product management
  • Tailwind CSS - Utility-first styling
  • Shadcn/ui Components - Beautiful, accessible UI
  • React Query - Powerful data fetching and caching
  • Infinite Scroll - Seamless product loading
  • SEO Optimized - Meta tags and performance

🔥 Hono API Features

  • Edge Runtime - Optimized for Vercel/Cloudflare
  • OpenAPI Documentation - Interactive API docs with Scalar
  • Type-Safe Routes - Full TypeScript integration
  • Zod Validation - Schema validation for all endpoints
  • Authentication - API key-based auth system
  • High Performance - Ultra-fast cold starts
  • Database Integration - Prisma ORM support

📱 Expo Mobile App Features

  • React Native - Cross-platform mobile development
  • Expo SDK - Latest managed workflow
  • NativeWind - Tailwind CSS for React Native
  • Tab Navigation - Beautiful bottom tab navigation
  • Product Screens - List, detail, and category pages
  • React Query - Consistent data fetching with web app
  • Pull to Refresh - Native mobile interactions
  • Offline Support - Basic offline functionality

🔗 Shared Types Package

  • Single Source of Truth - Types defined once, used everywhere
  • Zod Schemas - Runtime validation across all apps
  • Auto-sync - Type changes automatically propagate
  • API Contracts - Consistent data shapes across frontend and backend

⚡ Development Experience

# Start all apps simultaneously
pnpm dev

# Run individual apps
pnpm dev --filter=web      # Next.js on :3000
pnpm dev --filter=api      # Hono API on :3001
pnpm dev --filter=mobile   # Expo mobile app

# Build all apps
pnpm build

# Type checking across all apps
pnpm type-check

🔧 Type Safety Example

// Shared type definition (packages/types/src/products.schema.ts)
export const ProductSchema = z.object({
  id: z.string(),
  name: z.string().min(1, "Product name is required"),
  price: z.number().positive("Price must be positive"),
  image: z.string().url().optional(),
});

export type Product = z.infer<typeof ProductSchema>;

// Usage in Hono API (apps/api/src/routes/products.ts)
import { ProductSchema, CreateProductSchema } from "@repo/types/products";

app.post("/products", async (c) => {
  const body = await c.req.json();
  const validatedData = CreateProductSchema.parse(body);
  // Fully type-safe API logic
});

// Usage in Next.js (apps/web/src/app/api/products/route.ts)
import { Product, ProductSchema } from "@repo/types/products";

export async function GET(): Promise<Product[]> {
  // Type-safe API route
}

// Usage in Expo (apps/mobile/src/hooks/useProducts.ts)
import { Product } from "@repo/types/products";

export const useProducts = (): Product[] => {
  // Type-safe mobile data fetching
};

🚀 Getting Started

# Create new monorepo
desishub new my-fullstack-app --template monorepo
cd my-fullstack-app

# Install dependencies
pnpm install

# Start all apps
pnpm dev

🌐 Access Your Apps

📱 Mobile Development

# Start Expo development server
pnpm dev --filter=mobile

# Run on iOS simulator
pnpm mobile ios

# Run on Android emulator
pnpm mobile android

# Run on web
pnpm mobile web

🎯 Perfect For

  • MVP Development - Get all platforms running quickly
  • Enterprise Applications - Scalable monorepo architecture
  • Team Development - Shared types prevent API mismatches
  • Full-Stack Projects - Single repository for all code
  • Type-Safe Development - End-to-end TypeScript safety

🟢 Node.js + Express + TypeScript

Enterprise-grade backend API with modern tooling and best practices.

🛠️ What's Included

  • TypeScript - Fully configured with strict mode
  • Express.js - Fast, minimalist web framework
  • Prisma ORM - Type-safe database client
  • Sample Endpoints - Ready-to-use API structure
  • ESLint & Prettier - Code quality and formatting
  • Environment Configuration - .env setup with validation

📁 Project Structure

my-express-app/
├── src/
│   ├── routes/          # API route handlers
│   ├── middleware/      # Custom middleware
│   ├── utils/          # Utility functions
│   └── index.ts        # Application entry point
├── prisma/
│   └── schema.prisma   # Database schema
├── .env.example        # Environment variables template
└── package.json

🚀 Getting Started

desishub new my-api --template nodejs
cd my-api
npm run dev

⚛️ Next.js 15 Full-Stack Application

Complete e-commerce application with frontend, API routes, and admin dashboard.

🛠️ What's Included

  • Next.js 15 - Latest React framework with App Router
  • TypeScript - Full type safety across the application
  • React Query - Powerful data fetching and caching
  • Tailwind CSS - Utility-first styling
  • Shadcn/ui - Beautiful, accessible components

🌐 Frontend Pages

  • Home Page - Landing page with featured content
  • Store Page - Product catalog with filtering
  • Product Detail - Individual product pages
  • Category Detail - Category-specific product listings

🏪 Dashboard Pages

  • Analytics Dashboard - Stats and metrics overview
  • Products Table - Manage products with CRUD operations
  • Categories Table - Category management interface

🔌 API Routes (5 Endpoints)

GET    /api/categories        # List all categories
GET    /api/categories/[id]   # Single category
GET    /api/products          # List products (with infinite scroll)
GET    /api/products/[id]     # Single product
GET    /api/stats             # Dashboard statistics

⚡ Advanced Features

  • Infinite Scroll - Seamless product loading
  • Data Fetching - Optimized with React Query
  • Responsive Design - Mobile-first approach
  • SEO Optimized - Meta tags and structured data
  • Performance - Image optimization and lazy loading

📁 Project Structure

my-nextjs-app/
├── src/
│   ├── app/
│   │   ├── (dashboard)/     # Dashboard routes
│   │   ├── (store)/         # Store routes
│   │   ├── api/             # API route handlers
│   │   └── page.tsx         # Home page
│   ├── components/
│   │   ├── ui/              # Shadcn/ui components
│   │   ├── dashboard/       # Dashboard components
│   │   └── store/           # Store components
│   ├── lib/                 # Utilities and configurations
│   └── hooks/               # Custom React hooks
└── package.json

🚀 Getting Started

desishub new my-store --template nextjs
cd my-store
npm run dev

🔥 Hono Edge API

Ultra-fast serverless API with OpenAPI documentation and best practices.

🛠️ What's Included

  • Hono.js - Ultra-fast edge framework
  • TypeScript - Full type safety
  • Scalar Docs - Beautiful OpenAPI documentation
  • Zod Validation - Schema validation for all endpoints
  • Prisma ORM - Database integration
  • Pino Logger - High-performance logging
  • Vercel Ready - Zero-config deployment

🔌 API Endpoints (3 Endpoints)

GET    /api/products      # List products with pagination
POST   /api/products      # Create new product
GET    /api/products/:id  # Get single product

GET    /api/api-keys      # List API keys
POST   /api/api-keys      # Generate new API key
DELETE /api/api-keys/:id  # Revoke API key

GET    /api/users         # List users
POST   /api/users         # Create user
GET    /api/users/:id     # Get user profile

📖 API Documentation

  • Interactive Docs - Scalar-powered OpenAPI interface
  • Schema Validation - Zod schemas for all requests/responses
  • Type Safety - Full TypeScript integration
  • Authentication - API key-based auth system

⚡ Performance Features

  • Edge Optimized - Runs on Cloudflare Workers/Vercel Edge
  • Serverless - Pay per request, scales to zero
  • Fast Cold Starts - Optimized for edge runtime
  • Caching - Built-in response caching

🔧 Development Features

  • Strict ESLint - Tight rules for code quality
  • Best Practices - Industry-standard patterns
  • Error Handling - Comprehensive error responses
  • Request Logging - Structured logging with Pino

📁 Project Structure

my-hono-api/
├── src/
│   ├── routes/
│   │   ├── products.ts     # Product endpoints
│   │   ├── api-keys.ts     # API key management
│   │   └── users.ts        # User endpoints
│   ├── middleware/         # Authentication & logging
│   ├── lib/
│   │   ├── db.ts          # Database connection
│   │   ├── logger.ts      # Pino logger setup
│   │   └── validation.ts   # Zod schemas
│   └── index.ts           # Application entry
├── prisma/
│   └── schema.prisma      # Database schema
└── vercel.json            # Vercel deployment config

🚀 Getting Started

desishub new my-edge-api --template hono
cd my-edge-api
npm run dev

🌐 Deployment

# Deploy to Vercel (zero config)
# Push your code to git and deploy on vercel

📱 Expo React Native App

Cross-platform mobile application with modern navigation and styling.

🛠️ What's Included

  • Expo SDK - Latest Expo with managed workflow
  • TypeScript - Full type safety for mobile development
  • React Query - Data fetching and state management
  • NativeWind - Tailwind CSS for React Native
  • Expo Icons - Comprehensive icon library
  • Tab Navigation - Beautiful bottom tab navigation

📱 Screens & Navigation

  • Product Listing Screen - Grid/list view of products
  • Product Detail Screen - Detailed product information
  • Dynamic Routes - Parameter-based navigation
  • Tab Navigation - Home, Products, Profile tabs
  • Stack Navigation - Nested navigation structure

⚡ Features

  • Infinite Scroll - Seamless product loading
  • Pull to Refresh - Native refresh functionality
  • Image Optimization - Lazy loading and caching
  • Responsive Design - Adapts to different screen sizes
  • Offline Support - Basic offline functionality with React Query

🎨 UI/UX

  • NativeWind Styling - Tailwind CSS classes for React Native
  • Custom Components - Reusable UI components
  • Loading States - Skeleton screens and spinners
  • Error Handling - User-friendly error messages
  • Animations - Smooth transitions and micro-interactions

📁 Project Structure

my-expo-app/
├── src/
│   ├── screens/
│   │   ├── ProductListScreen.tsx
│   │   ├── ProductDetailScreen.tsx
│   │   └── HomeScreen.tsx
│   ├── components/
│   │   ├── ProductCard.tsx
│   │   ├── LoadingSpinner.tsx
│   │   └── ErrorMessage.tsx
│   ├── navigation/
│   │   ├── TabNavigator.tsx
│   │   └── StackNavigator.tsx
│   ├── hooks/
│   │   ├── useProducts.ts
│   │   └── useProduct.ts
│   ├── services/
│   │   └── api.ts
│   └── types/
│       └── index.ts
├── assets/                 # Images, fonts, icons
└── app.json               # Expo configuration

🚀 Getting Started

desishub new my-mobile-app --template expo
cd my-mobile-app
npm run start

📱 Development

# Start development server
npm run start

# Run on iOS simulator
npm run ios

# Run on Android emulator
npm run android

# Run on web
npm run web

📚 Available Scripts

  • npm run start - Start Expo development server
  • npm run ios - Run on iOS simulator
  • npm run android - Run on Android emulator
  • npm run web - Run on web browser
  • npm run build - Build for production
  • npm run lint - Run ESLint

📦 Building for Production

# Build for iOS
npx eas build --platform ios

# Build for Android
npx eas build --platform android

# Submit to app stores
npx eas submit

🛠️ CLI Commands

Create Project

# Interactive mode
desishub new my-project

# Specify template
desishub new my-monorepo --template monorepo        # Full-stack monorepo
desishub new my-api --template nodejs               # Node.js + Express
desishub new my-app --template nextjs               # Next.js 15
desishub new my-edge-api --template hono            # Hono Edge API
desishub new my-mobile-app --template expo          # Expo React Native

List Templates

# Show all available templates
desishub list
# or
desishub ls

Get Help

# General help
desishub --help

# Command-specific help
desishub new --help

Version

# Check CLI version
desishub --version

🔧 Requirements

  • Node.js >= 16.0.0
  • pnpm >= 8.0.0 (recommended for monorepo)
  • npm >= 8.0.0
  • Git (for repository initialization)

Optional Dependencies

  • PostgreSQL (for Prisma-based templates)
  • Vercel CLI (for Hono deployment)
  • Expo CLI (for mobile development)

🚀 Development Workflow

1. Install CLI

npm install -g desishub-cli

2. Create Project

# For full-stack development
desishub new my-project --template monorepo

# For specific platform
desishub new my-project --template nextjs

3. Start Development

cd my-project

# Monorepo: Start all apps
pnpm dev

# Single app: Start development server
npm run dev

4. Build & Deploy

# Monorepo: Build all apps
pnpm build

# Single app: Build for production
npm run build

🎯 Template Comparison

FeatureMonorepoNode.jsNext.jsHonoExpo
Web Frontend
API Backend
Mobile App
Shared Types
TypeScript
Database (Prisma)
Authentication
OpenAPI Docs
Edge Deployment
Monorepo Build

🤝 Contributing

We welcome contributions! Here's how you can help:

Adding New Templates

  • Fork the repository
  • Create a new template repository
  • Add template configuration to index.js
  • Update documentation
  • Submit a pull request

Reporting Issues

  • Use GitHub Issues for bug reports
  • Provide minimal reproduction steps
  • Include CLI version and environment details

Feature Requests

  • Open a GitHub Discussion
  • Describe the use case and expected behavior
  • Community feedback helps prioritize features

📋 Roadmap

v2.2 (Current Release)

  • Full-Stack Monorepo template
  • Shared types across all apps
  • Turborepo integration
  • Enhanced mobile app features

v2.3 (Next Release)

  • Laravel template
  • Django template
  • VS Code extension
  • Template customization options

v2.4 (Future)

  • Clerk authentication integration
  • Database seeding utilities
  • CI/CD pipeline templates
  • Docker integration

v3.0 (Long-term)

  • GUI interface
  • Template marketplace
  • Team collaboration features
  • Enterprise features

🐛 Troubleshooting

Common Issues

CLI command not found

# Reinstall globally
npm uninstall -g desishub-cli
npm install -g desishub-cli

Permission errors

# On macOS/Linux
sudo npm install -g desishub-cli

# Or use npx
npx desishub-cli new my-project

Monorepo pnpm issues

# Install pnpm globally
npm install -g pnpm

# Clear pnpm cache
pnpm store prune

Git clone failures

  • Check internet connection
  • Verify GitHub access
  • Try again with VPN if behind firewall

Dependency installation fails

  • Clear npm cache: npm cache clean --force
  • Clear pnpm cache: pnpm store prune
  • Check Node.js version compatibility

Monorepo Specific Issues

Types not found across apps

# Rebuild types package
pnpm build --filter=@repo/types

# Restart TypeScript server in your IDE

Turborepo cache issues

# Clear turbo cache
pnpm turbo clean

# Force rebuild
pnpm build --force

📞 Support

📄 License

MIT License - see LICENSE file for details.

🙏 Acknowledgments

  • Turborepo team for the excellent monorepo tooling
  • Next.js team for the amazing framework
  • Hono.js team for the fast edge framework
  • Expo team for mobile development tools
  • Prisma team for the excellent ORM
  • All contributors who help improve this project

Keywords

cli

FAQs

Package last updated on 07 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts