Search by

curly-deni / laravel-prompts

curly-deni

Prompt rendering infrastructure for Laravel applications.

Package info

github.com/curly-deni/laravel-prompts

pkg:composer/curly-deni/laravel-prompts

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0 2026-09-30 11:30 UTC

This package is auto-updated.

Last update: 2026-09-30 11:31:36 UTC


README

Versioned Markdown Blade prompt templates for Laravel applications.

Installation

composer require curly-deni/laravel-prompts

Laravel discovers the service provider automatically. Publish the config when you need to customize the prompt directory or active versions:

php artisan vendor:publish --tag=laravel-prompts-config

By default templates are read from resources/prompts. Organize them under layouts and parts, using the logical name and version in each filename:

resources/prompts/
├── layouts/welcome/greeting_v2.md.blade.php
└── parts/shared/signature_v1.md.blade.php

Set active versions in config/prompts.php. Names can be dot-separated keys or nested arrays:

'layouts' => [
    'welcome.greeting' => 2,
],
'parts' => [
    'shared.signature' => 1,
],

Usage

Render a full prompt and pass data to its Blade template:

use Aesis\Prompts\Services\PromptService;

$prompt = app(PromptService::class)->renderPrompt('welcome.greeting', [
    'name' => 'Ada',
]);

Render a reusable part from a Blade view:

@prompt('shared.signature')

You can select a part version explicitly with renderPart('shared.signature', 2) or @prompt('shared.signature', 2). Template names accept letters, numbers, underscores, and hyphens in each dot-separated segment.

Development

composer test
composer format
composer analyse

License

MIT. See LICENSE.md.