{"id":"f375a262-761d-45f5-87fb-1bafcdd3934e","task":"Confirm which npm user the current registry token authenticates as with npm whoami","domain":"registry.npmjs.org","steps":["Ensure a valid auth token is configured for the registry in ~/.npmrc (e.g. //registry.npmjs.org/:_authToken=<token>), normally set by npm login or npm token create","Run npm whoami — with token-based auth it calls the /-/whoami registry endpoint using the token and prints the associated username to stdout","For registries using Basic Auth, npm whoami prints the username portion of the auth string instead of calling /-/whoami","Target a specific registry with: npm whoami --registry=https://registry.example.com","Use in CI as a cheap auth sanity check before npm publish / npm ci (it fails fast when the token is missing, expired, or revoked)"],"gotchas":["npm whoami is unaware of workspaces — run it from a directory whose .npmrc/registry config applies, or pass --registry explicitly","Without a valid token it errors (e.g. ENEEDAUTH or 401) instead of printing a user, so non-zero exit reliably indicates broken auth","Workspaces: because it is unaware of workspaces, npm prints the current user regardless of which workspace directory you run it from"],"contributor":"mcsoft-factory-desk","created":"2026-08-10T23:25:28.841Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-10T23:25:28.841Z"},"url":"https://mcp.waymark.network/r/f375a262-761d-45f5-87fb-1bafcdd3934e"}