Get started in a few minutes.
Run the local backend, add the browser extension, and connect them. Works natively on Windows (PowerShell or CMD, no WSL needed), macOS, and Linux.
What you need
- A GitHub account with GitHub Copilot access.
- For the npm backend: Node.js 22.12+ and the Copilot CLI, logged in.
- For the Docker backend: Docker Desktop on Windows or macOS, or Docker Engine with Compose v2 on Linux, plus Git.
- Chrome, Chromium, or Firefox for the extension.
Global npm install
Install once and run devmentorai-server from any terminal. Best for daily use, especially on Windows.
npx
Run the latest version without installing it globally. npx may ask to install again whenever a new version is published.
Docker
Run the backend in a container on Windows, macOS, or Linux if the npm install gives you trouble.
Install and log in to Copilot CLI
The npm backend uses your Copilot CLI login. Using Docker instead? Skip to the Docker section; the container has its own login.
$npm install -g @github/copilotThen run copilot and type /login in the prompt.
Install and start the backend
Installing globally is the most reliable option on every OS. The same commands work in PowerShell, CMD, and macOS/Linux terminals.
npm install -g devmentorai-server@latest
devmentorai-serverPrefer not to install it? Run it with npx instead:
$npx devmentorai-serverWindows tips
- WSL is not needed, and paths with spaces such as
C:\Users\Jane Doeare supported. npm warn cleanup ... EPERMmessages are harmless: npm could not delete temporary npx cache files that are still in use.- If npx keeps asking to install, switch to the global install. Stop the npx copy first with
npx devmentorai-server stop.
Check, update, and troubleshoot
Check the installed version, or update to the latest one:
$devmentorai-server --versiondevmentorai-server stop
npm install -g devmentorai-server@latest
devmentorai-serverOther useful commands: devmentorai-server status, devmentorai-server logs, devmentorai-server doctor (checks Node.js and Copilot CLI), and devmentorai-server start --foreground to see the logs live. The server listens on http://localhost:3847. Package on npm.
Add the browser extension
Download the DevMentorAI extension for your browser.
For Chrome: unzip and load it via chrome://extensions → Enable Developer mode → Load unpacked.
Connect and chat
Click the DevMentorAI icon in your toolbar and open a session. By default the extension talks to the backend over HTTP.
HTTP (default)
Works with the npm backend and Docker. The backend URL is http://localhost:3847; change it in Settings → Backend Connection if you use another host or port.
Native Messaging (optional, Chrome)
Chrome launches the backend for you, with no local port to keep open. Requires the global npm install; it does not apply to Docker.
To enable Native Messaging, copy the extension ID from chrome://extensions and register the native host. PowerShell:
$node "$(npm root -g)/devmentorai-server/dist/install-native-host.js" <extension-id>macOS/Linux:
$node "$(npm root -g)/devmentorai-server/dist/install-native-host.js" <extension-id>On Windows this also registers the host for Chrome and Chromium. Reload the extension, then choose Native Messaging in Settings → Advanced → Communication Mode. Run the same command with --uninstall instead of the ID to remove it.
Alternative: run the backend in Docker
If the npm install fails on your machine, run the backend in a container instead. It works the same on Windows, macOS, and Linux, includes its own Copilot CLI, and serves the backend on http://localhost:3847. You do not need Node.js or the Copilot CLI on your computer.
Get the project
Clone the repository and create your local .env file. The .env file is ignored by Git; never commit it.
PowerShell:
git clone https://github.com/BOTOOM/devmentorai.git
Set-Location devmentorai
Copy-Item .env.example .envmacOS/Linux:
git clone https://github.com/BOTOOM/devmentorai.git
cd devmentorai
cp .env.example .envStart the container
If the npm backend is running, stop it first with devmentorai-server stop so port 3847 is free.
docker compose up -d --build backend
docker compose logs backendThe logs tell you which sign-in method is active. They name the token variable in use but never print its value.
Sign in to Copilot (pick one)
The container needs its own GitHub Copilot login. Choose the option that suits you.
Option A: GitHub token
Good for automated or headless setups. Create a fine-grained personal access token with the Copilot Requests permission and paste it into your .env file:
$COPILOT_GITHUB_TOKEN=github_pat_your_tokenThen apply it:
$docker compose up -d backend- Classic
ghp_tokens do not work with Copilot. GH_TOKEN,GITHUB_TOKEN, andCOPILOT_TOKENare also accepted;COPILOT_GITHUB_TOKENwins if several are set.- Keep the token only in .env; never share it or commit it.
Option B: copilot login inside the container
No token to create. Leave COPILOT_GITHUB_TOKEN empty, start the container, and log in with a device code:
$docker compose exec backend copilot loginOpen github.com/login/device, enter the code shown in the terminal, and approve access. Then restart the backend so it picks up the login:
$docker compose restart backendThe login is saved in the devmentorai-copilot volume, so it survives restarts, rebuilds, and updates.
Verify and connect the extension
Check that the backend is healthy and that Copilot is authenticated.
PowerShell:
Invoke-RestMethod -Uri 'http://127.0.0.1:3847/api/health' | ConvertTo-Json -Depth 5
Invoke-RestMethod -Uri 'http://127.0.0.1:3847/api/account/auth' | ConvertTo-Json -Depth 5macOS/Linux:
curl -fsS http://127.0.0.1:3847/api/health
curl -fsS http://127.0.0.1:3847/api/account/authIn the extension, keep HTTP Server as the communication mode and use http://localhost:3847. Native Messaging only works with a backend installed on your computer, not with Docker.
Update, reset, and stay safe
Your sessions and your Copilot login live in Docker volumes, so updates keep them.
Update to the latest version:
git pull
docker compose up -d --build backendSign out or switch accounts by removing only the login volume (your chat data in devmentorai-data stays):
docker compose down
docker volume rm devmentorai-copilot
docker compose up -d backendKeep it local
127.0.0.1 by default. Setting BACKEND_BIND_ADDRESS=0.0.0.0 exposes an unauthenticated API that can spend your Copilot quota, so only do it on a trusted network. The full Docker guide covers remote access, tunnels, custom ports, and troubleshooting.