Download the PHP package baconfy/prompt without Composer

On this page you can find all versions of the php package baconfy/prompt. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package prompt

Prompt

Tests Latest Version License Total Downloads PHP Version

Manage AI prompts in Laravel as Markdown files (with optional YAML front matter) or database records, rendered through Blade.

Why

LLM prompts are configuration. They drift across the codebase, get duplicated, and end up hardcoded as long strings inside services. This package treats prompts as first-class assets:

Requirements

Installation

The service provider auto-registers. Publish what you need:

Quick start

Create a prompt at resources/prompts/welcome.md:

Render it:

Use the metadata to drive your LLM call:

Front matter

Front matter is an optional YAML block at the top of the prompt:

Behavior:

Drivers

File driver

Default. Reads from resources/prompts/*.md. Dot notation maps to subfolders:

Database driver

Stores prompts in a prompts table with name and content columns. The content column holds raw markdown — exactly the same format as the file driver. Front matter, when present, sits inline at the top of content.

Migrating prompts between file and database drivers is a copy/paste — the storage format is identical.

Switch the default driver in .env:

Or use both side by side:

API

Helper

Facade

RenderedPrompt

ParsedFrontMatter

What Prompt::source() returns — pre-render. Useful when you want metadata without rendering Blade:

Prompt model

Eloquent model on the prompts table. Use it to seed, update, or otherwise manage DB-backed prompts:

The driver itself does not depend on this model — it reads via Query Builder. The model is a convenience for your CRUD layer.

CLI

Three Artisan commands ship with the package:

prompt:list accepts an optional driver argument (the name of any driver defined in config/prompt.php); omitting it iterates all drivers. prompt:show accepts a --driver= option to target a specific named driver instead of the active default. prompt:make is file-driver only — database prompts are created directly via the prompts table.

prompt:show is your debug companion: confirm what Prompt::source('welcome') will return before rendering anywhere.

Testing

Faking prompts

In your application's tests, replace the real driver with a stub so prompts don't hit the filesystem or database:

A plain string stub is wrapped in a RenderedPrompt with empty metadata; pass a RenderedPrompt instance when your code reads $prompt->metadata.

Factories

The Prompt model ships with an Eloquent factory for seeding test data when you use the database driver:

Configuration

config/prompt.php:

The drivers array supports any number of named entries. Each one has a driver field (file or database) plus the keys that driver needs. The same type can appear under multiple names (e.g. two file folders for system vs. user prompts).

Exceptions

Admin Panel

Prompt

Optional admin panel for managing prompts stored in the database driver. The file driver remains read-only and is meant to be managed via Git.

The panel ships as plain Blade views styled with Tailwind via CDN — no front-end build step, no JavaScript framework, no extra dependencies. Routes are mounted at /_prompts by default whenever prompt.panel.enabled is true.

Authorization

Two equivalent options (the callback wins if both are present):

If neither is defined, the panel responds 403.

Features

Versioning model

Every save inserts a new row in the prompts table; existing rows are never updated. Rows sharing a name form a version chain:

Configuration

Publish the views to customize them:

Security

Blade compiles prompt content. Do not load prompt content from untrusted sources. A prompt containing {{ system('rm -rf /') }} would execute that PHP if rendered. Treat prompts as code, not user input.

The panel is gated by Panel::auth() / Gate and ships behind the web middleware group by default — it is not safe to expose publicly without authorization.

Development

Run the package test suite:

Boot a local dev environment (Orchestra Testbench workbench + SQLite):

The workbench wires Panel::auth() to always allow, so / redirects to /_prompts ready to use.

Credits

License

See LICENSE for details.


All versions of prompt with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/console Version ^12.0|^13.0
illuminate/contracts Version ^12.0|^13.0
illuminate/database Version ^12.0|^13.0
illuminate/filesystem Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
illuminate/view Version ^12.0|^13.0
symfony/yaml Version ^7.0|^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package baconfy/prompt contains the following files

Loading the files please wait ...