Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@approximate/capable) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Capable 🚀
The Swiss Army Knife for Development Servers
Stop memorizing different dev commands. Just type capable.
The Problem
Every project has different commands:
npm startnpm run devnpm run servenpm run serverpython manage.py runserver- And dozens more...
Plus, you constantly get port conflicts:
- "Port 3000 is already in use"
- Kill the process manually
- Try a different port
- Update your config
- Repeat...
You shouldn't need to deal with this.
The Solution
npm install -g capable
cd your-project
capableThat's it. One command to rule them all. Automatic port conflict resolution included.
Installation
npm install -g capableUsage
1. Start Any Dev Server
cd my-react-app
capableAuto-detects your framework and:
- ✅ Finds the right npm script
- ✅ Resolves port conflicts
- ✅ Opens your browser automatically
2. Kill Processes on Ports
# Kill specific port
capable kill 3000
# Kill default port for this project
capable killNo more:
- Manually finding PIDs
- Using lsof/netstat
- Google searching "how to kill port 3000"
3. See What's Running
capable psShows all dev servers on common ports:
✓ Found 3 active port(s):
• Port 3000 - http://localhost:3000
• Port 3001 - http://localhost:3001
• Port 5173 - http://localhost:51734. Install Dependencies
capable installSmart dependency installation:
- Detects npm vs yarn
- Uses lockfile if present
- Auto-prompts if missing before starting
5. Frontend vs Backend
If you have a monorepo or fullstack project:
# Start frontend
capable front
# Start backend
capable backExamples
# Next.js project
cd my-nextjs-app
capable
# → Runs: npm run dev
# React app
cd my-react-app
capable
# → Runs: npm start
# Express backend
cd my-api
capable back
# → Runs: npm run server
# Django project
cd my-django-app
capable
# → Runs: python manage.py runserverWhat It Detects
Frontend Commands (Priority Order)
devstart:devdevelopstartservevite
Backend Commands (Priority Order)
serverstart:serverdev:serverbackendstart:backendserve:apiapi
Frameworks Detected
- ✅ Next.js
- ✅ React (CRA, Vite)
- ✅ Vue
- ✅ Angular
- ✅ Svelte
- ✅ Express
- ✅ Django
- ✅ Flask
- ✅ FastAPI
- ✅ And any project with package.json scripts!
The Difference
dev (auto-detect)
- Scans your package.json
- Looks for common dev scripts (
dev,start,serve) - Runs the most appropriate one
- Works for 95% of projects
dev front
- Specifically looks for frontend-related scripts
- Useful in monorepos with both frontend and backend
- Prioritizes client-side development commands
dev back
- Specifically looks for backend-related scripts
- Perfect for API servers, backend services
- Prioritizes server-side development commands
Examples in Different Projects
Standard React App
cd my-react-app
dev
# Automatically runs: npm startNext.js App
cd my-nextjs-app
dev
# Automatically runs: npm run devFullstack Monorepo
cd my-fullstack-app
# Terminal 1 - Start frontend
dev front
# Terminal 2 - Start backend
dev backDjango Project
cd my-django-project
dev
# Automatically runs: python manage.py runserverHelp
dev --helpAutomatic Port Conflict Resolution
No more "Port 3000 is already in use" errors!
# First project
cd project-1
capable
# ✓ Starting on port 3000
# Second project (in another terminal)
cd project-2
capable
# ⚠ Port 3000 is in use, using port 3001 instead
# ✓ Starting on port 3001
# Third project
cd project-3
capable
# ⚠ Port 3000 is in use, using port 3002 instead
# ✓ Starting on port 3002How it works:
- Detects your framework's default port (Next.js → 3000, Vite → 5173, etc.)
- Checks if the port is available
- If busy, automatically finds the next available port
- Sets the
PORTenvironment variable - Starts your server with zero config
Run multiple projects simultaneously without conflicts!
Complete Command Reference
# Start dev server (auto-detect)
capable
# Start with browser auto-open (default)
capable
# Start frontend specifically
capable front
# Start backend specifically
capable back
# Kill process on port
capable kill 3000
capable kill # Uses project default port
# Show running servers
capable ps
capable status # Alias for ps
# Install dependencies
capable install
capable i # Short alias
# Help
capable --help
capable -hWhy Capable?
- No More Context Switching - Your brain shouldn't waste energy remembering different commands
- No Port Conflicts - Automatically finds available ports, run multiple projects at once
- Auto Browser - Opens localhost automatically when ready
- Port Management - Kill processes with simple commands
- Dependency Smart - Auto-detects missing node_modules
- Works Everywhere - One command for all your projects
- Smart Detection - Understands your project structure and framework defaults
- Saves Time - No more checking package.json or killing processes
- Simple - One word:
capable
Contributing
Found a bug or want to add support for more frameworks? PRs welcome!
License
MIT
Made for developers who are tired of typing npm run dev --help to figure out the right command.
Be capable. Type capable.