Files
grok-glance/commands/glance.md
T
iceBear67andClaude Opus 5 3cfa011d0c Ship prebuilt, so a git URL is the whole install
Grok Build loads plugins out of ~/.grok/plugins/ and clones marketplace sources
straight from git; it never runs npm install or a build for you. So a plugin that
ships TypeScript is a plugin you have to build by hand before it does anything,
and the SessionStart hook's first act is to print "not built yet".

dist/ is now committed, and the tree is arranged so that a bare clone can run:

- The daemon is bundled to a single ESM file with rolldown, platform node. Its one
  runtime dependency (@simplewebauthn/server, plus the asn1/cbor tree under it) is
  inlined; the only imports left in the output are node: builtins. Not minified —
  a committed blob nobody can read is worse than no committed blob.
- tsc no longer emits for the server, it only typechecks (noEmit). rolldown emits.
- dist/web was already a self-contained static bundle.
- The hook scripts under bin/ were stdlib-only from the start.

.grok-plugin/marketplace.json makes the repo its own one-entry catalog with a local
source of "./", so `grok plugin marketplace add <git-url>` followed by
`grok plugin install grok-glance` works without pinning a SHA of itself.

`npm run check:dist` rebuilds and fails if the committed output is stale — the one
real hazard of checking in build output.

Also drops the daemon's "non-default port, run `glance sync-hooks`" startup note,
which the previous commit should have taken with the rest of that scheme; the hook
scripts read config.json themselves, so a non-default port needs nothing.

The e2e suite now takes GLANCE_ROOT and was run twice: once against the repo, once
against a copy containing only tracked files plus dist/ and no node_modules — which
is what actually demonstrates the claim, passkey registration and assertion
included. 233 checks, both runs green.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-09 07:32:49 +00:00

1.5 KiB

description, argument-hint
description argument-hint
Set up or control the grok-glance phone dashboard (status, enrol a device, approval policy)
status | up | stop | enroll | set-origin <url> | devices | revoke <id> | approval off|risky|all | logs

Run the grok-glance CLI and report the result plainly.

The CLI lives at $GROK_PLUGIN_ROOT/bin/glance. The user asked for: $ARGUMENTS

If no argument was given, treat it as status.

Then:

  1. Run node "$GROK_PLUGIN_ROOT/bin/glance" $ARGUMENTS.
  2. The plugin ships prebuilt, so this should just work. If it does say the plugin is not built, dist/ is missing from the checkout: run npm install && npm run build in $GROK_PLUGIN_ROOT (a minute or two) and try again.
  3. Report what came back. For enroll, show the URL and the code verbatim — the user needs to type them on their phone, so do not paraphrase or reformat them.
  4. If the output mentions that no public origin is configured, explain the Tailscale Serve setup: tailscale serve --bg 127.0.0.1:8791, then node "$GROK_PLUGIN_ROOT/bin/glance" set-origin https://<box>.<tailnet>.ts.net.

For anything beyond running the command — troubleshooting a failed passkey prompt, explaining the approval modes, or a first-time setup — read the glance skill and follow it.

Do not change the approval policy unless that is what was asked. Warn before running set-origin on a setup that already has devices enrolled: the RP ID changes and existing passkeys stop working.