plugs/plugs

Plugs is a modern, lightweight PHP framework by Amisu Usman (Celio Natti) - built for developers who crave speed, structure, and freedom. Its modular design and intuitive syntax make web development faster, cleaner, and more connected - your power source for smart PHP projects. ⚡

Maintainers

Package info

github.com/celionatti/plugs

pkg:composer/plugs/plugs

Statistics

Installs: 159

Dependents: 1

Suggesters: 0

Stars: 1

Open Issues: 0

v6.3.1 2026-04-02 11:54 UTC

README

Plugs Framework Banner

Plugs Framework

The High-Performance, AI-Native Core Engine for Modern PHP.

FeaturesInstallationSetup & InstallerDocumentation

⚡ Introduction

Plugs is the lightweight, blazing-fast core engine that powers the ThePlugs application framework. Designed for speed, structure, and developer happiness, it serves as the beating heart of your PHP applications.

  • Plugs (plugs/plugs): The Core Framework Library (Engine).
  • ThePlugs (theplugs/theplugs): The Application Skeleton (Starter Project).

Whether you are building a simple API, a complex web application, or an AI-powered agent, Plugs provides the robust foundation you need.

🚀 Key Features

🏎️ Performance First

  • Built-in OPcache Management: Production-ready caching strategies out of the box.
  • Fast Routing: Optimized route matching algorithm.
  • Minimal Footprint: Low memory overhead.

🧠 AI-Native

  • Integrated AI Drivers: First-class support for Gemini, Anthropic, OpenAI, and Ollama.
  • Agentic Workflows: Build autonomous agents with the built-in Agent class.
  • CLI AI Tools: Chat and fix code directly from the terminal (ai:chat, ai:fix).

📦 Full-Stack Capable

  • Web Installer: A beautiful, built-in installer to set up your environment, database, and admin account in seconds.
  • View Engine V5:
    • 🛡️ Context-Aware Escaping: Zero-config security that auto-detects HTML, Script, and Attribute contexts.
    • 🏷️ Modern Tag Syntax: Native <if>, <loop>, and <layout> tags for cleaner templates.
    • 🚀 Next-Gen Performance: Optimized compilation and opcache integration.
  • Database: Fluent query builder and Active Record ORM.
  • Security: Built-in Shield, CSRF protection, and encryption.

📦 Installation

Option 1: Start a New Project (Recommended)

To create a new application using the Plugs architecture, use the ThePlugs skeleton:

composer create-project theplugs/theplugs my-app

Option 2: Install Core Engine (Integration)

If you already have a project structure and want to integrate the Plugs Core Engine:

composer require plugs/plugs

Note: The core package includes a public/install folder that assists in generating the necessary file structure and configuration for your project.

🛠️ Setup & Web Installer

One of the standout features of Plugs is its zero-friction setup. Once you have installed the framework:

  1. Start the Server:

    php theplugs serve
  2. Run the Installer: Navigate to http://localhost:8000/install in your browser.

    The installer will guide you through:

    • System Requirements Check
    • 🗄️ Database Configuration (MySQL, PostgreSQL, SQLite)
    • ⚙️ Application Settings
    • 👤 Admin Account Creation

    Once completed, your application framework—folders, configuration, and database—will be fully generated and ready to go!

🏁 Quick Start

Routing

Define routes in routes/web.php or routes/api.php:

use Plugs\Facades\Route;

Route::get('/', function () {
    return view('welcome');
});

Route::get('/users', [UserController::class, 'index']);

Controllers

Generate a controller using the CLI:

php theplugs make:controller UserController
namespace App\Http\Controllers;

use App\Models\User;
use Plugs\Base\Controller\Controller;

class UserController extends Controller
{
    public function index()
    {
        return view('users.index', [
            'users' => User::all()
        ]);
    }
}

AI Chat

Interact with your AI driver immediately:

php theplugs ai:chat "Explain how the Service Container works"

📚 Documentation

For comprehensive documentation, please explore the docs folder. Here are some quick links:

🚀 Getting Started

🧩 The Basics

🗄️ Database

🛡️ Security

🤖 AI Features

⚡ Advanced

🤝 Contributing

We welcome contributions to the Core Engine! Please see our CONTRIBUTING.md for details.

📄 License

The Plugs Framework is open-sourced software licensed under the Apache 2.0 License.

Designed & Developed by Celio Natti