Installation
Get SEO Machine running in your environment with this comprehensive installation guide.Prerequisites
Before you begin, ensure you have:Claude Code
Claude Code installed and configured
Python 3.8+
Python 3.8 or higher for analysis modules
Anthropic API Account
Active Anthropic API account for Claude Code
Git
Git for cloning the repository
Step 1: Clone the Repository
Clone the SEO Machine repository to your local machine:Replace
[your-username] with the actual GitHub username or organization hosting the repository.Step 2: Install Python Dependencies
SEO Machine includes powerful Python analysis modules that require several packages. Install them using pip:What Gets Installed
The requirements file includes:Google Analytics & Search Console
Google Analytics & Search Console
google-analytics-data>=0.18.0google-auth>=2.23.0google-auth-oauthlib>=1.1.0google-api-python-client>=2.100.0
Data Analysis
Data Analysis
pandas>=2.1.0numpy>=1.24.0scikit-learn>=1.3.0
NLP & Text Analysis
NLP & Text Analysis
textstat>=0.7.3nltk>=3.8.0
Web Scraping
Web Scraping
beautifulsoup4>=4.12.0lxml>=4.9.0requests>=2.31.0
Configuration & Utilities
Configuration & Utilities
python-dotenv>=1.0.0diskcache>=5.6.0markdown>=3.5.0
Step 3: Open in Claude Code
Open the SEO Machine workspace in Claude Code:If
claude-code command is not found, ensure Claude Code is properly installed and added to your PATH.Step 4: Directory Structure Verification
Verify that all required directories exist. SEO Machine should have this structure:Step 5: Configure API Integrations (Optional)
SEO Machine can integrate with external data sources for enhanced capabilities. These integrations are optional but recommended for data-driven content strategy.Google Analytics 4
Create Service Account
- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable the Google Analytics Data API
- Navigate to APIs & Services > Credentials
- Create a Service Account
- Download the JSON key file
Grant Access
- Open your GA4 property
- Go to Admin > Property Access Management
- Add the service account email (from JSON file)
- Grant Viewer role
Google Search Console
Grant Access
- Open Google Search Console
- Select your property
- Go to Settings > Users and permissions
- Add the service account email
- Grant Full permission
DataForSEO
Sign Up
Create an account at DataForSEO
Create Environment File
Create a.env file in data_sources/config/ with your credentials:
data_sources/config/.env:
Test API Connectivity
Verify your API integrations are working:Step 6: WordPress Integration (Optional)
To publish directly to WordPress from SEO Machine:Install MU Plugin
Copy This plugin exposes Yoast SEO fields via the WordPress REST API.
wordpress/seo-machine-yoast-rest.php to your WordPress site:Add Functions Snippet
Add the code from
wordpress/functions-snippet.php to your theme’s functions.php file.Create Application Password
- In WordPress admin, go to Users > Your Profile
- Scroll to Application Passwords
- Create a new application password
- Copy the generated password
wordpress/README.md for detailed setup instructions.
Verification
Verify your installation is complete:Check Python Dependencies
Check Python Dependencies
Verify Directory Structure
Verify Directory Structure
Test Claude Code Commands
Test Claude Code Commands
In Claude Code, type
/ to see available commands. You should see:/research/write/optimize/analyze-existing- And more…
Troubleshooting
Python dependencies fail to install
Python dependencies fail to install
Issue: Error installing packages from requirements.txtSolution:
- Ensure Python 3.8+ is installed:
python --version - Upgrade pip:
pip install --upgrade pip - Install packages individually to identify the problem
- Check for system dependencies (some packages require compilers)
Claude Code commands not appearing
Claude Code commands not appearing
Issue: Slash commands don’t show up in Claude CodeSolution:
- Ensure you opened Claude Code from the repository root directory
- Check that
.claude/commands/directory exists with.mdfiles - Restart Claude Code
- Verify Claude Code is up to date
API authentication errors
API authentication errors
Issue: Google Analytics or Search Console API calls failSolution:
- Verify the service account JSON file exists at the specified path
- Check that the service account has been added to GA4/GSC with correct permissions
- Ensure the property ID and site URL in
.envare correct - Run
python3 test_dataforseo.pyto test connectivity
Module import errors
Module import errors
Issue: Python scripts fail with “ModuleNotFoundError”Solution:
- Activate your virtual environment if using one
- Reinstall requirements:
pip install -r data_sources/requirements.txt - Check that you’re running scripts from the repository root
- Verify Python path includes the repository directory
Next Steps
With SEO Machine installed, you’re ready to configure your context files and create your first article.Configuration
Set up brand voice, style guide, and SEO guidelines
Quick Start
Create your first SEO-optimized article in 10 minutes