PHPackages                             alphavel/alpha - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. alphavel/alpha

ActiveLibrary[Framework](/categories/framework)

alphavel/alpha
==============

Alphavel Framework CLI - Intelligent code generation and scaffolding toolkit

v1.0.0(5mo ago)01MITPHPPHP &gt;=8.4

Since Nov 26Pushed 5mo agoCompare

[ Source](https://github.com/alphavel/alpha)[ Packagist](https://packagist.org/packages/alphavel/alpha)[ RSS](/packages/alphavel-alpha/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Alphavel Alpha CLI
==================

[](#alphavel-alpha-cli)

Alphavel Framework CLI - Intelligent code generation and scaffolding toolkit.

Features
--------

[](#features)

### 🧠 Intelligent Code Generation

[](#-intelligent-code-generation)

- **Schema-Aware**: Reads your database schema to generate context-aware code
- **Validation Generation**: Automatically converts SQL types to validation rules
- **Relationship Detection**: Analyzes Foreign Keys to generate Model relationships
- **Smart Controllers**: Generates CRUD operations based on actual table structure

### 🚀 Core Commands

[](#-core-commands)

```
# Generate schema-aware controller
php alpha make:controller UserController --model=User

# Generate model from database table
php alpha make:model User --table=users

# Generate complete resource (Model + Controller + Routes)
php alpha make:resource User

# Docker utilities
php alpha make:docker

# IDE Helper generation
php alpha make:ide-helper

# Interactive REPL
php alpha tinker
```

### 📊 Schema Inspector

[](#-schema-inspector)

The Schema Inspector reads your MySQL database structure:

```
// Automatically detects:
- Column types (varchar → string, int → integer)
- Nullable columns (nullable validation rule)
- Default values
- Indexes and keys
- Foreign key relationships
- Enum values
```

### ✅ Intelligent Validation

[](#-intelligent-validation)

Converts SQL schema to validation rules:

```
CREATE TABLE users (
    id INT PRIMARY KEY AUTO_INCREMENT,
    name VARCHAR(100) NOT NULL,
    email VARCHAR(255) NOT NULL UNIQUE,
    age INT UNSIGNED,
    status ENUM('active', 'inactive') DEFAULT 'active'
);
```

Generates:

```
$rules = [
    'name' => 'required|string|max:100',
    'email' => 'required|email|max:255|unique:users,email',
    'age' => 'integer|min:0',
    'status' => 'in:active,inactive'
];
```

### 🔗 Relationship Detection

[](#-relationship-detection)

Automatically detects relationships from Foreign Keys:

```
CREATE TABLE posts (
    id INT PRIMARY KEY,
    user_id INT NOT NULL,
    FOREIGN KEY (user_id) REFERENCES users(id)
);
```

Generates in `Post` model:

```
public function user(): BelongsTo
{
    return $this->belongsTo(User::class);
}
```

And in `User` model:

```
public function posts(): HasMany
{
    return $this->hasMany(Post::class);
}
```

Installation
------------

[](#installation)

### As Project Dependency

[](#as-project-dependency)

```
composer require alphavel/alpha --dev
```

### Global Installation

[](#global-installation)

```
composer global require alphavel/alpha
```

Usage
-----

[](#usage)

### List Available Commands

[](#list-available-commands)

```
php alpha list
```

### Get Help for Command

[](#get-help-for-command)

```
php alpha make:controller --help
```

Requirements
------------

[](#requirements)

- PHP 8.2 or higher
- MySQL 5.7+ or MariaDB 10.2+
- Composer

Development
-----------

[](#development)

### Running Tests

[](#running-tests)

```
composer test
```

### Code Style

[](#code-style)

```
composer cs-fix
```

Architecture
------------

[](#architecture)

```
alpha/
├── src/
│   ├── Console/
│   │   ├── Command.php           # Base Command class
│   │   ├── Console.php            # Console application
│   │   └── Commands/              # Built-in commands
│   ├── Generators/
│   │   ├── SchemaInspector.php    # Database schema reader
│   │   ├── ValidationGenerator.php # SQL → Validation rules
│   │   └── RelationshipDetector.php # FK → Model relationships
│   └── Stubs/                     # Code templates
├── bin/
│   └── alpha                      # CLI entry point
└── tests/

```

License
-------

[](#license)

MIT License - see LICENSE file for details

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance70

Regular maintenance activity

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

173d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/51c953df141d0cfd39946d3e417b2eb3106d96170c62c4c908a6cc0b75352883?d=identicon)[arthur4weber](/maintainers/arthur4weber)

---

Top Contributors

[![arthur2weber](https://avatars.githubusercontent.com/u/9046093?v=4)](https://github.com/arthur2weber "arthur2weber (9 commits)")

---

Tags

cliconsoleframeworkscaffoldingartisancode-generationalphavel

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/alphavel-alpha/health.svg)

```
[![Health](https://phpackages.com/badges/alphavel-alpha/health.svg)](https://phpackages.com/packages/alphavel-alpha)
```

###  Alternatives

[fly-apps/fly-laravel

A cli tool for launching and deploying Laravel apps on Fly.io

431.3k](/packages/fly-apps-fly-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
