Skip to main content

Bash Script Installation (macOS)

For macOS users, we provide a convenient bash script that handles the entire installation process automatically, including Node.js installation if needed.

One-Command Installation

The easiest way to install Desktop Commander on macOS:
Only run scripts from trusted sources. You can review the installation script at the GitHub repository before running it.

What the Script Does

The bash installer automatically handles:

Prerequisites Check

Verifies system requirements and installs missing components

Node.js Installation

Installs Node.js using Homebrew if not already present

Desktop Commander Setup

Downloads and configures Desktop Commander with optimal settings

Claude Integration

Automatically updates your Claude Desktop configuration

Prerequisites

The script will check for and install if needed:
  • Claude Desktop (you should install this manually first)
  • Claude Pro or Max subscription (required for Desktop Commander)
  • Homebrew (installed automatically if missing)
  • Node.js (installed via Homebrew if missing)

Installation Process

1

Open Terminal

Press Cmd + Space, type “Terminal”, and press Enter
2

Run Installation Command

Copy and paste the installation command:
3

Follow Interactive Prompts

The script will guide you through:
  • System requirements check
  • Component installation confirmations
  • Security settings selection
  • Configuration verification
4

Restart Claude Desktop

Close Claude Desktop completely and reopen it

Script Output Example

Here’s what you’ll see during installation:

What Gets Installed

The bash script installs and configures:

System Components

  • Homebrew (if not already installed)
  • Node.js (via Homebrew if not present)
  • Desktop Commander (latest stable version)

Configuration Files

  • Claude Desktop config updated with Desktop Commander settings
  • Security defaults configured for safe usage
  • Auto-update enabled for future versions

Default Security Settings

  • Directory access: Limited to home directory and common work folders
  • Command blocking: Dangerous system commands blocked by default
  • Process isolation: Each terminal session runs separately

Customizing the Installation

Security Levels

The script offers different security configurations:

Installation Location

Default locations work for most users, but you can customize:

Intel vs Apple Silicon Macs

The script works on both architectures:
Homebrew Location: /opt/homebrewNode.js: Native ARM64 binaries for optimal performanceCompatibility: Full native support, no Rosetta requiredPerformance: Excellent performance with native ARM64 compilation
Before running the script, you can review it:

Script Safety Features

The installation script includes several safety measures:

Permission Checks

  • Never requests or uses sudo unnecessarily
  • Validates file permissions before making changes
  • Creates backups of existing configurations
  • Provides rollback options if installation fails

Error Handling

  • Comprehensive error checking at each step
  • Automatic cleanup on installation failure
  • Clear error messages with suggested solutions
  • Graceful handling of network interruptions

System Integrity

  • No modification of system files
  • User-space installation only
  • Preserves existing configurations when possible
  • Easy uninstallation process

Troubleshooting Bash Installation

This can happen on systems with restrictions:
  1. Check your internet connection
  2. Ensure you have admin privileges (for Homebrew)
  3. Try installing Homebrew manually first
  4. Check for corporate firewall restrictions
If Node.js installation via Homebrew fails:
  1. Update Homebrew: brew update
  2. Try manual Node.js installation from nodejs.org
  3. Check available disk space
  4. Restart terminal after installation
The script expects Claude Desktop to be installed:
  1. Install Claude Desktop from claude.ai/download
  2. Run Claude Desktop at least once to create config
  3. Verify config location: ~/Library/Application Support/Claude/
  4. Check for non-standard Claude installation paths
Usually related to file permissions:
  1. Ensure you own your home directory files
  2. Don’t run the script with sudo
  3. Check Claude Desktop app permissions
  4. Verify disk permissions with Disk Utility

Post-Installation Verification

After running the bash installer:
1

Verify Node.js

Should show version numbers for both
2

Check Claude Configuration

Should contain Desktop Commander configuration
3

Test Desktop Commander

Open Claude Desktop and try:

Updating via Bash Script

The bash script can also be used for updates:
This will:
  • Update Desktop Commander to the latest version
  • Preserve your existing configuration
  • Update system dependencies if needed
  • Verify the update was successful

Comparison with Other Methods

Next Steps

Quick Start

Learn how to use Desktop Commander with practical examples

Security Settings

Review and customize your security configuration

macOS Tips

Discover macOS-specific use cases and workflows

Community

Join other macOS users in our Discord community