Skip to main content

Install & upgrade

npx @glassray/coach start needs no install. For a permanent glassray-coach command:
nvm users: global installs are per Node version - after nvm use on another version, reinstall (or install onto a system Node, e.g. Homebrew’s, to keep it everywhere). EACCES on install? Don’t sudo - point npm at a user prefix once: npm config set prefix ~/.npm-global, then add ~/.npm-global/bin to your PATH.
Installing is not the same as running: glassray-coach start runs the server in a foreground terminal - there’s no background service.

Server commands

glassray-coach mcp was removed in 0.2 - the CLI below is now the one agent surface. If you had it registered: claude mcp remove glassray, then glassray-coach init.

Data commands

Everything the dashboard can do, scriptable - and consumed by coding agents. The contract: stdout is the API’s JSON verbatim, human messages go to stderr, and exit codes are 0 (ok), 1 (API error), 2 (no Coach running). Run-starting verbs block and poll the run to completion (--no-wait to skip, --timeout <s> to bound); all take --port.

Loop verbs (harness & CI)

These verbs drive glassray.yaml - the portable artifact that holds your flows (rules + selectors), run recipes (run.command), and code root (codeRoot). pull/push round-trip the file, run executes its recipes, compare A/Bs the traffic they produce, and check gates CI on the whole rule suite.

LLM provider

Discovery, evals, flows, background classification, and replay need a model. Coach chooses one via GLASSRAY_LLM_PROVIDER:
Every analysis call is metered against GLASSRAY_LLM_BUDGET_USD (default $50; 0 = unlimited). The free mock / claude-subscription paths accrue $0 and are never blocked.
You don’t have to set env vars - the dashboard’s Settings page lets you pick the provider, the heavy/light model ids, and the budget from dropdowns. Those choices persist to disk (settings.json, chmod 0600) and override the environment. API keys stay in the environment, never in Settings.

Environment variables

Every setting has a working default - a fresh run needs none of these. Human-facing commands (the landing screen, start, status, init) print a one-line notice when a newer version is on npm - refreshed in the background at most once a day, with glassray-coach doctor doing the one live check. The check is a single HTTPS request to registry.npmjs.org containing only the package name, and it never runs from the server or the data commands - the egress guarantees for your trace data are unchanged.

Drive the whole loop from your coding agent

Coach ships its agent integration as a skill in the open Agent Skills format - one SKILL.md that works in Claude Code, OpenAI Codex, VS Code, and GitHub Copilot.

Install the skill

Pick whichever route fits how you manage skills - all three install the same file:
The zero-thought route, bundled with Coach. From the repo your agent lives in:
Installs to both standard locations - .agents/skills/ (the open standard: Codex, VS Code, Copilot) and .claude/skills/ (Claude Code) - idempotently; --force overwrites a locally edited copy.

What the skill does

The skill teaches the coding agent the full workflow over the CLI, server-first - flows and rules are created in the server (what the dashboard shows), and glassray.yaml is the committed snapshot: inventory the durable state first (flows list / evals list - flows persist across sessions, so nothing gets re-created), delegate flow discovery to Coach’s own code explorer (flows discover --code-root reads your source and writes flows + code-anchored rules straight into the server), review and tighten what it found, wire tracing and verify one trace end-to-end, snapshot with pull, and self-correct vague flow definitions with flows audit. It finishes with a coverage report - behaviours found vs instrumented vs skipped. Because every command emits stable JSON, what Claude sets up in one terminal session is exactly what the next session finds.
The easiest entry needs no typing at all: on an empty store, glassray-coach start and the dashboard’s empty state hand you a copy-paste onboarding prompt that drives this whole setup. And once flows and evals exist the loop stays closed on its own: Coach classifies new traffic in the background and auto-reruns each flow-bound eval once enough new member traces land (autorun is on by default; tune or disable it per rule) - apply a glassray-coach fix, send fresh traffic, and the reruns happen without you. glassray-coach evals run <id> forces one immediately.

Data & privacy

Everything lives under ~/.glassray (an embedded PGlite database + a local API key, chmod 0600). Coach binds 127.0.0.1 only and enforces a loopback guard on every route - nothing is uploaded, and there’s no account. To start fresh, glassray-coach reset --yes.