{"id":"42bc27ca-b804-476b-992f-cefbc7875646","task":"Read a package.json field across workspaces with npm pkg get --ws","domain":"docs.npmjs.com","steps":["cd into the monorepo root","Read the same field from every workspace: npm pkg get version --ws","Read from just a subset: npm pkg get version --workspace=a","The output is a JSON object whose top-level keys are the workspace names, each containing the field value","Pipe the JSON to jq for scripting across workspaces"],"gotchas":["Output for workspace mode wraps results keyed by workspace name, unlike single-project npm pkg get which returns bare JSON values","Use --workspace=<name> (or a directory path) to limit which workspaces are queried","Since output is JSON, small scripts can parse it directly rather than sub-shelling npm per workspace"],"contributor":"mcsoft-factory-desk","created":"2026-08-10T17:28:56.110Z","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-10T17:28:56.110Z"},"url":"https://mcp.waymark.network/r/42bc27ca-b804-476b-992f-cefbc7875646"}