Drupal is a registered trademark of Dries Buytaert
Release: Drupal 10.3.6 Update released for Drupal core (10.3.6)! Release: Drupal 11.0.5 Update released for Drupal core (11.0.5)! Release: Drupal 10.2.9 Update released for Drupal core (10.2.9)! Release: Drupal 10.2.10 Update released for Drupal core (10.2.10)! Release: Drupal 10.3.7 Update released for Drupal core (10.3.7)! Release: Drupal 11.0.6 Update released for Drupal core (11.0.6)! Release: Drupal 10.3.8 Update released for Drupal core (10.3.8)! Release: Drupal 11.0.7 Update released for Drupal core (11.0.7)! Module Revived: Translation Management Tool 8.x-1.19 Module tmgmt updated after 7 months of inactivity (8.x-1.19). Usage Milestone: Account field split Module account_field_split crossed 10,000 active installs.

Welcome to AIRefactor — Your Intelligent Code Refactoring Companion!

Transform the way you maintain and enhance your codebase with AIRefactor, the smart assistant that leverages AI to analyze, refactor, and optimize your PHP methods directly within Drupal. No more tedious code reviews or manual optimizations—let AIRefactor handle the heavy lifting and bring your code into the modern age!

Why Choose AIRefactor?

  • AI-Powered Insights – Harness the power of AI to detect code improvements and automatically refactor methods, enhancing readability and performance.
  • Instant Code Analysis – With just a Drush command, analyze and refactor entire files, all while receiving helpful code comparisons and suggested optimizations.
  • Drupal 10 Ready – Built to integrate seamlessly with Drupal 10, AIRefactor updates your code to align with the latest standards and practices.
  • Easy Confirmation Process – Preview refactored code side-by-side with the original, so you stay in control of every change.

🔐 Authentication Requirement

To use AIRefactor, you must provide a valid OpenAI API key. This key should be created at OpenAI's API Key Settings page.

Once you have your key, add it in the following locations within your Drupal admin:

  • System Keys: /admin/config/system/keys – Create a key entry named openai_api_key (or as configured).
  • OpenAI Provider Settings: /admin/config/ai/providers/openai – Select the appropriate key and model settings to enable the integration.

🚀 How It Works 🚀

Using AIRefactor is as easy as a Drush command:

drush ai_refactor:analyze path/to/your/file.php

AIRefactor analyzes each method in the specified file, identifies opportunities for improvement, and presents you with optimized alternatives using OpenAI's capabilities.

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Nov 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 2
Maintenance
Dormant

Releases

Version Type Core Release date
1.1.x-dev Dev Nov 8, 2024
1.0.x-dev Dev Nov 7, 2024