PHPackages                             imagewize/waygate - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. imagewize/waygate

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

imagewize/waygate
=================

AI-powered pattern page builder for the Elayne block theme

v0.9.0(2w ago)054↓25%GPL-2.0-or-laterPHPPHP &gt;=8.3CI passing

Since May 22Pushed 2w agoCompare

[ Source](https://github.com/imagewize/waygate)[ Packagist](https://packagist.org/packages/imagewize/waygate)[ Docs](https://github.com/imagewize/waygate)[ RSS](/packages/imagewize-waygate/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (10)Dependencies (4)Versions (22)Used By (0)

Waygate
=======

[](#waygate)

**AI-Powered Pattern Page Builder for Block Themes**

Waygate lets you assemble WordPress pages from block patterns — manually or via a natural-language AI prompt powered by the WordPress AI Client (WordPress 7.0+). Works with any block theme; [Elayne](https://github.com/imagewize/elayne) is the primary supported theme.

> **Beta** — v0.9.0. Use on staging/development sites; not yet recommended for production.

---

Features
--------

[](#features)

- **Pattern catalog** — Browse registered block patterns with slug, title, and categories; filter by category
- **AI page generation** — Describe the page you want; the AI picks patterns and creates a draft
- **Themed text personalization** — A second AI call rewrites all headings, paragraphs, and button labels inside the selected patterns to match your topic; uncheck the option for a faster single-call result with original placeholder text
- **AI reasoning** — The AI's one-sentence explanation of its pattern choices is shown after generation and persisted as post meta on the created page
- **Developer debug info** — When `WP_ENV=development`, the page editor sidebar and the generation notice also show the ordered pattern slugs and generation timestamp
- **Prompt templates** — Six built-in page templates (Homepage, About, Services, Contact, Landing Page, Portfolio) pre-fill the AI prompt; extend via the `waygate_prompt_templates` filter
- **Feature detection** — AI form is hidden automatically when no provider supports text generation
- **Abilities API** — Exposes `elayne/list-patterns` and `elayne/create-page` server abilities plus a `waygate/insert-pattern` client-side ability for the block editor (WP 7.0+)
- **REST API** — `GET /wp-json/waygate/v1/patterns` and `POST /wp-json/waygate/v1/pages` for headless and external tool integration
- **Multi-provider** — Works with Mistral, Claude, OpenAI, or Gemini via WP AI Client
- **Any block theme** — Default prefix is `elayne/`; extend via the `waygate_pattern_prefixes` filter

---

Requirements
------------

[](#requirements)

RequirementVersionPHP8.3+WordPress7.0+Block themeAny; Elayne recommendedWordPress AI Client7.0+ (required for AI features)---

Installation
------------

[](#installation)

### Option A — Composer (recommended for Bedrock)

[](#option-a--composer-recommended-for-bedrock)

```
composer require imagewize/waygate
```

### Option B — Manual

[](#option-b--manual)

1. Download the latest release zip from [GitHub Releases](https://github.com/imagewize/waygate/releases)
2. Upload and activate via **Plugins → Add New → Upload Plugin**

---

Configuration
-------------

[](#configuration)

### AI features (optional)

[](#ai-features-optional)

AI page generation requires a running AI provider. WordPress 7.0+ supports Mistral, Claude (Anthropic), OpenAI, and Gemini via its built-in Connectors system.

**Installing provider plugins** (Bedrock / Composer):

```
composer require wp-plugin/ai-provider-for-mistral
composer require wp-plugin/ai-provider-for-anthropic
# OpenAI and Gemini can be installed from Settings → Connectors in the WP admin
```

**Configuring API keys** — every provider supports two methods; environment variable takes priority over the database:

ProviderEnv varAdmin UIMistral`MISTRAL_API_KEY` in `.env`Settings → ConnectorsClaude (Anthropic)`ANTHROPIC_API_KEY` in `.env`Settings → ConnectorsOpenAI`OPENAI_API_KEY` in `.env`Settings → ConnectorsGoogle (Gemini)`GOOGLE_API_KEY` in `.env`Settings → ConnectorsOn Bedrock, add the key to your site `.env` and it is picked up automatically. On standard WordPress installs, enter the key directly in **Settings → Connectors** and it is stored in the database.

**Mistral via Composer library** (non-Bedrock, without the WP plugin):

```
composer require saarnilauri/ai-provider-for-mistral
```

Waygate registers this provider manually since the library distribution excludes `plugin.php`. Set `MISTRAL_API_KEY` as a server environment variable.

---

Usage
-----

[](#usage)

1. Go to **Tools → Waygate** in the WordPress admin
2. Browse registered patterns in the catalog; use the category dropdown to filter
3. Optionally pick a **Quick template** to pre-fill the description, then customise it
4. Check **Rewrite pattern text to match my description** (default: on) to have the AI personalize all headings, paragraphs, and button labels to your topic — uncheck for a faster single-call result with original placeholder text
5. Click **Generate Page** to create an AI-assembled draft
6. Open the draft in the block editor, adjust as needed, and publish

---

Abilities API (WordPress 7.0+)
------------------------------

[](#abilities-api-wordpress-70)

When WordPress 7.0's Abilities API is available, Waygate registers three abilities:

AbilityTypeDescription`elayne/list-patterns`ServerReturns patterns, optionally filtered by category`elayne/create-page`ServerCreates a draft page from an ordered list of pattern slugs`waygate/insert-pattern`Client (editor)Inserts a pattern block at the current cursor position in the block editorThe client-side ability is registered via `@wordpress/abilities` and is available whenever the block editor is open. Pass a `slug` parameter (e.g. `"elayne/hero-centered"`) to insert any registered pattern.

---

REST API
--------

[](#rest-api)

Waygate exposes two REST endpoints under `/wp-json/waygate/v1/`:

MethodEndpointPermissionDescription`GET``/patterns``edit_posts`List all registered patterns; optional `?category=hero` filter`POST``/pages``publish_pages`Create a **draft** page from pattern slugs (max 10 req/min per user)**Example — list patterns filtered by category:**

```
curl -u admin:password https://example.com/wp-json/waygate/v1/patterns?category=hero
```

**Example — create a page:**

```
curl -u admin:password -X POST https://example.com/wp-json/waygate/v1/pages \
  -H "Content-Type: application/json" \
  -d '{"title":"My Page","patterns":["elayne/hero","elayne/features","elayne/cta"],"status":"draft"}'
```

Response:

```
{ "page_id": 42, "edit_url": "https://example.com/wp-admin/post.php?post=42&action=edit", "view_url": "https://example.com/?page_id=42" }
```

---

Development
-----------

[](#development)

```
git clone https://github.com/imagewize/waygate.git
cd waygate
composer install
vendor/bin/phpunit --configuration phpunit.xml
```

---

License
-------

[](#license)

GPL-2.0-or-later — see [LICENSE](LICENSE).

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance97

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

12

Last Release

15d ago

PHP version history (2 changes)v0.2.0PHP &gt;=8.0

v0.4.0PHP &gt;=8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/01563ca58ee6cd8347183741d139584749756ca5e02cd062915ca0b5edcc8057?d=identicon)[jasperf](/maintainers/jasperf)

---

Top Contributors

[![jasperf](https://avatars.githubusercontent.com/u/344138?v=4)](https://github.com/jasperf "jasperf (73 commits)")

---

Tags

pluginwordpressaipatternsblock-themeelayne

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/imagewize-waygate/health.svg)

```
[![Health](https://phpackages.com/badges/imagewize-waygate/health.svg)](https://phpackages.com/packages/imagewize-waygate)
```

###  Alternatives

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.3k10](/packages/helsingborg-stad-municipio)[iceicetimmy/acf-post-type-selector

Post type selector for Advanced Custom Fields.

559.0k](/packages/iceicetimmy-acf-post-type-selector)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
