S
Solo Kit
DocumentationComponentsPricingChangelogRoadmapFAQContact
LoginGet Started
DocumentationComponentsPricing
LoginGet Started
Welcome to Solo Kit DocumentationIntroductionTech StackRoadmapFAQGetting Started
Getting Started

Common Commands

Common Commands

Master Solo Kit's command-line interface with this comprehensive reference. All commands are optimized for fast development and production deployment.

🚀 Development Commands

Starting Applications

# Web app (most common)
pnpm dev
# Same as: pnpm dev:web

# Mobile app
pnpm dev:mobile

# Both apps simultaneously (uses more resources)
pnpm dev:all

# Platform-specific mobile development
pnpm dev:mobile:ios      # iOS simulator/device
pnpm dev:mobile:android  # Android emulator/device

Development server features:

  • Hot reloading for instant feedback
  • TypeScript error reporting
  • ESLint integration
  • Turbopack for fast builds
  • Network access for testing on devices

Building Applications

# Build web app for production
pnpm build
# Same as: pnpm build:web

# Build mobile app (Android APK)
pnpm build:mobile

# Build shared packages (required for type checking)
pnpm build:packages

# Build everything
pnpm build:all

Build outputs:

  • Web: .next/ directory with optimized assets
  • Mobile: apps/mobile/android/app/build/ for APK
  • Packages: dist/ directories with compiled TypeScript

Starting Production Server

# Start production web server
pnpm start

# Start with custom port
PORT=3001 pnpm start

# Start with environment variables
pnpm with-env next start

🗄️ Database Commands

Schema Management

# Push schema changes to database (development)
pnpm db:push

# Generate migrations after schema changes
pnpm db:generate

# Run migrations (production)
pnpm db:migrate

# Check schema for issues
pnpm db:check

Database Tools

# Open Drizzle Studio (visual database browser)
pnpm db:studio
# Opens at: http://localhost:4983

# Seed database with demo data
pnpm db:seed

# Reset database (danger: deletes all data)
pnpm db:reset

# Environment-specific operations
pnpm with-env drizzle-kit push    # Use .env.local
NODE_ENV=production pnpm db:push  # Use production env

Database Inspection

# View database schema in code
cat packages/database/src/schema/index.ts

# Check migrations
ls packages/database/migrations/

# View connection string (safely)
echo $DATABASE_URL | sed 's/:[^@]*@/:***@/'

🧪 Testing Commands

Running Tests

# Run all tests
pnpm test

# Run tests in watch mode (development)
pnpm test:watch

# Run tests with coverage
pnpm test --coverage

# Run specific test files
pnpm test user-profile
pnpm test --testNamePattern="user creation"

# Run tests for specific packages
pnpm --filter web test
pnpm --filter packages/utils test

Mobile Testing

# Run mobile tests
pnpm --filter mobile test

# iOS simulator tests
pnpm test:ios

# Android emulator tests
pnpm test:android

# End-to-end tests (if configured)
pnpm test:e2e

🔍 Code Quality Commands

Fast Development (Changed Files Only)

# Lint only changed packages (6x faster)
pnpm lint:changed

# Type-check only changed packages (8x faster)
pnpm type-check:changed

# Test only changed packages
pnpm test:changed

# All quality checks on changed files
pnpm check:changed

Full Codebase Validation

# Lint all packages
pnpm lint

# Fix linting issues automatically
pnpm lint:fix

# TypeScript type checking (requires build:packages first)
pnpm type-check

# Format code with Prettier
pnpm format

# Check code formatting
pnpm format:check

# Format markdown files
pnpm format:md

# Format everything
pnpm format:all

CSS and Styling

# Check CSS/SCSS with Stylelint
pnpm style

# Fix CSS/SCSS issues
pnpm style:fix

# All formatting and linting fixes
pnpm fix

# Check all formatting and linting
pnpm fix:check

Complete CI Pipeline

# Full CI pipeline (build, lint, type-check, test)
pnpm ci

# Same as running:
# pnpm build:packages
# pnpm lint
# pnpm type-check
# pnpm test

🎨 UI Component Commands

shadcn/ui Components

# Add specific components
pnpm ui add button
pnpm ui add card input textarea
pnpm ui add dialog dropdown-menu

# Add all available components (be selective)
pnpm --filter web ui:all

# Update existing components
pnpm ui update

# List available components
pnpm ui list

Component Generation

# Generate new component with boilerplate
pnpm --filter web gen:component UserProfile

# This creates:
# - components/features/user/UserProfile.tsx
# - components/features/user/UserProfile.test.tsx

📦 Package Management

Installing Dependencies

# Install all dependencies (root and workspaces)
pnpm install

# Install for specific workspace
pnpm --filter web add react-query
pnpm --filter mobile add expo-camera
pnpm --filter packages/ui add lucide-react

# Install dev dependencies
pnpm --filter web add -D @types/node
pnpm add -D -w prettier  # Workspace root

Package Information

# List installed packages
pnpm list

# List outdated packages
pnpm outdated

# Update packages
pnpm update

# Update to latest versions
pnpm update --latest

# Audit for security vulnerabilities
pnpm audit

Workspace Management

# Run command in specific workspace
pnpm --filter web dev
pnpm --filter mobile test
pnpm --filter packages/ui build

# Run command in all workspaces
pnpm -r test  # Run tests in all packages
pnpm -r build # Build all packages

# List workspaces
pnpm list --depth 0

🧹 Maintenance Commands

Cleanup

# Clean all node_modules and build artifacts
pnpm clean

# Clean specific targets
rm -rf .next/
rm -rf node_modules/.cache/
rm -rf apps/web/.next/

# Deep clean (nuclear option)
pnpm clean
pnpm install

Cache Management

# Clear Next.js cache
rm -rf .next/

# Clear Turbo cache
pnpm turbo clean

# Clear npm/pnpm cache
pnpm store prune
npm cache clean --force

🔐 Environment Commands

Environment Management

# Use specific environment file
pnpm with-env next build       # Uses .env.local
NODE_ENV=production pnpm build # Uses production env

# Check environment variables
env | grep DATABASE
printenv | grep -E "(NEXT_|DATABASE_|AUTH_)"

# Validate environment setup
node -e "console.log('NODE_ENV:', process.env.NODE_ENV)"

Security

# Check for secrets in code (basic)
grep -r "api_key\|password\|secret" --include="*.ts" --include="*.tsx" .
grep -r "sk_\|pk_" --include="*.env*" .

# Verify .env.local is gitignored
git check-ignore .env.local  # Should exit with 0

# Check committed environment files
git ls-files | grep "\.env"  # Should only show .env and .env.example

🚀 Deployment Commands

Build for Production

# Build with production optimizations
NODE_ENV=production pnpm build

# Build and analyze bundle size
ANALYZE=true pnpm build

# Build with source maps (debugging)
GENERATE_SOURCEMAP=true pnpm build

# Export static site (if configured)
pnpm export

Docker Commands

# Build Docker image
docker build -t solo-kit-web .

# Run container locally
docker run -p 3000:3000 solo-kit-web

# Check Docker setup
docker-compose up --build

📊 Analytics and Debugging

Bundle Analysis

# Analyze web bundle size
ANALYZE=true pnpm build

# Opens bundle analyzer at: http://localhost:8888

Performance Monitoring

# Check build times
time pnpm build

# Profile build performance
pnpm build --profile

# Measure startup time
time pnpm dev | head -20

Debug Information

# Check Next.js info
pnpm --filter web next info

# Check Node.js version
node --version
pnpm --version

# Check package versions
pnpm list --depth=1

# Debug URL endpoints
curl http://localhost:3000/api/health
curl http://localhost:3000/debug

🔄 Git and Version Control

Pre-commit Hooks

# Manual pre-push check (runs automatically)
pnpm pre-push

# Skip pre-push checks (emergency use)
SKIP_PRE_PUSH=true git push

# Check what pre-push would run
git log --oneline HEAD^..HEAD  # Changed files

Release Commands

# Version bump and changelog (if configured)
pnpm changeset

# Create release PR
pnpm version-packages

# Publish packages (if publishing)
pnpm publish-packages

🔧 Troubleshooting Commands

Common Fixes

# Fix port conflicts
lsof -ti:3000 | xargs kill
pkill -f "next dev"

# Fix dependencies
rm -rf node_modules pnpm-lock.yaml
pnpm install

# Fix TypeScript issues
pnpm build:packages  # Rebuild shared packages
rm -rf .next/        # Clear Next.js cache
pnpm type-check      # Re-run type checking

# Fix database connection
pnpm db:push    # Re-apply schema
pnpm db:studio  # Check database visually

Diagnostic Commands

# Check system requirements
node --version    # Should be 18+
pnpm --version   # Should work
git --version    # Should work

# Check project health
pnpm lint:changed     # Should pass
pnpm type-check      # Should pass (after build:packages)
pnpm test            # Should pass

# Network diagnostics
curl -I http://localhost:3000/
ping google.com

📝 Development Workflow Examples

Daily Development

# Morning routine
git pull origin main
pnpm install          # Update dependencies
pnpm dev              # Start development

# During development (fast checks)
pnpm lint:changed     # After making changes
pnpm type-check:changed  # Before committing

# Before committing
pnpm test:changed     # Run relevant tests
git add .
git commit -m "feat: add user profile"

Feature Development

# Start new feature
git checkout -b feature/user-dashboard
pnpm dev

# Add dependencies if needed
pnpm --filter web add react-query

# Update database schema
# Edit: packages/database/src/schema/
pnpm db:push

# Build and test
pnpm build:packages
pnpm type-check
pnpm test

# Clean up and commit
pnpm lint:fix
git add .
git commit -m "feat: implement user dashboard"

Production Deployment

# Pre-deployment checks
pnpm ci               # Full CI pipeline
pnpm build            # Production build
pnpm test             # All tests

# Database migrations (production)
NODE_ENV=production pnpm db:migrate

# Deploy (platform-specific)
vercel deploy --prod
# or
docker build -t app .
docker push registry/app:latest

🎯 Quick Reference

Most Used Commands

pnpm dev             # Start development
pnpm build           # Build for production
pnpm db:push         # Update database schema
pnpm db:studio       # Visual database browser
pnpm lint:changed    # Fast linting
pnpm type-check:changed  # Fast type checking
pnpm test            # Run tests
pnpm ui add button   # Add UI component

Emergency Commands

pnpm clean           # Nuclear reset
pnpm db:reset        # Reset database (careful!)
SKIP_PRE_PUSH=true git push  # Skip pre-commit hooks
rm -rf .next/        # Clear build cache
lsof -ti:3000 | xargs kill   # Kill port 3000

Performance Commands

pnpm lint:changed    # 6x faster than pnpm lint
pnpm type-check:changed  # 8x faster than pnpm type-check
pnpm test:changed    # Only test relevant files
time pnpm build      # Measure build time

🚀 Next Steps

Master these commands to become a Solo Kit power user:

  1. Troubleshooting - Fix common issues
  2. Database Guide - Advanced database operations
  3. API Development - Server actions and API routes
  4. Deployment - Production deployment strategies

These commands form the foundation of efficient Solo Kit development. Bookmark this page and reference it regularly as you build your application.

On this page

Common Commands🚀 Development CommandsStarting ApplicationsBuilding ApplicationsStarting Production Server🗄️ Database CommandsSchema ManagementDatabase ToolsDatabase Inspection🧪 Testing CommandsRunning TestsMobile Testing🔍 Code Quality CommandsFast Development (Changed Files Only)Full Codebase ValidationCSS and StylingComplete CI Pipeline🎨 UI Component Commandsshadcn/ui ComponentsComponent Generation📦 Package ManagementInstalling DependenciesPackage InformationWorkspace Management🧹 Maintenance CommandsCleanupCache Management🔐 Environment CommandsEnvironment ManagementSecurity🚀 Deployment CommandsBuild for ProductionDocker Commands📊 Analytics and DebuggingBundle AnalysisPerformance MonitoringDebug Information🔄 Git and Version ControlPre-commit HooksRelease Commands🔧 Troubleshooting CommandsCommon FixesDiagnostic Commands📝 Development Workflow ExamplesDaily DevelopmentFeature DevelopmentProduction Deployment🎯 Quick ReferenceMost Used CommandsEmergency CommandsPerformance Commands🚀 Next Steps