Leaderboard
Popular Content
Showing content with the highest reputation on 04/03/2026 in all areas
-
Enables AI coding agents to access ProcessWireβs API. Also provides a content migration system. This module provides a way for Claude Code (or other AI helpers) to have full access to the ProcessWire API via a command-line interface (CLI). Once connected to your site, you can ask Claude to create and modify pages, templates and fields, or do anything that can be done with the ProcessWire API. It's even possible for an entire site to be managed by Claude without the need for ProcessWire's admin control panel, though we're not suggesting that just yet. While working with Claude Code, I asked what would be helpful for them in working with ProcessWire, and this module is the result. Claude needed a way to quickly access the ProcessWire API from the command line, and this module provides 3 distinct ways for Claude to do so. Claude collaborated with me on the development of the AgentTools module, and the accompanying ProcessAgentTools module was developed entirely by Claude Code. Admittedly, a big part of the purpose of this module is also to help me learn AI-assisted development, as I'm still quite new to it, but learning quickly. This module aims to add several agent tools over time, but this first version is also somewhat of a proof of concept. Its first feature is basic migrations system, described further in this document. Please note that this module should be considered very much in 'beta test' at this stage. If you do use it in production (such as the migrations feature) always test locally and have backups of everything that can be restored easily. While I've not run into any cases where I had to restore anything, just the nature of the module means that you should use extra caution. Continue reading in the GitHub README Agent Tools in the modules directory2 points
-
Export your ProcessWire site structure as comprehensive, AI-optimized documentation for ChatGPT, Claude, Copilot, and other AI coding assistants. What It Does Context automatically generates complete documentation of your ProcessWire site in formats specifically optimized for working with AI: π Site Structure Complete page hierarchy exported as JSON, TOON, and ASCII tree Shows all relationships, templates, URLs, and metadata Smart collapsing for large page lists π Templates & Fields All template definitions with complete field configurations Field types, options, requirements, default values Special handling for Repeater, Matrix, Table fields π¦ Content Samples Real page examples exported for each template Shows actual data formats and field usage Helps AI understand your content patterns πΎ Code Snippets Customized selector patterns for your site type Helper functions and utility code API implementation examples π€ AI Prompts Ready-to-use project context file Template creation prompts Debugging assistance prompts Session continuity templates π₯οΈ CLI Commands Export from command line for AI agents Query templates, fields, and pages directly Perfect for Claude Code, Cursor, Windsurf integration Dual Format Export (The Game Changer!) Context exports in two formats simultaneously: JSON Format Standard format for development tools, APIs, and compatibility TOON Format (AI-Optimized) β¨ Token-Oriented Object Notation designed specifically for AI prompts: 30-60% fewer tokens than JSON Significantly reduces API costs Same data, more compact representation No external dependencies - pure PHP Real Savings Example For a typical ProcessWire site with 50 templates: structure.json (15,000 tokens) β structure.toon (8,500 tokens) = 43% savings templates.json (8,000 tokens) β templates.toon (4,000 tokens) = 50% savings samples/*.json (12,000 tokens) β samples/*.toon (6,500 tokens) = 46% savings Cost Impact (Claude Sonnet pricing): JSON export: $0.105 per AI interaction TOON export: $0.057 per AI interaction Save ~$5/month if you use AI assistants 100 times/month Installation cd /site/modules/ git clone https://github.com/mxmsmnv/Context.git Then in admin: Modules β Refresh β Install Or download from ProcessWire Modules Directory Quick Start Web Interface Setup β Modules β Context β Configure Choose your site type (Blog, E-commerce, Business, Catalog, Generic) β Enable "Export TOON Format" (recommended for AI work!) Enable optional features: β Export Content Samples β Create Code Snippets β Create AI Prompts β Generate SKILL.md for AI Agents Click "Export Context for AI" Files appear in /site/assets/cache/context/ CLI Interface # Full export php index.php --context-export # Export TOON format only (fastest, smallest) php index.php --context-export --toon-only # Query specific data php index.php --context-query templates php index.php --context-query fields php index.php --context-query pages "template=product, limit=10" # Quick stats php index.php --context-stats # Help php index.php --context-help Perfect for AI coding agents like Claude Code, Cursor, and Windsurf! Generated Files /site/assets/cache/context/ βββ README.md # Complete documentation βββ SKILL.md # AI agent skill definition βββ structure.json / .toon # Page hierarchy βββ structure.txt # ASCII tree βββ templates.json / .toon # All templates & fields βββ templates.csv # Templates in CSV βββ tree.json / .toon # Combined structure βββ config.json / .toon # Site configuration βββ modules.json / .toon # Installed modules βββ classes.json / .toon # Custom Page classes β βββ samples/ # Real content examples β βββ product-samples.json β βββ product-samples.toon # 46% smaller! β βββ snippets/ # Code patterns β βββ selectors.php # Customized for your site type β βββ helpers.php # Utility functions β βββ api-examples.php # REST API examples β βββ prompts/ # AI instructions βββ project-context.md # Complete project overview βββ create-template.md # Template creation guide βββ create-api.md # API creation guide βββ debug-issue.md # Debugging helper βββ project-summary.md # Session continuity template Using with AI Assistants Web Interface Upload Upload TOON files to save tokens and costs: π structure.toon π templates.toon π prompts/project-context.md Then ask your AI assistant: "Help me create a blog post template with title, body, author, categories, and featured image. Follow the existing patterns from templates.toon" AI Coding Agents (Claude Code, Cursor, Windsurf) 1. Tell your agent to read the docs: Read /site/modules/Context/AGENTS.md 2. Agent can now export context: php index.php --context-export --toon-only 3. Agent queries specific data: php index.php --context-query templates 4. Agent reads exported files: Read SKILL.md, then structure.toon and templates.toon The AI has complete context of your site and can generate code that follows your exact patterns! Site Type Customization Code snippets automatically adapt to your site type: Blog / News / Magazine Post listings, author archives, category filtering Recent posts, popular content, related articles E-commerce / Online Store Product listings, cart logic, order processing Inventory management, payment integration Business / Portfolio / Agency Service pages, team members, case studies Testimonials, project galleries Catalog / Directory / Listings Brand hierarchies, category filters Advanced search, sorting, pagination Generic / Mixed Content General purpose patterns for any site type Features Overview Always Exported (Core) β Complete page tree structure β All templates with field definitions β Site configuration and settings β Installed modules list β Custom Page classes β README with complete documentation β SKILL.md for AI agents Optional (Configurable) βοΈ Content samples (1-10 per template) βοΈ API JSON schemas βοΈ URL routing structure βοΈ Performance metrics βοΈ Code snippets library βοΈ AI prompt templates βοΈ Field definitions metadata Advanced Settings Auto-update on template/field changes Custom export path (supports absolute paths) Maximum tree depth (3-20 levels) JSON children limit (prevent huge files) Compact mode for large lists Custom AI instructions CSS framework detection (or manual override) Why TOON Format? TOON is specifically designed for AI prompts. Here's the difference: JSON (verbose): { "products": [ {"id": 1, "title": "Dark Chocolate", "price": 12.99}, {"id": 2, "title": "Milk Chocolate", "price": 9.99} ] } TOON (compact): products[2]{id,title,price}: 1,Dark Chocolate,12.99 2,Milk Chocolate,9.99 Same data, 50% fewer tokens! Use Cases π€ AI-Assisted Development Upload your site context to Claude/ChatGPT and get code that follows your exact patterns π€ AI Coding Agents Claude Code, Cursor, Windsurf can export and query your site via CLI π Developer Onboarding New team members get complete site documentation instantly π Site Migration Export complete site structure for documentation or migration planning π Code Standards Maintain consistency across your team with AI that knows your patterns π° Cost Optimization Reduce AI API costs by 30-60% with TOON format π Session Continuity Maintain context between AI coding sessions with project-summary.md API Variable In your ProcessWire code: // Get Context module instance $context = wire('context'); // Programmatic export $context->executeExport(); // Get export path $path = $context->getContextPath(); Links GitHub: https://github.com/mxmsmnv/Context TOON Format Spec: https://toonformat.dev Screenshots Example Workflow Export your site Click one button or run php index.php --context-export Upload to AI Upload .toon files to Claude/ChatGPT for maximum efficiency Build features faster AI knows your exact site structure, templates, and patterns Save money Use 30-60% fewer tokens on every AI interaction Perfect for ProcessWire developers who use AI coding assistants! The TOON format support makes it significantly more cost-effective to work with Claude, ChatGPT, and similar tools. Now with CLI support for seamless AI agent integration! Questions? Suggestions? Let me know! π1 point
-
Sooo, I'm still alive and in August, I will start on a new job and project that probably brings me back to work with the cool and great Processwire. :D 7 years ago I was forced to change job and ended in a cool new place doing front-end dev not using PW anymore. So unfortunately I didn't really use or follow PW in that time except once a year doing something tiny bits on the handful of websites I am responsible for. I'm sorry if I just disappeared "over night" and maybe left some things behind I was doing for PW, and didn't spend time looking out for them. The reason is, I also was very frustrated with a lot of things with the job and life at that time and 2019 was also when I started painting again digitally, as maybe some of you know. I went full hyper focus mode, everyday almost for 2-3 years in my spare time and since then slowed down. I was able to make a small career with it, and made a lot of new connections and experiences which was awesome. I will continue to work on making art and illustrations as I have a lot of new freedom with the new job too combine a lot of my skills. Finally I can work from home full time. A little dream come true. Thanks for still being here and keeping this small but awesome community alive! I have to catch up now! :D Cheers Soma1 point
-
In this post I wanted to talk a little bit about the state of ProcessWire and AI. I'll share what my experience has been so far and where I think ProcessWire should focus going forward. This new world of AI can be both exciting and concerning, but it's the world that we've found ourselves in. As far as ProcessWire and web development goes, I think there's a lot to be excited and enthusiastic aboutβ https://processwire.com/blog/posts/processwire-and-ai/1 point
-
Hey everyone! I just released a new module called InviteAccess. It's something I built for my own workflow and figured it might be useful for others too. The problem: when handing off a staging site to a client or a design agency, you either open it to the world or reach for HTTP Basic Auth β which works but isn't pretty and requires server config. I wanted something in between: a proper gate page that looks like it belongs to the project, with separate codes for each team. What it does InviteAccess hooks into ProcessPageView::execute (before any template rendering) and blocks all frontend requests until a valid invite code is entered. Logged-in ProcessWire users always pass through automatically. You define codes in the module config, one per line: SUMMER2025|Summer Campaign AGENCY-PREVIEW|Agency Team CLIENT-ACCESS|Client Preview The label after the pipe shows up in the access log, so you can see exactly which team accessed the site and when. Features Multiple invite codes with optional labels Session-based auth β enter once, stays valid for a configurable number of hours JSON access log with timestamp, IP, user agent, URL β last 50 entries shown right in the admin config panel Light / Dark / Auto theme switcher on the gate page (saved in localStorage, reacts to OS preference) Accent color setting β red, blue, green or black Configurable allowed pages that bypass the gate entirely CSRF protection, hash_equals() for timing-safe comparison, Cloudflare-aware IP detection The gate page uses ApfelGrotezk font and a design inspired by processwire main page itself β warm gray background, white card, mobile-first. Screenshots Installation cd site/modules git clone https://github.com/mxmsmnv/InviteAccess.git Then Modules β Refresh β Install β Configure. GitHub: https://github.com/mxmsmnv/InviteAccess Happy to hear any feedback or suggestions!1 point
-
Thank you. It is a great module and works perfectly. Sometimes it would be cool to password protect individual pages instead of locking the complete sites. It just the opposite use case.1 point
-
I try not to worry about things I cannot control, and AI falls squarely in that category for me. It's here, it's not going anywhere, and every senior person I know in tech is embracing it rather than fighting it. I use it daily now and it makes me more productive. That's the reality. The people protesting or boycotting it aren't going to slow it down, they're just going to fall behind. That said, I don't think caring about the environmental and societal side means you have to opt out. If anything, the opposite. People who use AI and care about how it's built and powered are the ones with any real influence over where it goes. I'd genuinely have no hesitation donating to make AI development better and more responsible, that feels like a more direct lever than abstaining. Ryan put it well: sitting out doesn't improve anything. Use it, push for better, and concentrate on what's within your own family four walls.1 point
-
Until we get an "official" media manger module we need to make some workarounds. Let me tell you about my personal solution for this: I am using the FileMover module from @Robin S for copying images from a global "media library" field (that is placed inside a dedicated "media library" template ) to any of my image fields. Please have look at robins comment here where he extended the functionality of his module through a hook. In this case you can open the image library page through a modal with a click from any image field. There is also a small screencast that shows this β for me this is a really good workaround. Please have a look for yourself and give it a try (and some credits to robin!).1 point
-
I manage to configure the HTMLPurifier. In site/ready.php, I put this: $wire->addHookAfter('MarkupHTMLPurifier::initConfig', function (HookEvent $event) { $config = $event->arguments(0); $def = $event->arguments(1); $def->addElement('details', 'Flow', 'Flow', 'Common'); $def->addElement('summary', 'Flow', 'Flow', 'Common'); }); I got that addElement method from there: https://github.com/processwire/processwire-requests/issues/226 Donβt ask me about the three other arguments (Flow, Flow, Common). π That + a config.json file for this specific field where you specify the accordion plugin and the accordion button in the toolbar, as you mentioned above, and it works fine.1 point