Using AI tools with OctoberCMS — any experiences?

Hi everyone,
Has anyone here tried using AI tools (like ChatGPT, GitHub Copilot, Cody, etc.) to assist with OctoberCMS development — for example, generating plugins, components, or Twig templates?

I’d love to hear about any tools, workflows, or tips that have worked well for you, as well as any limitations or challenges you’ve encountered.

Thanks for sharing your experience!

Hey @ridha82,

Have you tried Claude Code? I’ve found it pretty handy to leverage for the gruntwork.

Hi @ridha82

I’ve been playing specifically with Claude Code to generate TWIG template with AlpineJS and it has been quite good. I also built a complete specific gamification plugin which works fine, is extensible, with the associated tests.

Hey @apinard @chris

Thank you for your replies, I will test Claude Code.

I’ve been trying https://www.trae.ai/ (its VS Code fork) and I’m honestly impressed by how smooth the integrations feel. I’m using it together with MCP Context7, and quite often it can one-shot plugins or features with minimal correction needed.

I needes to extens Shopaholic Products with 3 new fields, handeled, migrations, version, extended, Form fields, extended XML import logic for multilingual XML imports, and addes all 3 languages to backend UI also added so new fields are cached for frontend Thanks to Lovata.Toolbox plugin. And in second promt added fields to frontend.

For my projects, I usually instruct it to:

  • Use Lovata.Toolbox for caching
  • Follow the Lovata code style conventions

It handles this surprisingly well and keeps the structure clean and consistent.

That said, it sometimes needs gentle reminders about core principles like DRY and SRP. Ok, somtimes not so gentle. :see_no_evil::joy:

Example of DRY encouragement

Instead of repeating logic:

$total = $this->calculatePrice($items);
$discountedTotal = $this->calculatePrice($items) * 0.9;

I remind it to refactor:

$fTotalPrice = $this->calculatePrice($aItems);
$fDiscountedTotal = $fTotalPrice * 0.9;

SRP reminder example

When it creates bloated methods like:

public function processOrder()
{
    $this->validateOrder();
    $this->saveOrder();
    $this->sendEmailNotification();
    $this->generateInvoice();
}

I usually ask it to split responsibilities:

public function processOrder()
{
    $this->validateOrder();
    $this->persistOrder();
}

protected function persistOrder()
{
    $this->saveOrder();
    $this->generateInvoice();
}

Naming & readability

I also remind it to:
• Avoid abbreviations
• Use descriptive, self-explanatory names and variables

:white_check_mark: Preferred:

public function calculateTotalCartPrice(array $aCartItems): float

:x: Avoid:

public function calcTot(array $arr)

Hungarian Notation (my personal preference)

I like using Hungarian notation for additional clarity:

$obUserProfile = new UserProfile();
$sUserName = 'JohnDoe';
$iOrderCount = 5;
$fTotalPrice = 199.99;
$bIsActive = true;
$arProductList = [];

This makes it immediately obvious what type or intent a variable has, especially in large codebases.