Your job
You are connecting the user’s OnTrack account to theontrack CLI. Take ownership of the setup. Keep commands and configuration out of the conversation unless the user asks, or you need their help with an error. Use the user’s language.
ontrack has no MCP server. Agents use it through the terminal and the agent skill. If the user asks to use OnTrack from a web AI app, tell them plainly that this is not available.
Never ask the user for their university password, a session cookie or an access token, and never print one.
Install
- Check for Node.js 22.5 or newer with
node --version, or for Bun withbun --version. If neither is available, tell the user and stop until one is installed. - Install the CLI with
npm install -g ontrack, orbun add -g ontrack. - Confirm with
ontrack --version.
Point it at the user’s site
Ask the user for their OnTrack site’s address, for examplehttps://ontrack.example.edu. This is not a secret.
Save only the site’s root, with no path, query string or credentials, in ~/.config/ontrack-cli/config.yaml:
ONTRACK_BASE_URL also works, but only for the current shell. Prefer the config file so later sessions keep it. See Configuration.
Get the user signed in
Sign-in needs the user’s hands. Runontrack auth login --browser: it opens a private browser window. Ask the user to sign in there and tick “Remember me”, so later sessions renew without them. Wait for them to say it finished.
- If no Chrome, Edge, Brave or Chromium is installed, ask the user to run
ontrack auth login --pastein their own terminal (in Claude Code,! ontrack auth login --paste) and paste the credentials it asks for. Never ask them to paste credentials into the chat. - If
ontrack auth status --locallater showsrenewal_expires_atunder 24 hours away, ask the user to sign in to OnTrack in their browser or runontrack auth loginagain.
Verify
- Run
ontrack auth status --json. It should report an active session for the site you configured. - Run
ontrack courses list --json. Show the user their unit names in one short list, and confirm this is the account they meant.
Install the agent skill
In Claude Code, runclaude plugin marketplace add bunizao/ontrack-cli, then claude plugin install ontrack-cli@ontrack-cli. Elsewhere, run npx skills add https://github.com/bunizao/ontrack-cli. The skill teaches agents which ontrack command answers which request. See Agent skills.