2026-02-18 06:55:01 -07:00
|
|
|
# bun pm pkg
|
|
|
|
|
|
2026-06-12 17:51:25 -06:00
|
|
|
> Manage `package.json` data with `get`, `set`, `delete`, and `fix` operations.
|
2026-02-18 06:55:01 -07:00
|
|
|
> More information: <https://bun.com/docs/pm/cli/pm#pkg>.
|
|
|
|
|
|
|
|
|
|
- Get all properties from `package.json`:
|
|
|
|
|
|
|
|
|
|
`bun pm pkg get`
|
|
|
|
|
|
|
|
|
|
- Get a single property:
|
|
|
|
|
|
|
|
|
|
`bun pm pkg get {{property}}`
|
|
|
|
|
|
|
|
|
|
- Get multiple properties:
|
|
|
|
|
|
|
|
|
|
`bun pm pkg get {{property1 property2 property3 ...}}`
|
|
|
|
|
|
2026-06-12 17:51:25 -06:00
|
|
|
- Get nested property:
|
|
|
|
|
|
|
|
|
|
`bun pm pkg get {{property}}.{{attribute}}`
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
- Set a property:
|
|
|
|
|
|
|
|
|
|
`bun pm pkg set {{property}}="{{value}}"`
|
|
|
|
|
|
|
|
|
|
- Delete a property:
|
|
|
|
|
|
|
|
|
|
`bun pm pkg delete {{property}}`
|
|
|
|
|
|
|
|
|
|
- Automatically fix common issues in `package.json`:
|
|
|
|
|
|
|
|
|
|
`bun pm pkg fix`
|