Documentation menu

Commands

flog add

Add dependencies, update the lock, and install the new graph.

Usage#

flog add [options] <package-specifier ...>

Examples#

flog add primate
flog add --dev typescript
flog add --force fflate@0.7.3

Options and behaviour#

The default dependency field is dependencies. Use --dev (-D) or --optional (-O) to select another field. Successful changes update package.json and flog.lock, then install the resulting exact graph.

The final proposed graph is checked for advisories before either file changes. Newly affected exact package identities block the transaction; retained findings are warned. --force explicitly accepts complete known findings, but does not bypass incomplete advisory coverage. It never inserts an override or applies a fix.

Install controls include --offline, --cache, --ignore-scripts, and --strict. Run flog help add for complete current help.

Managing dependencies · Vulnerability audit policy · Remove · Upgrade