AI-powered WordPress content management framework with precision editing capabilities.
- 🚀 Simple CLI - Intuitive commands with helpful prompts
- ⚡ Fast - Auto-parallel mode for bulk operations (10x faster)
- 🎯 Precise - Line-specific and occurrence-specific text replacements
- 🔒 Safe - Auto-backup, preview mode, dry-run capabilities
- 🌐 Multi-Server - Manage multiple WordPress installations
- 📝 Smart - Auto-detects file formats and optimal settings
- 🔑 SSH Config Support - Use
~/.ssh/confighost aliases for simplified connection management - 🔧 WP-CLI Auto-Installer - One-command WP-CLI installation with automatic OS detection (Ubuntu, Debian, CentOS, RHEL, Fedora, Alpine, macOS)
- 🔍 WordPress Auto-Detection - Automatically find WordPress installations on your server with multiple search strategies
- ⚡ UV Package Manager - 10-100x faster dependency management with modern tooling
- 🛡️ Enhanced Error Handling - Helpful error messages with installation instructions and troubleshooting
- 📊 Installation Verification - Automatic checks for WP-CLI and WordPress validity on startup
# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh
# Clone and install
git clone https://github.com/MervinPraison/praisonaiwp
cd praisonaiwp
uv sync
# Run commands
uv run praisonaiwp initpip install praisonaiwp
# Or install from source
git clone https://github.com/MervinPraison/praisonaiwp
cd praisonaiwp
pip install -e .praisonaiwp init💡 Pro Tips:
- Use SSH config alias (e.g.,
wp-prod) - connection details loaded automatically! - Press Enter for WordPress path - auto-detection will find it for you
- PHP binary is auto-detected, or specify for Plesk:
/opt/plesk/php/8.3/bin/php
🔑 SSH Config Support:
PraisonAIWP automatically reads from ~/.ssh/config. If you have multiple hosts configured:
# ~/.ssh/config
Host wp-prod
HostName production.example.com
User prod_user
IdentityFile ~/.ssh/id_prod
Host wp-staging
HostName staging.example.com
User staging_user
IdentityFile ~/.ssh/id_staging
Host wp-dev
HostName localhost
User dev_user
Port 2222
IdentityFile ~/.ssh/id_devJust enter the host alias (e.g., wp-prod, wp-staging, or wp-dev) when prompted for hostname, and PraisonAIWP will automatically load all connection details from your SSH config!
Choosing Between Multiple Configs:
- Each host alias is independent
- Use
--serverflag to specify which server to use:praisonaiwp create "Post" --server production praisonaiwp create "Post" --server staging
- Configure multiple servers in
~/.praisonaiwp/config.yaml:servers: production: hostname: wp-prod # SSH config alias wp_path: /var/www/html staging: hostname: wp-staging # SSH config alias wp_path: /var/www/staging
This will prompt you for:
- Server hostname - Can be IP, hostname, or SSH config alias (e.g.,
wp-prod) - SSH username - Auto-loaded from SSH config if using alias
- SSH key path - Auto-loaded from SSH config if using alias
- WordPress path - Press Enter to auto-detect, or specify manually
- PHP binary - Auto-detected, or specify custom path
If WP-CLI is not installed on your server:
# Automatically detect OS and install WP-CLI
praisonaiwp install-wp-cli -y
# Install with dependencies (curl, php)
praisonaiwp install-wp-cli --install-deps -y
# Custom installation path
praisonaiwp install-wp-cli --install-path /usr/bin/wp
# For Plesk servers
praisonaiwp install-wp-cli --php-bin /opt/plesk/php/8.3/bin/php -ySupported Operating Systems:
- ✅ Ubuntu (18.04, 20.04, 22.04, 24.04)
- ✅ Debian (9, 10, 11, 12)
- ✅ CentOS (7, 8, 9)
- ✅ RHEL (7, 8, 9)
- ✅ Fedora (35+)
- ✅ Alpine Linux
- ✅ macOS (with Homebrew)
What it does:
- Detects your server's operating system
- Downloads WP-CLI from official source
- Tests the download
- Makes it executable
- Installs to system path
- Verifies installation
- Updates your config automatically
If you don't know your WordPress installation path:
# Find all WordPress installations
praisonaiwp find-wordpress
# Interactive selection from multiple installations
praisonaiwp find-wordpress --interactive
# Find and update config automatically
praisonaiwp find-wordpress --update-config
# Find on different server
praisonaiwp find-wordpress --server stagingSearch Strategies:
- Searches for
wp-config.phpin common directories - Checks predefined paths (
/var/www/html,/var/www/vhosts/*/httpdocs, etc.) - Verifies each installation (wp-config, wp-content, wp-includes)
- Extracts WordPress version
- Interactive selection for multiple installations
Example Output:
✓ Found 2 WordPress installation(s)
┏━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ # ┃ Path ┃ Version ┃ Components ┃
┡━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ 1 │ /var/www/html │ 6.4.2 │ config, content, includes│
│ 2 │ /var/www/vhosts/example.com/httpdocs│ 6.3.1 │ config, content, includes│
└───┴─────────────────────────────────────┴─────────┴─────────────────────────┘
# Single post
praisonaiwp create "My Post Title" --content "Post content here"
# From file (auto-detects JSON/YAML/CSV)
praisonaiwp create posts.json
# Create 100 posts (automatically uses parallel mode!)
praisonaiwp create 100_posts.json# Update all occurrences
praisonaiwp update 123 "old text" "new text"
# Update specific line only
praisonaiwp update 123 "old text" "new text" --line 10
# Update 2nd occurrence only
praisonaiwp update 123 "old text" "new text" --nth 2
# Preview changes first
praisonaiwp update 123 "old text" "new text" --preview# Find in specific post
praisonaiwp find "search text" 123
# Find across all posts
praisonaiwp find "search text"
# Find in pages
praisonaiwp find "search text" --type page# List all posts
praisonaiwp list
# List pages
praisonaiwp list --type page
# List drafts
praisonaiwp list --status draft[
{
"title": "Post Title",
"content": "<p>Post content</p>",
"status": "publish",
"type": "post"
}
]- title: Post Title
content: <p>Post content</p>
status: publish
type: posttitle,content,status,type
"Post Title","<p>Post content</p>",publish,postConfiguration is stored in ~/.praisonaiwp/config.yaml:
version: "1.0"
default_server: default
servers:
default:
hostname: example.com
username: user
key_file: ~/.ssh/id_ed25519
port: 22
wp_path: /var/www/html
php_bin: /opt/plesk/php/8.3/bin/php
wp_cli: /usr/local/bin/wp
settings:
auto_backup: true
parallel_threshold: 10
parallel_workers: 10
ssh_timeout: 30
log_level: INFOWhen the same text appears multiple times but you only want to replace it at a specific line:
# Replace only at line 10
praisonaiwp update 123 "Welcome" "My Website" --line 10Replace only the 1st, 2nd, or nth occurrence:
# Replace only the 2nd occurrence
praisonaiwp update 123 "Welcome" "My Website" --nth 2Create 100 posts in ~8 seconds (vs 50+ seconds sequential):
# Automatically uses parallel mode for files with >10 posts
praisonaiwp create 100_posts.jsonSee ARCHITECTURE.md for detailed technical documentation.
# Clone repository
git clone https://github.com/MervinPraison/praisonaiwp
cd praisonaiwp
# Install in development mode
pip install -e ".[dev]"
# Run tests
pytest
# Run with coverage
pytest --cov=praisonaiwp
# Format code
black praisonaiwp/
# Lint
flake8 praisonaiwp/Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE file for details.
Praison
- GitHub: https://github.com/MervinPraison/PraisonAIWP
- Documentation: https://praisonaiwp.readthedocs.io
- PyPI: https://pypi.org/project/praisonaiwp