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
๐ง Optional but Recommendedโ
๐๏ธ 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
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
- 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โ
Method 1: Global Installation (Recommended)โ
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
miftycommand 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
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:
- ๐ Check our Troubleshooting Guide
- ๐ Report issues on GitHub Issues
- ๐ฌ Join our community discussions
- ๐ง 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/clias 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โ
- Quick Start - Create your first project in 2 minutes
- Database Design - Learn the visual designer
- Code Generation - Understand auto-generation
- Adapters - Add third-party integrations
Run mifty init my-first-api to create your first project and start exploring Mifty's capabilities!