{"id":51687547,"url":"https://github.com/f/gutenwright","last_synced_at":"2026-07-15T22:04:45.850Z","repository":{"id":357431890,"uuid":"1236931661","full_name":"f/gutenwright","owner":"f","description":"Prompt-powered Gutenberg composition for WordPress.","archived":false,"fork":false,"pushed_at":"2026-07-03T10:13:13.000Z","size":41196,"stargazers_count":23,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-07-03T12:14:10.982Z","etag":null,"topics":["ai","block-editor","gutenberg","openai","wordpress","wordpress-plugin"],"latest_commit_sha":null,"homepage":"https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/f/gutenwright/main/blueprint.json","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/f.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-12T17:58:53.000Z","updated_at":"2026-07-03T10:13:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/f/gutenwright","commit_stats":null,"previous_names":["f/pressmind","f/gutenwright"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/f/gutenwright","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f%2Fgutenwright","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f%2Fgutenwright/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f%2Fgutenwright/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f%2Fgutenwright/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/f","download_url":"https://codeload.github.com/f/gutenwright/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f%2Fgutenwright/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35522129,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-15T02:00:06.706Z","response_time":131,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","block-editor","gutenberg","openai","wordpress","wordpress-plugin"],"created_at":"2026-07-15T22:04:45.234Z","updated_at":"2026-07-15T22:04:45.842Z","avatar_url":"https://github.com/f.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\t\u003cpicture\u003e\n\t\t\u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"assets/logo-dark.svg\" /\u003e\n\t\t\u003csource media=\"(prefers-color-scheme: light)\" srcset=\"assets/logo-light.svg\" /\u003e\n\t\t\u003cimg src=\"assets/logo-light.svg\" alt=\"Gutenwright\" width=\"720\" /\u003e\n\t\u003c/picture\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003cstrong\u003ePrompt-powered Gutenberg composition for WordPress.\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/f/gutenwright/main/blueprint.json\"\u003e\n\t\t\u003cimg alt=\"Try Gutenwright stable in WordPress Playground\" src=\"https://img.shields.io/badge/Try%20Stable-WordPress%20Playground-3858E9?style=for-the-badge\u0026logo=wordpress\u0026logoColor=white\" /\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/f/gutenwright/main/blueprint-nightly.json\"\u003e\n\t\t\u003cimg alt=\"Try Gutenwright nightly in WordPress Playground\" src=\"https://img.shields.io/badge/Try%20Nightly-WordPress%20Playground-111827?style=for-the-badge\u0026logo=wordpress\u0026logoColor=white\" /\u003e\n\t\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"#quick-start\"\u003eQuick start\u003c/a\u003e\n\t ·\n\t\u003ca href=\"#security-model\"\u003eSecurity model\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg alt=\"WordPress\" src=\"https://img.shields.io/badge/WordPress-Block%20Editor-3858E9\" /\u003e\n\t\u003cimg alt=\"License\" src=\"https://img.shields.io/badge/license-GPL--2.0--or--later-blue\" /\u003e\n\t\u003cimg alt=\"Status\" src=\"https://img.shields.io/badge/status-experimental-f59e0b\" /\u003e\n\u003c/p\u003e\n\n## What Is Gutenwright?\n\nGutenwright is an experimental WordPress plugin that turns natural language prompts into real Gutenberg blocks. It reads the current post context, streams model output in the editor, and replaces the prompt block with generated content.\n\n## Naming Notice\n\nThis project was formerly named ‘pressmind’. It has been renamed to avoid a naming conflict with the registered trademark of Pressmind GmbH. This project has never been affiliated with, endorsed by, sponsored by, or connected to Pressmind GmbH or its products.\n\nIt can create static layouts, rich HTML, SVG diagrams, org charts, tables, callouts, sandboxed interactive widgets, and Media Library-backed AI images.\n\nThe bigger goal is to make **New York Times-style interactive posts** approachable inside ordinary WordPress. Visual explainers, animated SVG diagrams, scrollytelling sections, and small playable widgets that newsrooms usually hand-build per article can be composed uniquely per post in the Gutenberg editor with AI support, instead of from a fixed template.\n\n\u003cp align=\"center\"\u003e\n\t\u003cvideo src=\"https://github.com/user-attachments/assets/911b3718-3716-42cb-b5ca-8955757431ea\" controls width=\"100%\"\u003e\u003c/video\u003e\n\t\u003cbr /\u003e\n\t\u003ca href=\"https://github.com/f/gutenwright/raw/refs/heads/main/assets/gutenwright-demo.mp4\"\u003eWatch the demo video\u003c/a\u003e\n\u003c/p\u003e\n\n## Highlights\n\n- **Context-aware generation**: Sends bounded post context so generated blocks match the current article.\n- **Streaming editor feedback**: Shows model output while the backend is generating.\n- **Real Gutenberg output**: Returns serialized block markup and inserts parsed blocks into the editor.\n- **Smart rendering mode**: Keeps simple HTML/SVG as `core/html`; moves scripts/styles into an isolated sandbox block.\n- **Editable generated blocks**: Refine selected HTML or sandbox blocks with AI using the existing code as context.\n- **Sandboxed interactivity**: Games, calculators, and scripted UI render in an iframe with no same-origin access.\n- **Optional image generation**: Generates images with OpenAI Images, imports them into the Media Library, and inserts `core/image` blocks.\n\n## Demo\n\n### Local Playground\n\n```bash\nnpm install\nnpm run playground\n```\n\nThis builds the block assets and starts a local WordPress Playground instance with auto-login on the latest stable WordPress build.\n\nTo test against WordPress nightly for upcoming WordPress 7.0 APIs such as Connectors:\n\n```bash\nnpm run playground:nightly\n```\n\n### Hosted Playground Blueprint\n\nThis repository includes two WordPress Playground blueprints:\n\n- [`blueprint.json`](blueprint.json): stable demo using the latest released WordPress build.\n- [`blueprint-nightly.json`](blueprint-nightly.json): nightly demo for testing upcoming WordPress 7.0 APIs such as Connectors.\n- [`blueprint-mental-health.json`](blueprint-mental-health.json): opens the [mental-health interactive news example](examples/mental-health-interactive-news.html) as a Gutenberg post.\n\nOpen Gutenwright in a fresh browser-based WordPress site:\n\n\u003cp\u003e\n\t\u003ca href=\"https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/f/gutenwright/main/blueprint.json\"\u003e\n\t\t\u003cimg alt=\"Launch stable Playground\" src=\"https://img.shields.io/badge/Launch%20Stable-WordPress%20Playground-3858E9?style=for-the-badge\u0026logo=wordpress\u0026logoColor=white\" /\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/f/gutenwright/main/blueprint-nightly.json\"\u003e\n\t\t\u003cimg alt=\"Launch nightly Playground\" src=\"https://img.shields.io/badge/Launch%20Nightly-WordPress%20Playground-111827?style=for-the-badge\u0026logo=wordpress\u0026logoColor=white\" /\u003e\n\t\u003c/a\u003e\n\u003c/p\u003e\n\nBoth blueprints enable networking, log into wp-admin, install Gutenwright from GitHub, activate the plugin, and open a new post.\nThat post is imported from [`examples/gutenwright-demo-post.html`](examples/gutenwright-demo-post.html) and includes prefilled Gutenwright prompt placeholders. They are not sent to AI until you click **Generate Blocks**.\n\nFor a fully generated longform example, see [`examples/mental-health-interactive-news.html`](examples/mental-health-interactive-news.html). It mimics Gutenwright output for an interactive mental-health news feature with custom HTML, inline SVG, sandboxed charts, a playable breathing exercise, and resource guidance.\n\n## Quick Start\n\n```bash\nnpm install\nnpm run build\n```\n\nThen install the plugin in WordPress and activate **Gutenwright**.\n\nGo to `Settings \u003e Gutenwright` and configure:\n\n- Credentials source: WordPress Connector or Gutenwright custom settings\n- Connector selection or custom API key/endpoint fields\n- Text model\n- Optional image generation model and size\n\nOn WordPress 7.0+, Gutenwright can use API keys from the new WordPress Connectors API. If multiple API-key AI connectors are registered, choose one in `Settings \u003e Gutenwright`. Connector mode hides the custom API key and endpoint controls, but still lets you choose the model name. Choose Custom settings to show and use Gutenwright’s own API key and endpoint fields instead.\n\n## Example Prompts\n\n```text\nCreate a comparison table from this post.\n```\n\n```text\nGenerate an accessible SVG org chart for the teams described here.\n```\n\n```text\nBuild a sandboxed tic-tac-toe game with modern styling.\n```\n\n```text\nGenerate a hero image for this post and insert it with a caption.\n```\n\n## How It Works\n\n```mermaid\nflowchart LR\n\tPromptBlock[Gutenwright Block] --\u003e RestAPI[WordPress REST API]\n\tRestAPI --\u003e Model[AI Model]\n\tModel --\u003e RestAPI\n\tRestAPI --\u003e Parser[Block Parser]\n\tParser --\u003e Editor[Gutenberg Editor]\n\tRestAPI --\u003e Media[Media Library]\n```\n\nThe backend asks the model for strict JSON with:\n\n- `summary`: A short editor-facing description.\n- `serializedBlocks`: Valid serialized Gutenberg block markup.\n- `assets`: Optional generated media requests.\n- `warnings`: Safe fallbacks or limitations.\n\n## Security Model\n\n- API keys are stored in WordPress options and used only server-side.\n- REST endpoints require the current user to be able to edit the target post.\n- Returned block markup is parsed, allowlisted, and sanitized before insertion.\n- Static HTML and SVG use a conservative allowlist.\n- Scripted or style-tagged content is isolated in `gutenwright/sandbox`.\n- Sandbox iframes use `sandbox=\"allow-scripts\"` without same-origin access.\n- Generated images are imported into the WordPress Media Library before insertion.\n\n## Development\n\n```bash\nnpm run start\nnpm run lint:js\nnpm run format\nnpm run build\n```\n\nMain files:\n\n- [`gutenwright.php`](gutenwright.php): Plugin bootstrap and dynamic sandbox block rendering.\n- [`includes/class-settings.php`](includes/class-settings.php): Admin settings.\n- [`includes/class-ai-provider.php`](includes/class-ai-provider.php): AI and image provider calls.\n- [`includes/class-rest-controller.php`](includes/class-rest-controller.php): REST generation and streaming.\n- [`src/ai-prompt-block/`](src/ai-prompt-block): Block editor UI.\n- [`examples/gutenwright-demo-post.html`](examples/gutenwright-demo-post.html): Playground demo post content.\n- [`examples/mental-health-interactive-news.html`](examples/mental-health-interactive-news.html): Full generated article example with static visuals and sandboxed interactions.\n\n## Status\n\nGutenwright is experimental and intended for exploration, demos, and early feedback. Review generated code and content before publishing.\n\n## Example Output\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg alt=\"Gutenwright example output\" src=\"assets/example-output.gif\" width=\"100%\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/f/gutenwright/main/blueprint-mental-health.json\"\u003e\n\t\t\u003cimg alt=\"Open the mental-health example in WordPress Playground\" src=\"https://img.shields.io/badge/Open%20the%20example-WordPress%20Playground-3858E9?style=for-the-badge\u0026logo=wordpress\u0026logoColor=white\" /\u003e\n\t\u003c/a\u003e\n\t\u003cbr /\u003e\n\t\u003csub\u003eA New York Times-style interactive feature, uniquely composed inside the Gutenberg editor with AI support. Loads \u003ca href=\"examples/mental-health-interactive-news.html\"\u003e\u003ccode\u003eexamples/mental-health-interactive-news.html\u003c/code\u003e\u003c/a\u003e as a Gutenberg post in a fresh Playground site.\u003c/sub\u003e\n\u003c/p\u003e\n\n## License\n\nGPL-2.0-or-later\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff%2Fgutenwright","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ff%2Fgutenwright","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff%2Fgutenwright/lists"}