Installing LDF on macOS
December 26, 2025 · View on GitHub
For: Complete beginners and experienced users Time: 30-45 minutes What you'll install: Python 3.10+, pip, VS Code, Git, LDF
What You'll Need
Before starting, you'll need:
- A Mac running macOS 10.15 (Catalina) or later
- Administrator access (ability to install software)
- Internet connection
- About 2 GB of free disk space
Step 1: Install Python 3.10 or Later
Check if Python is Already Installed
Open Terminal:
- Press
Cmd + Spaceto open Spotlight - Type "Terminal" and press Enter
- A window with a command prompt will open
Type this command and press Enter:
python3 --version
If you see Python 3.10.0 or higher (like 3.11.5, 3.12.1):
- ✅ Python is already installed! Skip to Step 2.
If you see Python 3.9.x or lower, OR "command not found":
- Continue below to install Python.
Option A: Install Python from python.org (Recommended for Beginners)
-
Download Python:
- Visit: https://www.python.org/downloads/
- Click the yellow "Download Python 3.12.x" button (latest version)
- Save the
.pkgfile (about 25 MB)
-
Run the Installer:
- Double-click the downloaded
.pkgfile - Click Continue through the introduction
- Click Continue to accept the license
- Click Install (you may need to enter your Mac password)
- Wait for installation to complete (2-3 minutes)
- Click Close when finished
- Double-click the downloaded
-
Verify Installation: Open a new Terminal window (close and reopen Terminal), then run:
python3 --versionExpected output:
Python 3.12.1 -
Verify pip (Package Manager):
pip3 --versionExpected output:
pip 23.3.1 from /Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip (python 3.12)
Option B: Install Python via Homebrew (For Advanced Users)
What is Homebrew? A package manager for macOS that makes installing developer tools easier.
-
Install Homebrew (if you don't have it):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Follow the on-screen instructions. This takes 5-10 minutes.
-
Install Python:
brew install python@3.11 -
Verify:
python3 --version pip3 --version
Step 2: Install Visual Studio Code (Optional but Recommended)
What is VS Code? A free, beginner-friendly code editor from Microsoft. Not required, but makes editing LDF specs much easier.
Download and Install
-
Download VS Code:
- Visit: https://code.visualstudio.com/
- Click Download for macOS
- Save the
.zipfile (about 90 MB)
-
Install:
- Double-click the
.zipfile to extract it - Drag Visual Studio Code.app to your Applications folder
- Open Applications and double-click Visual Studio Code
- Double-click the
-
First Launch:
- macOS may show a security warning: "Visual Studio Code is an app downloaded from the Internet. Are you sure you want to open it?"
- Click Open
-
Install Terminal Integration (Important):
- In VS Code, press
Cmd + Shift + Pto open the Command Palette - Type:
shell command - Select: "Shell Command: Install 'code' command in PATH"
- You'll see: "Shell command 'code' successfully installed"
- In VS Code, press
-
Verify: In Terminal, run:
code --versionExpected output:
1.85.0 5c3e652f63e798a5ac2f31ffd0d863669328dc4c arm64
Step 3: Install Git (Optional but Recommended)
What is Git? Version control software that tracks changes to your code. Required if you want to clone LDF examples or use version control.
Check if Git is Already Installed
git --version
If you see git version 2.x.x:
- ✅ Git is already installed! Skip to Step 4.
If you see "command not found":
- Continue below.
Install Git
Option A: Install via Xcode Command Line Tools (Recommended)
-
Trigger Installation:
git --versionmacOS will prompt: "The 'git' command requires the command line developer tools. Would you like to install the tools now?"
-
Click "Install":
- This downloads about 500 MB
- Installation takes 5-10 minutes
- Click Agree to the license
-
Verify:
git --versionExpected output:
git version 2.39.2 (Apple Git-143)
Option B: Install via Homebrew
brew install git
Step 4: Install LDF
Now that Python and pip are installed, installing LDF is simple.
Basic Installation
pip3 install ldf
What's happening?
pip3is Python's package managerinstall ldfdownloads and installs the LDF CLI tool- This takes about 30 seconds
Expected output:
Collecting ldf
Downloading ldf-1.0.0-py3-none-any.whl (150 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 150.0/150.0 kB 2.5 MB/s eta 0:00:00
Collecting click>=8.0.0
Using cached click-8.1.7-py3-none-any.whl (97 kB)
[... more packages ...]
Installing collected packages: click, pyyaml, rich, jinja2, questionary, ldf
Successfully installed click-8.1.7 jinja2-3.1.2 ldf-1.0.0 pyyaml-6.0.1 questionary-2.0.1 rich-13.7.0
Verify LDF Installation
ldf --version
Expected output:
ldf version 1.0.0
✅ Success! LDF is installed and ready to use.
Optional: Install LDF Extras
LDF has optional features that require additional packages:
Install MCP Servers (for AI assistant integration with Claude, etc.):
pip3 install ldf[mcp]
Install Automation Features (for ChatGPT/Gemini API-based audits):
pip3 install ldf[automation]
Install S3 Support (for uploading coverage reports to AWS S3):
pip3 install ldf[s3]
Install All Extras:
pip3 install ldf[mcp,automation,s3]
Step 5: Verify Everything Works
Run the LDF doctor command to check your installation:
ldf doctor
Expected output (healthy system):
LDF Installation Health Check
=============================
Python version: 3.12.1 ✓
pip version: 23.3.1 ✓
LDF version: 1.0.0 ✓
Optional components:
MCP servers: Not installed
Automation: Not installed
S3 support: Not installed
All core components are working correctly!
Troubleshooting
Issue: "pip3: command not found"
Cause: pip wasn't installed with Python, or PATH is incorrect.
Solution 1 - Reinstall pip:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py --user
Solution 2 - Add pip to PATH:
Add this line to ~/.zshrc (or ~/.bash_profile if using bash):
export PATH="$HOME/Library/Python/3.12/bin:$PATH"
Then reload your shell:
source ~/.zshrc
Issue: "ldf: command not found" after installation
Cause: pip installed LDF to a directory not in your PATH.
Solution:
-
Find where pip installed LDF:
pip3 show ldfLook for the "Location:" line, for example:
Location: /Users/yourname/Library/Python/3.12/lib/python/site-packages -
The
ldfcommand is in thebindirectory relative to this. Add to PATH:export PATH="$HOME/Library/Python/3.12/bin:$PATH" -
Add this line to
~/.zshrc(or~/.bash_profile) to make it permanent:echo 'export PATH="$HOME/Library/Python/3.12/bin:$PATH"' >> ~/.zshrc source ~/.zshrc -
Verify:
ldf --version
Issue: Permission denied when running pip3 install
Cause: Trying to install into system Python directories.
Solution: Install for your user only:
pip3 install --user ldf
Issue: Python 3.9 or older is installed
Cause: Your Mac came with an older Python version.
Solution: Install Python 3.10+ using Option A or Option B above. The new version will coexist with the old one.
After installation, verify you're using the new version:
python3 --version # Should show 3.10+
which python3 # Should show /Library/Frameworks/Python.framework/... or /opt/homebrew/bin/python3
Issue: VS Code's Terminal shows "command not found" for commands that work in regular Terminal
Cause: VS Code is using a different shell or hasn't loaded your PATH updates.
Solution:
- Quit VS Code completely (Cmd+Q)
- Reopen VS Code
- Open a new Terminal in VS Code (Terminal → New Terminal)
- Try your command again
If still not working, verify your shell:
echo $SHELL
If it says /bin/bash, edit ~/.bash_profile instead of ~/.zshrc.
If it says /bin/zsh, edit ~/.zshrc.
Next Steps
Now that LDF is installed:
- Complete Beginners: Continue to Your First LDF Spec
- Experienced Users: Jump to 5-Minute Quickstart
- Need Help?: See Troubleshooting Guide
Summary of What You Installed
| Tool | Purpose | Required? |
|---|---|---|
| Python 3.10+ | Run LDF and Python-based tools | ✅ Required |
| pip | Install Python packages | ✅ Required (included with Python) |
| VS Code | Edit LDF spec files | ⭐ Recommended |
| Git | Version control, clone examples | ⭐ Recommended |
| LDF | The LDF framework itself | ✅ Required |
Total disk space used: ~1.5 GB