- Implement local backend AI provider with Ollama integration - Add Brave Search API integration for real-time search suggestions - Add image generation manager with multiple AI providers - Create hybrid provider system with local/cloud fallback - Add comprehensive settings UI with provider management - Implement Gutenberg sidebar with writing assistance controls - Add SEO schema generation for AI-generated content - Multiple provider support: OpenRouter, local backend, Codex
4.0 KiB
4.0 KiB
Agentic Writer Local Backend
Run unlimited AI content generation on your own machine using your Claude CLI + Z.ai/Anthropic account.
Prerequisites
Before starting, ensure you have:
- ✅ Claude CLI installed and configured
- Get it: https://claude.ai/code or https://z.ai
- Verify:
claude --versionorwhich claude
- ✅ Node.js 18+ installed
- Download: https://nodejs.org
- Verify:
node --version
- ✅ Z.ai Coding Plan or Anthropic API key configured in Claude CLI
Quick Start
1. Extract Package
unzip agentic-writer-local-backend.zip
cd agentic-writer-local-backend
2. Start the Proxy
chmod +x *.sh
./start-proxy.sh
You'll see:
═══════════════════════════════════════════════════
✅ Local Backend Running!
═══════════════════════════════════════════════════
Your Configuration:
Base URL: http://192.168.1.105:8080
API Key: dummy
Model: claude-local
3. Configure WordPress Plugin
- Open WP Admin → Agentic Writer → Settings → Local Backend
- Paste the Base URL shown above
- API Key:
dummy - Click Test Connection → should show ✅
- Start generating content!
Commands
./start-proxy.sh # Start proxy (runs in background)
./stop-proxy.sh # Stop proxy
./test-connection.sh # Test if proxy responds
./get-local-ip.sh # Find your local IP address
tail -f proxy.log # View real-time logs
Firewall Setup
The proxy needs to accept connections from your WordPress site.
macOS
- System Settings → Network → Firewall
- Click Options → Add → Select
node - Set to Allow incoming connections
Linux (ufw)
sudo ufw allow 8080/tcp
sudo ufw reload
Windows
- Windows Defender Firewall → Advanced Settings
- Inbound Rules → New Rule
- Port → TCP 8080 → Allow
How It Works
WordPress Plugin → HTTP POST → Local Proxy (port 8080)
↓
Spawns Claude CLI
↓
Returns AI Response
Benefits:
- 🆓 Free: Uses your existing Z.ai/Anthropic subscription
- 🔒 Private: Content never leaves your network
- ⚡ Fast: LAN latency (~50-200ms)
- 🚀 Unlimited: No rate limits, no token counting
Troubleshooting
See TROUBLESHOOTING.md for detailed solutions.
Quick Fixes
"Connection failed" in plugin:
# Check proxy is running
ps aux | grep claude-proxy
# Restart if needed
./stop-proxy.sh && ./start-proxy.sh
"Claude CLI not found":
# Verify Claude is installed
which claude
claude --version
# Test Claude works
echo "Hello" | claude
"Wrong IP address":
# Find your correct IP
./get-local-ip.sh
# Or manually:
# macOS: ipconfig getifaddr en0
# Linux: ip route get 1 | awk '{print $7}'
Port 8080 already in use:
# Find what's using it
lsof -i :8080
# Change port (edit claude-proxy.js)
PORT=9000 node claude-proxy.js
# Update plugin Base URL to: http://your-ip:9000
Security Notes
- Proxy binds to
0.0.0.0(all network interfaces) for LAN access - No authentication by design (LAN trust model)
- All request prompts are logged to
proxy.log - For internet exposure, use ngrok/reverse proxy with authentication
Environment Variables
PORT=9000 ./start-proxy.sh # Use different port
NODE_ENV=production # Production mode
Support
- Documentation: Plugin Docs
- Issues: GitHub Issues
- Community: Discord
License
GPL-2.0+ - Same as WP Agentic Writer plugin