This content originally appeared on DEV Community and was authored by Mr Vi
Managing Python scripts in production can be a pain. You start a script, it crashes, you restart it manually, check logs by SSH-ing into servers... Sound familiar? While PM2 solved this for Node.js, Python developers have been stuck with systemd, screen sessions, or complex container setups.
Meet Pyker - a lightweight, user-friendly process manager built specifically for Python scripts.
🚀 What is Pyker?
Pyker is a command-line tool that lets you start, stop, monitor, and manage Python scripts as background processes. Think PM2, but designed from the ground up for Python with modern features like virtual environment support, adaptive terminal output, and zero-sudo installation.
# Start a Python script as a background process
pyker start mybot bot.py
# List all running processes
pyker list
# View real-time logs
pyker logs mybot -f
# Process still running after restart? ✅
pyker restart mybot
✨ Key Features
- 🐍 Virtual Environment Support - Works seamlessly with venv, conda, pipenv
- 📊 Beautiful Table Interface - Adaptive layout that fits your terminal
- 🔄 Auto-restart - Keep your scripts running even after crashes
- 📝 Centralized Logging - All process logs in one place with rotation
- ⌨️ Tab Completion - Smart autocompletion for commands and process names
- 🛠️ Simple Installation - No sudo required, installs in user space
- 🎯 Cross-platform - Linux, macOS, and Windows support
📦 Installation
One-line Installation
curl -fsSL https://raw.githubusercontent.com/mrvi0/pyker/main/install.sh | bash
Manual Installation
# Clone and install
git clone https://github.com/mrvi0/pyker.git
cd pyker
python3 install.py
No sudo required! Pyker installs in your user space (~/.local/bin
) and automatically configures your PATH.
🐍 Virtual Environment Magic
One of Pyker's standout features is native virtual environment support. Just point to your venv, and Pyker handles the rest:
# Start with virtual environment
pyker start webapp app.py --venv ./venv
# Works with any environment type
pyker start ml-worker train.py --venv /path/to/conda/envs/pytorch
# Environment info is preserved across restarts
pyker restart webapp # Still uses ./venv automatically
Pyker automatically detects Python executables in:
-
venv/bin/python
(Linux/macOS) -
venv/Scripts/python.exe
(Windows)
📊 Process Monitoring Made Easy
The list
command shows all your processes in a beautiful, adaptive table:
Status symbols make it instantly clear:
- ✅ Green checkmark - Running smoothly
- ❌ Red X - Stopped/crashed
- ⚠️ Yellow warning - High resource usage
🔧 Advanced Features
Detailed Process Information
pyker info mybot
Process Information: mybot
Status: ✓ Running
PID: 123456
Script: /home/user/bots/trading_bot.py
CPU Usage: 2.1%
Memory: 45.2 MB
Started: 2025-08-19 09:30:15
Virtual env: ./venv
Python executable: /home/user/project/venv/bin/python
Log file: /home/user/.pyker/logs/mybot.log
Auto restart: Yes
Smart Log Managemente
py real-time
pyt -ker logs mybot -ow lines last 100 linesot
pyker logs mybot are automatically rotated based on size, preventing disk space issues.
Tab Completion
Pyker includes intelligent tab completion:
pyker <TAB> # Shows available commands
pyker stop <TAB> # Completes with running process names
pyker logs bot<TAB> # Completes process names
pyker start app script.py --<TAB> # Shows --venv, --auto-restart
🛡️ Built for Reliability
Auto-restart on Failure
pyker start critical-service app.py --auto-restart
If your script crashes, Pyker automatically restarts it and logs the incident.
Safe Uninstallation
pyker uninstall
Pyker includes a built-in uninstall command that:
- Shows exactly what will be removed
- Stops all running processes with confirmation
- Optionally preserves logs and configuration
- Can be cancelled at any point
🎯 Real-world Use Cases
Web Developers:
pyker start api app.py --venv ./venv --auto-restart
pyker start worker celery_worker.py --venv ./venv
Data Scientists:
pyker start jupyter jupyter_server.py --venv ./ml-env
pyker start training train_model.py --venv /opt/conda/envs/pytorch
DevOps/Automation:
pyker start monitor system_monitor.py --auto-restart
pyker start backup backup_script.py --venv ./tools-env
Discord/Telegram Bots:
pyker start discord-bot bot.py --venv ./bot-env --auto-restart
pyker logs discord-bot -f # Monitor bot activity
🔄 Migration from PM2
Coming from PM2? The transition is smooth:
PM2 | Pyker | Notes |
---|---|---|
pm2 start app.js |
pyker start app app.py |
Similar syntax |
pm2 list |
pyker list |
Enhanced table view |
pm2 logs app |
pyker logs app -f |
Follow logs |
pm2 restart app |
pyker restart app |
Preserves venv |
pm2 delete app |
pyker delete app |
Clean removal |
🚀 Why Choose Pyker?
- Python-First Design - Built specifically for Python workflows
- Modern UX - Beautiful, adaptive interface that fits any terminal
- Zero Configuration - Works out of the box with sensible defaults
- Virtual Environment Native - First-class venv support
- Lightweight - Single Python file, minimal dependencies
- User-Space Installation - No root access required
- Cross-Platform - Same experience on Linux, macOS, Windows
🔮 What's Next?
Pyker is actively developed with upcoming features:
- Web dashboard for remote monitoring
- Integration with systemd for true service management
- Docker container support
- Process health checks and notifications
- Configuration file support for complex setups
📥 Get Started Today
# Install Pyker
curl -fsSL https://raw.githubusercontent.com/mrvi0/pyker/main/install.sh | bash
# Start your first process
pyker start myapp app.py --venv ./venv
# Monitor it
pyker list
pyker logs myapp -f
🤝 Contributing
Pyker is open source and welcomes contributions! Whether it's bug reports, feature requests, or code contributions, check out our GitHub repository.
Made with ❤️ for Python developers who want simple, reliable process management.
Have you tried Pyker? Share your experience in the comments below!
This content originally appeared on DEV Community and was authored by Mr Vi

Mr Vi | Sciencx (2025-08-19T00:09:00+00:00) Pyker: A Modern PM2 Alternative for Python Developers. Retrieved from https://www.scien.cx/2025/08/19/pyker-a-modern-pm2-alternative-for-python-developers/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.