Posted on

How I automate WordPress Plugin Releases with a Script

Creating WordPress plugins is a big part of what I do. Part of that is distribution with releases. There’s a lot of files that don’t need to be in the finished product. In fact, some plugins would be 10x the size if I included the node_modules directory, for example. Even when size isn’t the concern, all those useless files cluttering up the directory – like the .DS_Store files have no business being in a production release.

Sometimes, I manually create a copy of the plugin and strip out the extra files and then zip it up, but it just feels wrong to have to do that. At one point, I had a gulp file that would build and minify the resources and then create a copy of the plugin without all of the build files and zip it up. The trouble with that is that it was an extra step in creating a new plugin, and it felt a bit redundant to have the same file in all of my plugins.

The Solution: An Interactive Build Script

So, today, I decided I wanted a shell script to live in my plugins directory that would create a plugin release for any given plugin. I gave Claude Code the general requirements of what I wanted, and I wasn’t even thinking about versioning, but it captured the version from the plugin without my asking for it and added it to the zip file.

How It Works

The script follows a straightforward process:

Version Detection: First, it reads the plugins’s main file and extracts the version number from the header.

Clean Build Directory: It creates a temporary directory and uses rsync to copy the plugin files while excluding everything that doesn’t belong in production. The exclusion list is comprehensive, covering version control files ,development dependencies, documentation, and more. To make it a bit more versatile, I just added support for a .buildignore file to add custom exclusions or override default exclusions.

Archive Creation: Once the clean copy is ready, it creates a zip archive with a proper name format. If an older version already exists, it removes it first, to avoid confusion.

No Build Step: Despite the name, you might notice that there’s no build step listed. My immediate need was the packaging step, but I’m currently working on adding a build step, complete with a buildconfig.json file to handle any use case.

Building It with Claude Code

I’ve been experimenting with Claude Code for several months now, and this project was a perfect test case. I spent 5-10 minutes on something that might have taken an hour or two, because, while I understand it, shell scripting is not something I do everyday. One thing I like about Claude Code in general is that it is very good at documenting a project’s architecture through markdown notes. Having AI remember your decisions is incredibly valuable.

The initial version of the script came together quickly, but then I remembered that I didn’t want to have to type a full plugin name as a parameter. I was really impressed with how Claude Code Handled refinements. When I asked it to scan the plugins directory and give me a menu, it quickly restructured the script to accommodate both approaches without breaking existing functionality.

One thing I’ve learned from building tools with AI assistance is that the quality of your results depends heavily on how well you can articulate what you want. If you can describe the problem or feature in a clear an detailed way, the AI can produce something genuinely useful, but also, not all AI models are created equal. I’ve also worked with OpenCode, which is a similar tool that allows you to several different models, and, despite having a similar markdown context storage, Grok Code Fast 1 is laughably bad at producing the desired output.

The Broader Picture: AI-Assisted Development

This script is a small example of how AI coding tools can be remarkably useful. It’s not about replacing developers or magically generating perfect code. It’s about accelerating the tedious parts of development so you can focus on the parts that actually require human judgement and creativity.

Just like you wouldn’t use a hammer for every construction task, you need to know when AI is the right tool for the job. There are some things it excels at, like simple scripts or UI layouts. You also need to know what you’re building and why. You need to understand the code well enough to review it, test it, and maintain it. AI coding tools are extremely powerful, but they’re not fully autonomous – not yet. I like to think of them as highly flexible scaffolding tools.

Getting Started

If you want to use this script for your own WordPress plugin development, the setup is straightforward. you’ll need a standard Unix environment with bash, rsync, zip, and a few other common utilities. If you’re running Windows, WSL is a good choice. If you’re on a Mac or Linux, obviously, you’re already set. Place the script in your plugins directory, make it executable with chmod +x build-release.sh, and you’re ready to go.

You can find the script on Github

Posted on

AI-Powered Culinary Alchemy: Transmuting Recipe Torment into CookCloud Magic

I enjoy cooking, but I usually like to have a recipe to guide me so I don’t feel like I’m wasting my time by making subpar food. Cookbooks get expensive and don’t quite have the variety I need. The internet is full of great recipes, but sometimes it’s hard to find exactly what you want. And then, when you find what you want, there’s a whole essay about the dish that you have to scroll through to get to the recipe. And then there’s using the recipe. Do you print it out? Do you scroll back and forth between the ingredients list and the instructions? Do you keep the printouts in a binder or in a favorites folder on your computer or phone? I just want a way to be able to quickly find recipes, collect the ones I like, and easily use those recipes. Why am I writing about cooking on this blog, you might ask? It’s because I’ve spent the last six months building a solution, and that solution is https://cookcloud.me/ Sure, there are other recipe / meal planner apps out there, but I wanted a project to test out a lot of the emerging AI technology out there while building a tool that did everything I wanted.

The Vision: What CookCloud Needed To Be

Once I had decided on the thing I wanted to build, I used a combination of ChatGPT and Claude to help me brainstorm the core features of the app and to plan out a reasonable roadmap for features to build along the way. In hindsight, I think the set of features that I defined as the MVP weren’t minimal enough, and I probably could have launched sooner if I had been a bit less ambitious. My initial plan, which I announced on social media was the following:

Core Features

  • Recipe Search
  • Personalized meal planning – Generate weekly meal plans based on user preferences ( diet, allergies, goals)
  • Grocery List Automation – Auto-generate shopping lists from meal plans
  • Recipe Suggestions – Provide curated or AI-recommended recipes based on available ingredients
  • Nutritional Tracking – display calorie and macro nutrient breakdowns for meals
  • Meal Scheduling – Allow users to assign meals to specific days/times
  • Ingredient Substitutions

I realized fairly early into the process that the recipe suggestion feature was going to have to be a roadmap item. I’m going to need to collect lots of user activity data points to be able to achieve this one. Also, looking back, I realize that I could have had a very useful app much sooner if I had left the meal planning/scheduling and grocery list items as roadmap items as well. These added a lot of effort to the project that I didn’t anticipate, and I committed to them far too early to pivot.

User Experience Enhancements

These are some of the roadmap items I initially planned to add:

  • Smart Pantry – Track ingredients at home and suggest meals based on what’s available
  • Barcode Scanner – Quick-add grocery items via barcode scanning
  • Grocery Delivery Integration – Connect to Instacart or other similar service for easy ordering
  • Multi-User Support – Family meal planning with a shared grocery list
  • Custom Recipes
  • Progress Tracking – Track meal adherence to health goals
  • Meal Prep Mode – Enhanced interface for cooking recipes

As it turns out, custom recipes was a natural progression once I got a handle on how I wanted to save recipes in the app, so that made its way into the core features. Meal Prep Mode was something that I wanted too much to wait on a later release. I think Grocery Delivery integration is going to be a fairly light lift, but the rest are going to involve significant effort.

Because some of these features are going to be so effort intensive, I also decided to build a feedback system. I built a GitHub integration so select GitHub Issues get published on the site on the Roadmap page. Registered users can upvote features they want the most as well as comment if they have ideas of how they want to shape those features. And, since I was already integrating with GitHub, I decided to also add a Release Notes page. These are select merged pull requests, showing the relevant issues (labeled as features).

AI Tools Arsenal

I used Claude and ChatGPT for brainstorm what features it should have and how I should plan them out. I started out with a Saas starter project based on Django, and leveraged Cursor to build out most of the features. Cursor didn’t always build exactly what I wanted, but it got me at least 80% of the way – think of it as advanced scaffolding. Amazon Q is an advanced autocomplete engine. The places where it stood out the most were times where I wanted to make several similar changes (things you might use a regex for if you wanted to take the time to build the expression). It sped up my progress writing code tremendously.

Sometimes Cursor would change things I didn’t want it to change or put things in the wrong places. To some degree, this is something that rules can prevent, but I’ve also had several instances where it did things that the rules I had in place told it not to do. AI coding tools aren’t perfect, and they aren’t magic, but they can be highly useful in the right hands. The meal planner interface, I built out as a separate submodule using MGX.dev. It may be gimmicky, but the results I got from it were far better than most tools I’ve tried. It asks a lot of followup questions and asks for periodic feedback along the way. I had to ask it to make a few revisions, but overall, I was very impressed. The down-side is that it’s token based, and you get a fixed number of tokens per month, and I spent them all in a matter of a few days. So, it’s not something I’d want to use regularly, but for quickly standing up a complex interface, I would strongly recommend it. Currently, I’m working with Claude code, and while, like Cursor, doesn’t always give flawless output, it is miles ahead in terms of quality and reliability. One of the big advantages of it is that it makes notes in markdown files to keep track of the project details since it can’t possibly hold the entire codebase in its context window. It has been much more consistent with putting things in the right place, maintaining conventions, etc, and it even creates unit tests without being prompted. It can also run test cases and linting tools and fix the issues that arise.

Final Thoughts

Building CookCloud has been one of those projects that started relatively simple and turned into something much more complex than I had anticipated. What began as “I just want to find recipes without scrolling through life stories” evolved into a full-featured meal planning platform with AI integration, custom recipe creation, and community feedback systems.

The biggest lesson I’ve learned is that even with the most powerful tools, the fundamentals stay the same: Measure twice, cut once. Planning is everything. I wish I had been more rigorous about the MVP scope. I’ve very happy with where the project is now, but I think I could have gotten more user feedback earlier if I had launched with a more focused set of features.

Right now, CookCloud is handling everything I originally wanted it to do. I can quickly search for recipes, save the ones I like. I can even import recipes I find outside the app, and most importantly, I have an intuitive interface for following those recipes which I haven’t seen anywhere else.

Get In Touch

You can check out CookCloud at cookcloud.me to see the kind of polished, feature-rich applications that are now achievable with modern development approaches. If you’re curious about what a custom solution might look like for your business, or if you want to discuss how AI-powered development could accelerate your next project, I’d be happy to have that conversation.

Posted on

My Epic 3D Printing Journey of Innovation and Upgrades

boats, toy boats, 3d printed

Getting Started: The Dream of a Wearable 3d Printed Iron Man Suit

I started 3D printing in 2016 with the dream of creating a wearable Iron Man suit. While that goal remains unfulfilled, I’ve created plenty of exciting projects along the way. 3D printing has helped me bridge my interests of electronics and programming and allowed me to work on robotics projects that I always dreamed of. My first printer was the Monoprice IIIP. Although it had a small print volume, it was affordable and perfect for a beginner.

Exploring New 3D Printers and Upgrades

Over the years, I’ve experimented with several printers, including models from Creality, like the CR-10S and various Ender iterations. One game-changing upgrade came with the Ender-3 E, which introduced me to automatic bed leveling.

Before this, leveling the bed was a tedious process that required adjusting knobs at each corner repeatedly to get the print head just right. Automatic bed leveling simplified this significantly—now, I only need to adjust the z-offset, a single setting on the printer interface.

Tackling Bed Adhesion Challenges

Another challenge I’ve faced is detaching prints from the bed. In the past, I relied on a putty knife to scrape prints off, risking damage to the print, the bed, or even my fingers. Modern printers have solved this issue with magnetic, bendable bed surfaces. These allow you to simply remove the bed, flex it, and pop the print off effortlessly.

Managing Overhangs with Supports

Intricate prints often require supports to handle overhangs or bridges. Supports provide a temporary foundation for unsupported areas during printing. However, removing them can be tricky—sometimes they come off easily, but other times, they leave behind material that needs cleaning up. This step can add extra work, especially for complex designs.

Entering the World of Multi-Material Printing

Recently, I upgraded to the Kobra 3 Combo for multi-material printing. While the obvious benefit is the ability to print in multiple colors, I was surprised by how it simplifies support removal. Using a different material for supports—like water-soluble filament or simply using different materials for the print and the supports, like PLA with PETG—makes the process much easier.

However, there are trade-offs. Multi-material printing (with a single extruder) increases waste and extends print times. Despite this, the Kobra 3 offsets longer prints with its impressive speed. It comfortably prints at 300mm/s, compared to the 80mm/s I used previously. For context, my first printer, the Monoprice IIIP, printed at just 30mm/s. While there are printers that use a separate extruder for each color, eliminating waste, those printers are much more expensive, well over $3,000.

Prioritizing Print Quality

Most of my prints are functional, so I usually don’t focus heavily on aesthetics. But when I achieve a silky smooth finish without post-processing, it’s incredibly satisfying. The Kobra 3 has exceeded my expectations in this area. With features like auto bed leveling, auto z-offset, and resonance compensation, it produces stunning results right out of the box. Resonance compensation reduces vibrations during accelerations and decelerations, ensuring fast and precise prints.

AI-Powered Spaghetti Detection

The Kobra 3 also offers advanced features like AI-driven spaghetti detection (with an optional camera). This technology uses computer vision to monitor prints and detect when something goes wrong, such as the dreaded tangled mess known as spaghetti. Although I haven’t tested this feature yet—the camera is still on its way—I’m excited to see how it works.

Update 2/8/2025

After more than 2 months and over 200 print hours, I’ve had a number of observations. First, the AI detection isn’t all it’s cracked up to be. While it hasn’t failed to detect a spaghetti mess, there actually haven’t been many to begin with. It has stopped a print for no reason more than once, so I’ve stopped using the feature. It is nice having an integrated camera, though, as I can take timelapse videos and even check on the status of my print when I’m away from home.

Additionally, it has sensors to detect when the filament isn’t moving as it should, and it will stop the print saying there’s a clog. There have been a few instances where there wasn’t actually a clog, but the filament was broken in the Bowden tube, so it was a problem that needed addressing.

The extruder assembly is modular, and comes off the printer with just 4 screws and is very easy to service. The hot end is also easily removable and replaceable. While I haven’t had to do a lot of maintenance yet, from what I’ve seen, this machine seems very well designed with ease of maintenance and repairs in mind. It is far easier to deal with than any other printer I’ve had.

Final Thoughts

3D printing has come a long way since I first started, and the journey has been incredibly rewarding. Each new printer and feature has brought more opportunities to create and experiment. With innovations like multi-material printing and AI monitoring, I can’t wait to see where the next chapter of 3D printing will take me.