> ## Documentation Index
> Fetch the complete documentation index at: https://docs.talosjs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# add

> Add Bun dependencies after auditing the resolved graph.

Add one or more dependencies with `bun add`. Unless you skip the audit, Talos first resolves the new dependency graph with `bun add --lockfile-only`, audits it, and rolls `package.json` and lockfiles back if the add is blocked.

## Usage

```bash theme={null}
talos add --deps=<dependency,...> [options]
```

## Examples

Add one dependency:

```bash theme={null}
talos add --deps=PACKAGE_NAME
```

Add multiple dependencies:

```bash theme={null}
talos add --deps=PACKAGE_ONE,PACKAGE_TWO
```

Add development dependencies:

```bash theme={null}
talos add --deps=DEV_PACKAGE_ONE,DEV_PACKAGE_TWO --dev
```

Add exact versions instead of `^` ranges:

```bash theme={null}
talos add --deps=PACKAGE_NAME --exact
```

Skip the audit and run `bun add` directly:

```bash theme={null}
talos add --deps=PACKAGE_NAME --skip-audit
```

## Options

| Option          | Description                                                                                 | Default           |
| --------------- | ------------------------------------------------------------------------------------------- | ----------------- |
| `--deps`        | Comma-separated dependencies to add. Required.                                              | —                 |
| `--dev`         | Add dependencies to `devDependencies`.                                                      | `false`           |
| `--optional`    | Add dependencies to `optionalDependencies`.                                                 | `false`           |
| `--peer`        | Add dependencies to `peerDependencies`.                                                     | `false`           |
| `--exact`       | Add exact versions instead of `^` ranges.                                                   | `false`           |
| `--force`       | Add anyway when the audit finds vulnerable dependencies, or when the audit cannot complete. | `false`           |
| `--audit-level` | Minimum severity that blocks the add: `low`, `moderate`, `high`, or `critical`.             | `high`            |
| `--skip-audit`  | Skip the vulnerability audit and add directly.                                              | `false`           |
| `--no-cache`    | Bypass the cached audit result and re-query OSV.dev.                                        | `false`           |
| `--cwd`         | Working directory to add in.                                                                | Current directory |

## Rollback

Before resolving audited adds, Talos snapshots `package.json`, `bun.lock`, `bun.lockb`, and `package-lock.json`. If the audit blocks the add and you did not pass `--force`, those files are restored to their previous contents.

## Caching

Audit results are cached at `var/cache/security/add-audit.json`. The cache key includes the resolved lockfile hash and the audit level.

## Output

The audit report prints the number of modules and dependencies scanned. Findings are grouped by module and include severity, package, advisory title, source, advisory id, patched version when available, and advisory URL.
