AI-powered WordPress content management framework with precision editing
Project description
PraisonAIWP
AI-powered WordPress content management framework with precision editing capabilities.
Features
- 🚀 Simple CLI - Only 5 core commands to remember
- ⚡ 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
Installation
Using uv (Recommended - 10x faster!)
# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh
# Clone and install
git clone https://github.com/yourusername/praisonaiwp
cd praisonaiwp
uv sync
# Run commands
uv run praisonaiwp init
Using pip
pip install praisonaiwp
# Or install from source
git clone https://github.com/yourusername/praisonaiwp
cd praisonaiwp
pip install -e .
Quick Start
1. Initialize Configuration
praisonaiwp init
This will prompt you for:
- Server hostname
- SSH username
- SSH key path
- WordPress path (auto-detected)
- PHP binary (auto-detected)
2. Create Posts
# 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
3. Update Posts
# 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
4. Find Text
# 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
5. List Posts
# List all posts
praisonaiwp list
# List pages
praisonaiwp list --type page
# List drafts
praisonaiwp list --status draft
File Formats
JSON Format
[
{
"title": "Post Title",
"content": "<p>Post content</p>",
"status": "publish",
"type": "post"
}
]
YAML Format
- title: Post Title
content: <p>Post content</p>
status: publish
type: post
CSV Format
title,content,status,type
"Post Title","<p>Post content</p>",publish,post
Configuration
Configuration 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: INFO
Advanced Usage
Line-Specific Replacement
When 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" "Peterborough Church" --line 10
Occurrence-Specific Replacement
Replace only the 1st, 2nd, or nth occurrence:
# Replace only the 2nd occurrence
praisonaiwp update 123 "Welcome" "Peterborough Church" --nth 2
Bulk Operations
Create 100 posts in ~8 seconds (vs 50+ seconds sequential):
# Automatically uses parallel mode for files with >10 posts
praisonaiwp create 100_posts.json
Architecture
See ARCHITECTURE.md for detailed technical documentation.
Development
# Clone repository
git clone https://github.com/yourusername/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/
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - see LICENSE file for details.
Author
Praison
Links
- GitHub: https://github.com/yourusername/praisonaiwp
- Documentation: https://praisonaiwp.readthedocs.io
- PyPI: https://pypi.org/project/praisonaiwp
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file praisonaiwp-1.0.1.tar.gz.
File metadata
- Download URL: praisonaiwp-1.0.1.tar.gz
- Upload date:
- Size: 45.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1d1c6178fc3f98642ed0651f7422561a0e7a78f6937198b988100ff540df055
|
|
| MD5 |
e3c387411962679a5a00f330ad4d2162
|
|
| BLAKE2b-256 |
22b0dae3d61c34f24ef6c156ebc19befc8db678a663a6df87d19bd25eee4287c
|
File details
Details for the file praisonaiwp-1.0.1-py3-none-any.whl.
File metadata
- Download URL: praisonaiwp-1.0.1-py3-none-any.whl
- Upload date:
- Size: 28.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da5fbb6baf5e9b6f9c920fc87e92c2a49e5d5d8f117d4c3b2a0251503b025fe0
|
|
| MD5 |
71473aa8089a73df543fe11944040c33
|
|
| BLAKE2b-256 |
309f4c17aad6812e725a06dce4671970e3c600be02307a363cbf9062de4b9ed2
|