Jump to content

Recommended Posts

Posted

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 directory

 

 

 

  • Like 7
  • Thanks 1
Posted

Just created a new test project and added the module. 

One thing I noticed immediately was that in my DDEV environment I needed to prefix the commands in order to run them in the actual container.

// non-DDEV environment
php index.php --at-eval 'echo wire()->pages->count() . " pages\n";'

// DDEV environment
ddev exec php index.php --at-eval 'echo wire()->pages->count() . " pages\n";'

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...