devmentorai-server
v1.2.3
Published
DevMentorAI backend server — AI-powered DevOps mentoring via GitHub Copilot. Run with: npx devmentorai-server
Maintainers
Readme
devmentorai-server
AI-powered DevOps mentoring and writing assistant backend, powered by GitHub Copilot.
Part of the DevMentorAI project.
Quick Start
npx devmentorai-serverThat's it! The server starts in the background on port 3847.
Installation
Run without installing (recommended)
npx devmentorai-serverInstall globally
npm install -g devmentorai-server
devmentorai-serverLong-Running Usage (No Interruptions)
npx devmentorai-server is supported and starts the backend in background mode, but for long-running sessions (hours/days) you should use a process supervisor.
Option 1: Global install + PM2 (recommended)
npm install -g devmentorai-server pm2
pm2 start "devmentorai-server start --foreground" --name devmentorai-server
pm2 save
pm2 statusOption 2: systemd (Linux)
Create a user service that runs:
devmentorai-server start --foregroundThen enable restart policies (Restart=always) so the backend auto-recovers if it crashes.
Commands
| Command | Description |
|---------|-------------|
| devmentorai-server start | Start the server in background (default) |
| devmentorai-server stop | Stop the running server |
| devmentorai-server status | Show server status (PID, port, health) |
| devmentorai-server logs | View recent server logs |
| devmentorai-server doctor | Check system requirements |
Options
| Option | Description |
|--------|-------------|
| --port <port> | Port to listen on (default: 3847) |
| --foreground, -f | Run in foreground (don't daemonize) |
| --lines, -n | Number of log lines to show (default: 50) |
| --help, -h | Show help message |
| --version, -v | Show version |
Examples
# Start server on a custom port
devmentorai-server start --port 4000
# Run in foreground (useful for debugging)
devmentorai-server start --foreground
# Check if everything is set up correctly
devmentorai-server doctor
# View last 100 lines of logs
devmentorai-server logs --lines 100Requirements
- Node.js >= 20.0.0
- GitHub Copilot CLI (optional — server runs in mock mode without it)
How It Works
The server runs as a background process and stores its data in ~/.devmentorai/:
~/.devmentorai/
├── devmentorai.db # SQLite database (sessions, messages)
├── server.pid # PID of running server
├── config.json # User configuration
├── logs/
│ └── server.log # Server logs
└── images/ # Session image thumbnailsAPI Endpoints
| Endpoint | Description |
|----------|-------------|
| GET /api/health | Health check |
| GET /api/sessions | List sessions |
| POST /api/sessions | Create a new session |
| POST /api/chat/:sessionId | Send a message |
| GET /api/models | List available models |
Troubleshooting
Server won't start
- Run
devmentorai-server doctorto check requirements - Check logs:
devmentorai-server logs - Try foreground mode:
devmentorai-server start -f
Server stops unexpectedly
- Check the latest backend logs:
devmentorai-server logs --lines 200 - Re-run in foreground to capture runtime errors directly:
devmentorai-server start -f - For continuous uptime, run under PM2 or systemd (see Long-Running Usage)
Port already in use
devmentorai-server start --port 4000Copilot not connected
The server requires GitHub Copilot CLI to be installed and authenticated. Without it, the server runs in mock mode with simulated responses.
# Install Copilot CLI (if not installed)
npm install -g @github/copilot-cli
# Authenticate
github-copilot authReset data
rm -rf ~/.devmentorai
devmentorai-server startDevelopment
This package is part of the DevMentorAI monorepo.
git clone https://github.com/BOTOOM/devmentorai.git
cd devmentorai
pnpm install
pnpm dev:backendSupport
Found a bug or have a feature request? Open an issue on GitHub.
License
MIT © BOTOOM
