Download the PHP package vaersaagod/aimate without Composer

On this page you can find all versions of the php package vaersaagod/aimate. 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 aimate

AIMate

Ai ai, mate.

AIMate brings OpenAI-powered content generation to the Craft CMS control panel: generate alt text, detect focal points and produce search keywords for image assets, and run your own text prompts against any supported field — from element edit pages, the element index, the console, or your own code.

Requirements

AIMate talks to OpenAI's Chat Completions (vision) API via openai-php/client. Until an API key is configured the plugin stays completely inert — no menus, actions or listeners are registered.

Installation

Configuration

AIMate has no control-panel settings screen — it's configured entirely through a config/aimate.php (or, matching the plugin handle, config/_aimate.php) file, which behaves like any other Craft config file (multi-environment arrays are supported). At minimum you need an API key:

Settings

Setting Type Default Description
openAIApiKey string – Your OpenAI API key. Best set from an environment variable.
model string gpt-5.4-mini Default OpenAI model used for every call.
prompts array null Reusable text-prompt definitions, keyed by handle (see Prompts).
fields array [] Which fields the prompt actions appear on, keyed by field handle, field class or '*'. Set an entry to false to disable a field.
altTextHandle string alt The asset attribute/field that generated alt text is written to (Craft's native alt, or a custom field handle).
autoAltTextEnabled bool false Automatically generate alt text when an image asset is saved or replaced without any.
autoFocalPointEnabled bool false Automatically detect a focal point when an image asset is saved or replaced without one.
safeImageFormats array ['jpg','jpeg','png','gif','webp'] File extensions eligible for automatic processing.
thumbSize int 512 Max width/height (px) of the JPEG transform sent to OpenAI. Smaller = cheaper/faster.
useImagerIfInstalled bool true Use Imager/ImagerX for the outgoing transform when the plugin is installed.
base64EncodeImage string auto Whether the image is inlined as a data: URI (always), sent as a URL (never), or decided automatically (auto).
temperature float 0.7 Default temperature for text prompts.
maxWordsMultiplier float 1.5 Multiplier applied to a prompt's target word count.

Auto alt text and auto focal point only run for new image assets (and on file replace) whose extension is in safeImageFormats, and only when the value is missing — existing alt text and manually-set focal points are never overwritten. Both run as queue jobs.

Prompts

prompts defines reusable text prompts that surface as actions on element edit pages and on supported fields. Each prompt is keyed by its handle:

The <text> placeholder is replaced with the field's current value. A prompt whose template contains no <text> placeholder can generate content from scratch (e.g. "Write a product description for …").

Restricting prompt fields

Use fields to control where prompt actions appear:

Prompt actions are supported on the native Entry title, Asset title and Alt fields, and on Plain Text, Table (single/multi-line columns) and CKEditor / Redactor custom fields.

Features

Alt text

Generates WCAG-minded, non-decorative alt text in the asset's site language and writes it to altTextHandle. Available:

Focal point

Detects the most salient subject (faces prioritised) and sets the asset's native focal point, clearing existing transforms so they regenerate. Same entry points as alt text: auto (autoFocalPointEnabled), the Generate focal point index action, the AI menu, php craft _aimate/asset/focal-point, and AssetService::getFocalPointForAsset().

Keywords

Generates a de-duplicated list of search keywords for an image. Unlike alt text and focal point, keywords are returned to the caller, not saved — this is a building block for DAM-style keyword/tagging workflows. See AssetService::getKeywordsForAsset().

Combined analysis

AssetService::analyzeImage() produces any combination of alt text, keywords and a focal point in a single vision call rather than one call per task — cheaper and faster when you want more than one. Results are returned, not saved.

Programmatic API

All methods live on the asset service component (\vaersaagod\aimate\AIMate::getInstance()->asset):

getKeywordsForAsset() and analyzeImage() throw InvalidArgumentException if the asset isn't an image. For GPT‑5 reasoning models, AIMate automatically requests the lowest supported reasoning effort for the image tasks to keep latency and cost down.

Extending the AI menu

The AI disclosure menu on element edit pages is extensible. Listen for CpHelper::EVENT_DEFINE_ELEMENT_ACTIONS and add your own items via the DefineAiActionsEvent:

Items use Craft's Cp::disclosureMenu() format. AIMate only renders the items — your plugin/module is responsible for handling the click (typically a data-* attribute plus a delegated JS handler).

Console commands

--volume defaults to * (all volumes) and --onlyEmpty defaults to true (skip assets that already have a value).

Price, license and support

Released under the Craft license and may be subject to license fees. Made for Værsågod and friends; no support is given, though submitted issues are resolved when they scratch an itch.

Changelog

See CHANGELOG.md.

Credits

Brought to you by Værsågod.


All versions of aimate with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2.0
craftcms/cms Version ^5.9.0
openai-php/client Version ^v0.10.3
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 vaersaagod/aimate contains the following files

Loading the files please wait ...