vigenphp / vigen
Vigen is a modern PHP framework built around AI-first development and vibe coding. Describe what you want. Vigen builds it.
Requires
- php: ^8.2
- composer-plugin-api: ^2.0
- guzzlehttp/guzzle: ^7.8
- nikic/php-parser: ^5.0
- symfony/console: ^7.0
- vlucas/phpdotenv: ^5.6
Requires (Dev)
- composer/composer: ^2.7
- friendsofphp/php-cs-fixer: ^3.0
- phpunit/phpunit: ^11.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Vigen
Describe what you want. Vigen builds it.
Vigen is a modern PHP framework built around AI-first development and vibe coding. Instead of hand-writing controllers, models, migrations, and routes, you describe the outcome you want and Vigen's AI engine analyzes your project, plans the change, generates or modifies the necessary files, validates the result, and fixes what it finds broken.
Vibe. Build. Evolve.
Quick start
Starting a brand new project (recommended)
composer global require vigenphp/installer vigen create my-app cd my-app composer install php vigen gui # if you chose GUI php vigen chat "Create a user management system" # if you chose CLI
vigen create asks three questions - chat interface, default AI provider, and model - then scaffolds the whole project (folders, composer.json, .env, your project's own vigen entry point) in one go. See vigenphp/installer.
Adding Vigen to an existing PHP project
composer require vigenphp/vigen php vigen init
Composer will ask whether to trust Vigen's plugin (it publishes the vigen script below, nothing more):
Do you trust "vigenphp/vigen" to execute code and control other plugins?
Answer y, or pre-approve it in composer.json:
"config": { "allow-plugins": { "vigenphp/vigen": true } }
This creates a vigen file in your project root - your equivalent of Laravel's artisan. From then on:
php vigen init
walks you through setup:
Choose chat preferred:
> CLI
GUI
Which default AI Provider:
> Ollama (Offline)
OpenAI
Claude
Gemini
Which model to use:
> qwen2.5-coder:14b
qwen2.5-coder:7b
deepseek-coder-v2:16b
codellama:13b
It writes your answers to .env and scaffolds a fresh Vigen project (app/, routes/, database/, config/, public/, resources/views/, .vigen/).
- Chose CLI? Talk to your project directly:
php vigen chat "Create a simple employee management application with employees, departments, CRUD operations, validation, and search." - Chose GUI? Launch the built-in chatbox:
php vigen gui
then openhttp://127.0.0.1:8808.
Either way, no manual file creation - Vigen determines the implementation.
Running your application
Generating code and serving it are different commands:
php vigen migrate # create the tables your migrations describe php vigen serve # run your app at http://127.0.0.1:8808
php vigen serve used to start the chatbox; that is now php vigen gui. So the
loop is: php vigen gui to generate a feature, php vigen serve to use it.
Vigen's generated code targets Vigen's own runtime - $router in routes/web.php,
Vigen\Http\Request/Response, plain-PHP views in resources/views/,
Vigen\Database\Model, and Vigen\Auth\Auth. It is not Laravel: there is no
Illuminate\, no facades, no Eloquent, no Blade. Every generated file is parsed
before it is written, so code written against another framework is caught and
corrected rather than written out to fatal later.
Prefer not to trust the plugin, or it didn't run (e.g.
--no-plugins)? Runphp vendor/vigenphp/vigen/bin/vigen initdirectly, or copyvendor/vigenphp/vigen/stubs/vigento./vigenyourself. (Novendor/bin/vigenproxy is registered - that name belongs to the globalvigenphp/installercommand, so the two never collide.)
Supported AI providers
- Ollama (local models, first-class)
- OpenAI
- Claude
- Gemini
Switching providers is a .env change - never a code change.
CLI and GUI, one engine
vigen chat "Add authentication with login and registration"
The same AI engine also powers a minimal built-in GUI chatbox. Neither interface implements its own AI logic.
Documentation
| Getting started | Install, init, and the serve-vs-gui loop |
| CLI | Every command, and how to read the output |
| Prompting | What to ask for, and the API the model is given |
| Routing | routes/web.php, parameters, middleware |
| Requests and responses | Input, validation, responses, sessions, errors |
| Views | Plain-PHP templates, escaping, CSRF, form errors |
| Database | Migrations, models, the query builder, SQLite/MySQL |
| Authentication | Hash, the Auth guard, a complete login module |
| Project structure | Every directory, and how a request flows |
| Configuration | config/*.php and .env |
| AI providers | Ollama, OpenAI, Claude, Gemini |
| Troubleshooting | 404s, 419s, and "Vigen generated Laravel code" |
Status
Vigen is in early MVP development. See docs/ for usage documentation and CHANGELOG.md for progress.
License
MIT. See LICENSE.

