DevEx LogoMy App
CLI Reference

devex add & remove

Add and remove applications from your development environment

devex add & remove

The add and remove commands allow you to dynamically modify your development environment by adding new applications or removing existing ones. These commands provide both interactive and non-interactive modes for managing your software installations.

devex add

Add new applications to your development environment configuration and optionally install them immediately.

Usage

devex add [application...] [flags]

Options

FlagShortTypeDefaultDescription
--install-iboolfalseInstall immediately after adding to config
--category-cstringFilter applications by category
--search-sstringSearch applications by name or description
--interactivebooltrueUse interactive selection mode
--force-fboolfalseAdd even if already configured
--dry-run-nboolfalseShow what would be added without executing

Interactive Mode

When run without arguments, devex add launches an interactive application browser:

Application Browser

Navigate through available applications with filtering and search:

Select Applications to Add

❯ Docker - Container platform for developers
  VS Code - Lightweight code editor
  Postman - API development and testing
  Node.js - JavaScript runtime environment  
  PostgreSQL - Advanced open source database
  Redis - In-memory data structure store

Use arrow keys to navigate, / to search, enter to select

Application Details

View detailed information about selected applications:

Docker - Container platform for developers

Category: Development Tools
Install Method: apt (with official repository)
Dependencies: curl, gnupg
Platform Support: Linux, macOS, Windows

Description:
Docker enables you to separate your applications from your 
infrastructure so you can deliver software quickly.

Add to configuration? [Y/n]

Configuration Update

Applications are added to your configuration with confirmation:

✓ Added Docker to configuration
✓ Added VS Code to configuration
✓ Added Postman to configuration

3 applications added to ~/.devex/applications.yaml

Install now? [Y/n]

Non-Interactive Mode

Add specific applications directly:

# Add and install Docker
devex add docker --install

# Add to config only (install later)
devex add docker

# Force add even if already configured
devex add docker --force

Application Categories

Development Tools

Essential development utilities like Git, Docker, VS Code, and terminal tools

Programming Languages

Language runtimes managed via mise (Node.js, Python, Go, Ruby, etc.)

Databases

Development databases like PostgreSQL, MySQL, Redis, and SQLite

Optional Applications

Productivity apps, browsers, communication tools, and specialized software

Examples

# Interactive browsing
devex add

# Add specific development tools
devex add git docker vscode

# Add database stack
devex add postgresql redis --install

# Browse and add from category
devex add --category databases

# Search and add
devex add --search "api testing"

# Preview additions
devex add docker kubernetes --dry-run

devex remove

Remove applications from your development environment configuration with intelligent dependency checking.

Usage

devex remove [application...] [flags]

Options

FlagShortTypeDefaultDescription
--uninstall-uboolfalseUninstall from system after removing from config
--force-fboolfalseRemove even if other apps depend on it
--backup-bbooltrueCreate backup before removal
--interactivebooltrueUse interactive selection mode
--dry-run-nboolfalseShow what would be removed without executing

Dependency Safety

DevEx automatically analyzes dependencies before removal to prevent breaking your environment. Applications with dependents are marked with warnings and require explicit confirmation.

Interactive Mode

The interactive remove mode shows dependency information and removal risks:

Application Selection

Select Applications to Remove

❯ Slack - Team collaboration platform
  Chrome - Web browser (Required by: Postman, VS Code)
  Docker - Container platform (Required by: docker-compose, kubectl)
  Node.js - JavaScript runtime (Required by: npm packages)
  PostgreSQL - Database system

⚠️ Items marked with dependencies require careful consideration

Dependency Analysis

Remove Docker?

⚠️ Warning: The following applications depend on Docker:
- docker-compose (Docker Compose orchestration)
- kubectl (Kubernetes CLI - uses Docker for local clusters)
- VS Code (Docker extension functionality)

Removal Risks:
- Local Kubernetes development may break
- Container-based projects will not work
- VS Code Docker features will be disabled

Proceed with removal? [y/N]

Removal Confirmation

Removal Summary:
✓ Slack - Safe to remove (no dependencies)
⚠ Docker - Will affect 3 dependent applications

Create backup before removal? [Y/n]
Uninstall from system? [y/N]

Proceed? [y/N]

Non-Interactive Mode

Remove applications directly with safety checks:

# Remove application (config only)
devex remove slack

# Remove multiple applications
devex remove slack chrome postman

# Preview removal
devex remove docker --dry-run

Dependency Management

DevEx analyzes three types of dependencies:

Direct Dependencies

Applications that explicitly require the target application:

applications:
  development:
    - name: docker-compose
      dependencies:
        - docker  # Direct dependency

System Dependencies

Applications that rely on system-level integration:

kubectl → docker (for local Kubernetes clusters)
VS Code → git (for version control features)
npm packages → node (runtime requirement)

Optional Dependencies

Applications that enhance functionality but aren't required:

Postman → Chrome (for OAuth flows, optional)
VS Code → Python (for Python development, optional)

Removal Strategies

Conservative Removal: Only remove applications with no dependencies

# Check what's safe to remove
devex remove --dry-run --safe-only

# Remove only applications without dependents
devex remove slack postman chrome

Configuration Impact

Both add and remove commands modify your configuration files:

File Modifications

# Before: ~/.devex/applications.yaml
applications:
  development:
    - name: git
    - name: docker

# After: devex add vscode
applications:
  development:
    - name: git
    - name: docker
    - name: vscode
      description: 'Lightweight code editor'
      category: 'Development Tools'
      default: false
      added_date: '2024-08-17T14:30:00Z'
      added_by: 'user'

Undo Support

Both commands support undo operations:

# View recent changes
devex config undo list

# Undo last add operation
devex config undo last

# Undo specific operation
devex config undo operation "add docker vscode"

# Undo with confirmation
devex config undo operation 3 --confirm

Advanced Usage

Custom Application Definitions

Add custom applications not in the default catalog:

# Add custom application with definition
devex add custom-tool --define \
  --name="Custom Tool" \
  --description="My custom development tool" \
  --install-method="curlpipe" \
  --install-command="https://example.com/install.sh"

# Add from custom configuration file
devex add --from-file ./my-custom-apps.yaml

Bulk Operations

Perform operations on multiple applications:

# Add entire development stack
devex add @full-stack  # Uses predefined template

# Remove development tools except essentials
devex remove --category development --except git,curl

# Add applications matching pattern
devex add "*code*"  # Adds vscode, code-server, etc.

# Remove unused applications
devex remove --cleanup --unused

Integration with Templates

Add/remove commands work with configuration templates:

# Add applications from template
devex template apply backend-team
devex add --from-template backend-team

# Remove applications not in template
devex remove --not-in-template backend-team

# Sync with team template (add missing, remove extra)
devex add --sync-template backend-team

Troubleshooting

# Application not found
devex add nonexistent-app
# Error: Application 'nonexistent-app' not found
# Use: devex list to see available applications

# Check available applications
devex list --search app-name

# Update application catalog
devex list --refresh

Best Practices

Application Management Best Practices:

  1. Always backup before removing critical applications
  2. Check dependencies before removal
  3. Use dry-run to preview changes
  4. Keep configurations in version control
  5. Document custom applications for team sharing

Plan Changes

devex add docker vscode --dry-run

Create Backup

devex config backup create --name "before-dev-tools"

Apply Changes

devex add docker vscode --install

Verify Results

devex status

Test Environment

docker --version
code --version

The add and remove commands are the primary way to customize your development environment after initial setup. They provide the flexibility to adapt your environment as your needs change.

On this page