Cli
Add Dependencies
Add dependencies to a specific app in your Zodula monorepo
Overview
The nailgun add command allows you to add dependencies to a specific app within your Zodula monorepo. This command provides an interactive way to select the target app and install packages using Bun.
Usage
nailgun add <packages...> [options]Arguments
<packages...>- One or more package names to install
Options
-a, --app <app>- Specify the target app name (e.g., zodula, onlyagents)-D, --dev- Install as a development dependency-P, --peer- Install as a peer dependency
Examples
Add a production dependency
# Add a single package
nailgun add react
# Add multiple packages
nailgun add react react-dom @types/react
# Add to a specific app
nailgun add express --app zodulaAdd development dependencies
# Add as dev dependency
nailgun add -D typescript @types/node
# Add as dev dependency to specific app
nailgun add -D jest --app onlyagents --devAdd peer dependencies
# Add as peer dependency
nailgun add -P react react-domInteractive Mode
If you don't specify the --app option, the command will prompt you to select from available apps:
nailgun add lodash
# ? Select an app to add dependencies to: (Use arrow keys)
# ❯ zodula (/path/to/zodula)
# onlyagents (/path/to/onlyagents)How It Works
- App Discovery: The command scans your monorepo for available apps
- App Selection: Either uses the specified
--appoption or prompts for selection - Dependency Installation: Runs
bun addin the target app's directory - Verification: Confirms successful installation or reports errors
Notes
- The command uses Bun as the package manager
- All dependency types (production, development, peer) are supported
- The command automatically changes to the target app's directory before running
bun add - If the specified app doesn't exist, the command will list available apps and exit with an error
Zodula