Skip to main content
Skip to main content

Installation Guide

Get Mifty up and running on your system with this comprehensive installation guide. We'll walk you through prerequisites, installation, verification, and troubleshooting.

๐Ÿ“‹ Prerequisitesโ€‹

Before installing Mifty, ensure your system meets these requirements:

โœ… Required Dependenciesโ€‹

๐ŸŸข Node.js 16.x or Higherโ€‹

Required for running Mifty and TypeScript

  • Download: nodejs.org
  • Recommended: Latest LTS version
  • Check version: node --version

๐Ÿ“ฆ npm 7.x or Higherโ€‹

Comes with Node.js, used for package management

  • Included: With Node.js installation
  • Alternative: Yarn package manager
  • Check version: npm --version

๐Ÿ—„๏ธ Database Setupโ€‹

Mifty uses PostgreSQL by default

  • PostgreSQL: Default database (recommended)
  • MySQL: Alternative production database
  • SQLite: For quick prototyping (no setup required)
  • MongoDB: For document-based apps

๐Ÿ”„ Gitโ€‹

For version control and project management

  • Download: git-scm.com
  • Used for: Project initialization and version control
  • Check version: git --version

๐Ÿณ Docker (Optional)โ€‹

For containerized development

  • Download: docker.com
  • Used for: Database containers, deployment
  • Check version: docker --version
Beginner-Friendly

New to backend development? Mifty works perfectly with PostgreSQL by default. Use our Docker setup for quick development, or switch to SQLite for simple prototyping!

๐Ÿ” System Checkโ€‹

Before installation, let's verify your system is ready:

# Check Node.js version (should be 16+)
node --version

# Check npm version (should be 7+)
npm --version

# Check if Git is installed (optional but recommended)
git --version

Run these commands to check your prerequisites

Expected output:

$ node --version
v18.17.0

$ npm --version
9.6.7

$ git --version
git version 2.40.1
Version Requirements
  • Node.js: Must be 16.0.0 or higher
  • npm: Must be 7.0.0 or higher
  • If your versions are older, please update before proceeding

๐Ÿš€ Installation Methodsโ€‹

Install Mifty CLI globally to use it from anywhere on your system:

npm install -g @mifty/cli

Install Mifty CLI globally

What this does:

  • โœ… Installs Mifty CLI commands globally
  • โœ… Makes mifty command available system-wide
  • โœ… Enables project creation from any directory
  • โœ… Provides access to all Mifty tools

Method 2: Using npx (Alternative)โ€‹

If you prefer not to install globally, use npx:

npx @mifty/cli init my-project

Use Mifty without global installation

When to use npx:

  • ๐ŸŽฏ One-time project creation
  • ๐Ÿ”’ Restricted global installation permissions
  • ๐Ÿงช Testing Mifty without permanent installation

Method 3: Using Yarnโ€‹

If you prefer Yarn package manager:

yarn global add @mifty/cli

Install Mifty CLI globally with Yarn

โœ… Verify Installationโ€‹

After installation, verify everything is working correctly:

# Check Mifty version
mifty --version

# View available commands
mifty --help

Verify your Mifty installation

Expected output:

$ mifty --version
@mifty/cli v1.0.4

$ mifty --help
Usage: mifty [command] [options]

Commands:
init <project-name> Create a new Mifty project
--version Show version number
--help Show help

Examples:
mifty init my-blog-api Create a new blog API project
mifty init shop-backend Create a new e-commerce backend
Installation Complete!

If you see the version number and help text, Mifty is successfully installed! ๐ŸŽ‰

๐Ÿ› ๏ธ Available Commands After Installationโ€‹

Once installed, you have access to these commands:

Global Commandsโ€‹

mifty init <project-name>     # Create new project
mifty --version # Show version
mifty --help # Show help

Project Commands (run from project directory)โ€‹

npm run dev                  # Start API server
npm run dev:full # Start full development suite
npm run db-designer # Visual database designer
npm run generate # Generate code from design
npm run adapter # Manage adapters

๐Ÿ”ง Platform-Specific Instructionsโ€‹

Windowsโ€‹

# Using Command Prompt
npm install -g @mifty/cli

# Using PowerShell (run as Administrator if needed)
npm install -g @mifty/cli

# Verify installation
mifty --version

Windows installation steps

Windows-specific notes:

  • ๐Ÿ”’ May need to run Command Prompt as Administrator
  • ๐Ÿ›ก๏ธ Windows Defender might scan the installation (normal)
  • ๐Ÿ“ Global packages installed to: %APPDATA%\npm\node_modules

macOSโ€‹

# Using Terminal
npm install -g @mifty/cli

# If permission errors, use sudo (not recommended)
sudo npm install -g @mifty/cli

# Better: Fix npm permissions first
sudo chown -R $(whoami) ~/.npm

# Verify installation
mifty --version

macOS installation steps

macOS-specific notes:

  • ๐ŸŽ Works on both Intel and Apple Silicon Macs
  • ๐Ÿ” Avoid using sudo - fix npm permissions instead
  • ๐Ÿ  Global packages installed to: ~/.npm-global

Linux (Ubuntu/Debian)โ€‹

# Update package list
sudo apt update

# Install Node.js and npm (if not installed)
sudo apt install nodejs npm

# Install Mifty CLI
npm install -g @mifty/cli

# Verify installation
mifty --version

Linux installation steps

Linux-specific notes:

  • ๐Ÿง Works on all major Linux distributions
  • ๐Ÿ“ฆ May need to install Node.js from NodeSource for latest version
  • ๐Ÿ”ง Consider using Node Version Manager (nvm) for Node.js management

๐Ÿšจ Troubleshootingโ€‹

Common Installation Issuesโ€‹

Permission Errorsโ€‹

Problem: EACCES permission errors during global installation

# Fix npm permissions (recommended)
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

# Then install Mifty
npm install -g @mifty/cli

Fix npm permission issues

Command Not Foundโ€‹

Problem: mifty: command not found after installation

# Check if npm global bin is in PATH
npm config get prefix

# Add to PATH (replace with your npm prefix)
echo 'export PATH=/usr/local/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

# Verify PATH includes npm global bin
echo $PATH

Fix PATH issues

Network/Proxy Issuesโ€‹

Problem: Installation fails due to network or proxy issues

# Clear npm cache
npm cache clean --force

# Set registry (if behind corporate firewall)
npm config set registry https://registry.npmjs.org/

# Install with verbose logging
npm install -g @mifty/cli --verbose

Fix network-related installation issues

Version Conflictsโ€‹

Problem: Conflicting versions or corrupted installation

# Uninstall existing version
npm uninstall -g @mifty/cli

# Clear npm cache
npm cache clean --force

# Reinstall latest version
npm install -g @mifty/cli@latest

# Verify installation
mifty --version

Fix version conflicts

Platform-Specific Issuesโ€‹

Windows: PowerShell Execution Policyโ€‹

Problem: PowerShell blocks script execution

# Check current execution policy
Get-ExecutionPolicy

# Set execution policy (run PowerShell as Administrator)
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

# Verify Mifty works
mifty --version

Fix PowerShell execution policy on Windows

macOS: Gatekeeper Issuesโ€‹

Problem: macOS blocks unsigned binaries

# Allow unsigned binaries (if needed)
sudo spctl --master-disable

# Or allow specific app through System Preferences > Security & Privacy

# Verify Mifty works
mifty --version

Fix macOS Gatekeeper issues

Getting Helpโ€‹

If you're still experiencing issues:

  1. ๐Ÿ“– Check our Troubleshooting Guide
  2. ๐Ÿ› Report issues on GitHub Issues
  3. ๐Ÿ’ฌ Join our community discussions
  4. ๐Ÿ“ง Contact support with detailed error messages

๐ŸŽฏ What Gets Installedโ€‹

Understanding what Mifty installs on your system:

Global Installationโ€‹

  • CLI commands: mifty, mifty-generate, mifty-db-designer, etc.
  • Framework tools: Templates, generators, development servers
  • Location: Global npm modules directory

Project Creationโ€‹

  • Essential files: Project structure, configuration files
  • Dependencies: Adds @mifty/cli as devDependency
  • Tools access: Via npm scripts that call global commands

Result: Lightweight projects with full framework power! ๐Ÿš€

โœ… Installation Completeโ€‹

Congratulations! Mifty is now installed and ready to use. Here's what you can do next:

Next Stepsโ€‹

  1. Quick Start - Create your first project in 2 minutes
  2. Database Design - Learn the visual designer
  3. Code Generation - Understand auto-generation
  4. Adapters - Add third-party integrations
Pro Tip

Run mifty init my-first-api to create your first project and start exploring Mifty's capabilities!