PHPackages                             ewm/openai-bundle - 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. [Image &amp; Media](/categories/media)
4. /
5. ewm/openai-bundle

ActiveSymfony-bundle[Image &amp; Media](/categories/media)

ewm/openai-bundle
=================

Open Ai Bundle for Sulu

1.0.0(12mo ago)228MITPHPPHP &gt;=8.1

Since May 20Pushed 12mo ago1 watchersCompare

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

READMEChangelogDependenciesVersions (2)Used By (0)

EWM OpenAI Bundle | Sulu CMS Integration
========================================

[](#ewm-openai-bundle--sulu-cms-integration)

[![By EWM](https://camo.githubusercontent.com/703f932de4a3cfbabca4db05ce6fae41775cd0c320084fe0a057d88f67e4d753/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f42792d45574d2d626c75652e737667)](https://ewm.com)[![License](https://camo.githubusercontent.com/20ff1b533ad82312caf6ba05132ad6c90b77baa9218a557717abaa6c8002f365/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f65776d2f6f70656e61692d62756e646c652e737667)](https://packagist.org/packages/ewm/openai-bundle)[![Version](https://camo.githubusercontent.com/296e00eb7100a13a63622562dbf7b401b3773cd2c3ba0cf1c625afe33e81869b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f65776d2f6f70656e61692d62756e646c652e737667)](https://packagist.org/packages/ewm/openai-bundle)A Symfony/Sulu bundle that **generates AI-powered descriptions for media** using OpenAI.
Perfect for automating metadata in Sulu CMS!

---

✨ Features
----------

[](#-features)

- **Auto-generate descriptions** for Sulu media uploads using OpenAI GPT.
- **Customizable prompts** tailored to media types (e.g., "Describe this image for accessibility").
- **Admin UI integration** – Generate descriptions with a click in Sulu Admin.
- **Event-driven** – Automatically trigger descriptions on media upload.

---

📦 Installation
--------------

[](#-installation)

1. Install the bundle via Composer:

    ```
    composer require ewm/openai-bundle
    ```
2. Add the necessary environment variables to your `.env` file:

    Before using the bundle, ensure that the following environment variables are added to your `.env` file:

    - **`HOSTNAME`**: The public URL or hostname of your website. This variable defines the base URL from which the bundle can access resources, such as images.

        Example:

        ```
        HOSTNAME=https://example.com
        ```
    - **`OPEN_API_KEY`**: The API key required to authenticate your requests to the OpenAI service. You can generate and obtain this key directly from your OpenAI account.

        Example:

        ```
        OPEN_API_KEY=your-api-key-here
        ```

    **Example `.env` file:**

    ```
    # OpenAI API Configuration
    HOSTNAME=https://example.com
    OPEN_API_KEY=your-api-key-here
    ```

🛠 Usage
-------

[](#-usage)

After installation and configuration, you can generate media descriptions using the following console command:

```
php bin/console media:create-description
```

This command will:

✅ Automatically generate AI-based image descriptions for all media items in your Sulu CMS that do not yet have a description.

🌐 Processes all supported locales defined in your Sulu webspace configuration (e.g., en, fr, de, es, it).

🖼 Targets only image media files, ensuring that only relevant media are analyzed.

📊 Displays a progress bar in the terminal to track processing in real-time.

📝 Logs all activity (including errors and processed image) in a dedicated file: `/var/log/openai.log`

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance50

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity45

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

364d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8fc7f2a03b802dd6b2ab35372ed2ca88f3f5320a1d676821a21b5b315d39f2a7?d=identicon)[ewm-tn](/maintainers/ewm-tn)

![](https://www.gravatar.com/avatar/349eed28cd8ba10cd4edfc02f10da6f9855b232df79f0329d17f899d1fd37d3e?d=identicon)[amir-souissi](/maintainers/amir-souissi)

---

Top Contributors

[![ewm-tn](https://avatars.githubusercontent.com/u/168114418?v=4)](https://github.com/ewm-tn "ewm-tn (12 commits)")

---

Tags

phpsymfonybundleaiopenaimediacmssulu

### Embed Badge

![Health badge](/badges/ewm-openai-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/ewm-openai-bundle/health.svg)](https://phpackages.com/packages/ewm-openai-bundle)
```

###  Alternatives

[deepseek-php/deepseek-php-client

deepseek PHP client is a robust and community-driven PHP client library for seamless integration with the Deepseek API, offering efficient access to advanced AI and data processing capabilities.

47073.9k5](/packages/deepseek-php-deepseek-php-client)[jolicode/media-bundle

A media management bundle for Symfony applications, with Easyadmin and SonataAdmin integrations.

1054.9k](/packages/jolicode-media-bundle)[tomatophp/filament-media-manager

Manage your media files using spatie media library with easy to use GUI for FilamentPHP

14543.9k3](/packages/tomatophp-filament-media-manager)[mediamonks/sonata-media-bundle

A powerful, flexible and easy to use alternative for the existing Sonata Media Bundle

109.8k](/packages/mediamonks-sonata-media-bundle)[okipa/laravel-medialibrary-ext

Extra features for spatie/laravel-medialibrary package.

1011.2k](/packages/okipa-laravel-medialibrary-ext)

PHPackages © 2026

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