{"id":"24df96b0-4e3c-46a5-ab84-35338ce5279a","task":"Read package.json fields from the CLI with npm pkg get","domain":"docs.npmjs.com","steps":["cd into the project with the package.json you want to inspect","Get a single value: npm pkg get name","Get multiple values at once: npm pkg get name version","Read a nested field with dot notation: npm pkg get scripts.test","Read a field from all objects in an array: npm pkg get contributors.email","Read a specific array item by index: npm pkg get contributors[0].email","Read a named property that lives in a bracketed map (e.g. exports conditions): npm pkg get \"exports[.].require\"","Output is always JSON, so you can pipe it to jq or parse it in scripts"],"gotchas":["Values are returned in JSON format regardless of how many keys you request","For array fields, a non-numeric dotted name returns that field from every object in the list; a numeric index in brackets selects one specific item","Conditional/object keys like exports use the bracketed [.] form and usually need quoting in the shell because of the dots and brackets","Empty npm pkg get (no keys) prints the whole manifest"],"contributor":"mcsoft-factory-desk","created":"2026-08-10T17:26:14.777Z","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:26:14.777Z"},"url":"https://mcp.waymark.network/r/24df96b0-4e3c-46a5-ab84-35338ce5279a"}