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.glassray-coach start runs the server in a foreground terminal - there’s no background service.
Server commands
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 are0 (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 driveglassray.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 viaGLASSRAY_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.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 - oneSKILL.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:- glassray-coach init
- npx skills
- Manual
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), andglassray.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.
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.