Download the PHP package julio/capyrel without Composer
On this page you can find all versions of the php package julio/capyrel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download julio/capyrel
More information about julio/capyrel
Files in julio/capyrel
Package capyrel
Short Description Laravel schema intelligence — interactive project wizard (capyrel:new) + existing-DB scaffold: models, controllers, routes, API resources, tests, factories, OpenAPI, TypeScript, and more.
License MIT
Homepage https://github.com/JulioOxalis/Capyrel
Informations about the package capyrel
Capyrel
Schema intelligence for Laravel. Describe your project in plain English, or point Capyrel at an existing database — it handles models, migrations, controllers, routes, API specs, tests, and more.
Laravel 11 & 12 · PHP 8.2+ · MySQL · PostgreSQL · SQLite · MongoDB
Two modes
| Mode | When to use | Entry point |
|---|---|---|
| New project | Starting fresh, no database yet | php artisan capyrel:new |
| Existing database | DB already exists, need the boilerplate | php artisan model:scaffold |
Quick start — new project
Capyrel writes:
app/Models/Post.php— fillable, casts, relationships, traitsdatabase/migrations/2026_05_24_000000_create_posts_table.php
Then run:
Quick start — existing database
Project examples
Blog platform
Generated in ~30 seconds:
- 5 models with all relationships + casts
- 5 migrations
- 5 controllers with paginated
index(), search, eager loading - 5 API Resources (N+1-proof via
whenLoaded) - 10 Form Requests with column-derived validation rules
- Pest tests for every relationship
- Full OpenAPI spec ready for Postman/Swagger
E-commerce store
SaaS with teams + subscriptions
REST API only
All commands
New project wizard
The wizard:
- Detects your installed packages (Livewire, Scout, Sanctum, Spatie, Cashier, Filament)
- Parses your description into entities using NLP (Python 3, stdlib only) or PHP heuristics
- Matches each entity to an archetype (20+ archetypes: post, product, order, user, invoice…)
- Shows proposed fields in an interactive table — add, remove, rename, toggle soft deletes
- Loops: "Add another model?" until you're done
- Writes models + migrations
Existing database scaffolding
Writes to each model:
Writes to each controller:
Relationship map
API layer
StorePostRequest.php (auto-generated):
Rule inference: varchar(255) → max:255 · nullable → removes required · *_id FK → exists:table,id · unique index → Rule::unique() · column email → adds email rule · column *_url → adds url rule
Tests
Generated Pest test:
Factories + Seeders
Column-aware: email → fake()->email() · *_at → fake()->dateTime() · boolean → fake()->boolean() · decimal → fake()->randomFloat(2, 1, 999) · *_id FK → uses related factory
Architecture layer
Real-time + integrations
Contract generation
Safety + ops
Utilities
Flash notifications
Every generated view includes <x-capyrel-flash /> — a zero-dependency toast component registered by Capyrel's service provider. No setup required.
Session flashes work automatically:
Programmatic (from JS):
From AJAX handlers (used internally by generated forms):
Supported types: success · error · warning · info
Features: slide-in animation · color-matched progress bar · close button · dark mode (data-theme, data-bs-theme, .dark)
Health check
Every model:scaffold and capyrel:audit run checks your schema:
| Check | What it finds |
|---|---|
| N+1 risk | Relationship access without eager loading |
| Missing index | FK columns with no index — full table scan |
| Orphan FK | *_id columns pointing to tables that don't exist |
| Inverse missing | One-sided relationship — A→B defined, B→A not |
| Naming conflict | Generated method name clashes with existing method |
| Soft-delete drift | deleted_at column without SoftDeletes trait |
| Eager load depth | hasManyThrough chains 3+ levels deep |
| Circular dependency | Self-referential eager load that would loop |
| Cascade risk | FK with no ON DELETE rule |
| Dead relationship | Defined but never referenced anywhere |
| Fillable drift | $fillable fields that don't exist in the table |
| Morph registry | morphTo without Relation::morphMap() |
Python NLP helper
capyrel:new optionally calls python/capyrel_nlp.py (bundled, stdlib only — no pip installs) for richer entity and field detection:
Falls back to PHP heuristics automatically if Python 3 is not available, or pass --no-python to always use PHP.
Database support
| Database | Schema reading | FK detection | Index detection |
|---|---|---|---|
| MySQL / MariaDB | ✓ | ✓ | ✓ |
| PostgreSQL | ✓ | ✓ | ✓ |
| SQLite | ✓ | ✓ | ✓ |
| MongoDB | ✓ (document sampling + migration fallback) | ✓ (convention) | ✓ |
Configuration
config/capyrel.php controls:
Requirements
- PHP 8.2+
- Laravel 11.x or 12.x
- Python 3 (optional — only for richer
capyrel:newNLP; PHP fallback always available)
License
MIT