Skip to main content

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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

praisonaiwp-1.0.0.tar.gz (37.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

praisonaiwp-1.0.0-py3-none-any.whl (27.7 kB view details)

Uploaded Python 3

File details

Details for the file praisonaiwp-1.0.0.tar.gz.

File metadata

  • Download URL: praisonaiwp-1.0.0.tar.gz
  • Upload date:
  • Size: 37.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for praisonaiwp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f4e48d977c7d08ecda8337c27f5ca62bb7c76eaf6431be3378dc3e230b9bdd53
MD5 de09460bb650314e52495148ae643531
BLAKE2b-256 c9160b19a6291f590146c6e7a036d9d034d3f780d29b3f8047b4006ea7c00611

See more details on using hashes here.

File details

Details for the file praisonaiwp-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for praisonaiwp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 160dcc959f028bfe4b3b792da12cb1568787a1d923076e44a5085a4fc669de85
MD5 125114d6138b7f0345e2d0d6942a4acb
BLAKE2b-256 798f32dccb2ac4b24d2fa83b225cc83b281dfa84ecd92ae1c882455ffdc6f513

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page