DDevMentorAI

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.
1

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.

bash
$npm install -g @github/copilot

Then run copilot and type /login in the prompt.

2

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.

terminal
npm install -g devmentorai-server@latest
devmentorai-server

Prefer not to install it? Run it with npx instead:

bash
$npx devmentorai-server

Windows tips

  • WSL is not needed, and paths with spaces such as C:\Users\Jane Doe are supported.
  • npm warn cleanup ... EPERM messages 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:

bash
$devmentorai-server --version
update
devmentorai-server stop
npm install -g devmentorai-server@latest
devmentorai-server

Other 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.

3

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.

4

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:

powershell
$node "$(npm root -g)/devmentorai-server/dist/install-native-host.js" <extension-id>

macOS/Linux:

bash
$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.

1

Get the project

Clone the repository and create your local .env file. The .env file is ignored by Git; never commit it.

PowerShell:

powershell
git clone https://github.com/BOTOOM/devmentorai.git
Set-Location devmentorai
Copy-Item .env.example .env

macOS/Linux:

bash
git clone https://github.com/BOTOOM/devmentorai.git
cd devmentorai
cp .env.example .env
2

Start the container

If the npm backend is running, stop it first with devmentorai-server stop so port 3847 is free.

terminal
docker compose up -d --build backend
docker compose logs backend

The logs tell you which sign-in method is active. They name the token variable in use but never print its value.

3

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:

.env
$COPILOT_GITHUB_TOKEN=github_pat_your_token

Then apply it:

terminal
$docker compose up -d backend
  • Classic ghp_ tokens do not work with Copilot.
  • GH_TOKEN, GITHUB_TOKEN, and COPILOT_TOKEN are also accepted; COPILOT_GITHUB_TOKEN wins 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:

terminal
$docker compose exec backend copilot login

Open github.com/login/device, enter the code shown in the terminal, and approve access. Then restart the backend so it picks up the login:

terminal
$docker compose restart backend

The login is saved in the devmentorai-copilot volume, so it survives restarts, rebuilds, and updates.

4

Verify and connect the extension

Check that the backend is healthy and that Copilot is authenticated.

PowerShell:

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 5

macOS/Linux:

bash
curl -fsS http://127.0.0.1:3847/api/health
curl -fsS http://127.0.0.1:3847/api/account/auth

In 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.

5

Update, reset, and stay safe

Your sessions and your Copilot login live in Docker volumes, so updates keep them.

Update to the latest version:

update
git pull
docker compose up -d --build backend

Sign out or switch accounts by removing only the login volume (your chat data in devmentorai-data stays):

reset login
docker compose down
docker volume rm devmentorai-copilot
docker compose up -d backend

Keep it local

The port is published only on 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.