Download the PHP package in2code/alternative without Composer

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

Alternative - AI generated metatags for images in TYPO3 with Google Gemini

Introduction

This TYPO3 extension allows setting alternative texts, title labels and a description for images in a filestorage. This can be done via file list backend module or via command on the CLI.

Example metadata labels from AI:

Example backend integration:

Example CLI command:

Google Gemini API

Installation

After that, you have to set some initial configuration in Extension Manager configuration:

Title Default value Description
setAlternative 1 Toggle function: Set a value for alternative text
setTitle 1 Toggle function: Set a value for image title
setDescription 1 Toggle function: Set a value for a description
showButtonInFileList 1 Show or hide button in backend module file list
apiKey - Google Gemini API key. You can let this value empty and simply use ENV_VAR "GOOGLE_API_KEY" instead if you want to use CI pipelines for this setting
geminiModel - Gemini model. If empty the default model gemini-3.5-flash-lite:generateContent is used. Add a specific model or use the GOOGLE_GEMINI_MODEL environment variable instead
limitToLanguages - If set, limit to this language identifiers only. Use a commaseparated list of numbers
maxLengthTitle 50 Maximum number of characters for the title field
maxLengthAlternative 125 Maximum number of characters for the alternative text field
maxLengthDescription 255 Maximum number of characters for the description field
promptPrefixFile - Path to a text file with custom prompt prefix (e.g. EXT:extension/Resources/Private/prompt.txt or fileadmin/promptprefix.txt or /var/www/prompt.txt)

Note: It's recommended to use ENV vars for in2code/alternative instead of saving the API-Key in Extension Manager configuration

CLI commands

Custom LLM Integration (like ChatGPT, Claude, Mistral, etc.)

Alternative uses a factory pattern to allow custom LLM providers. By default, it uses Google Gemini, but you can easily integrate other AI services (OpenAI, Claude, local models, etc.).

Implementing a Custom LLM Repository

  1. Create a custom repository class implementing RepositoryInterface - see example for OpenAI ChatGPT:

  2. Register your custom repository in ext_localconf.php:

Hint: Don't forget to register your Repository in your Services.yaml and flush caches

Changelog and breaking changes

Changelog

Version Date State Description
5.1.0 2026-08-20 Feature Allow metadata generation for images in a whole folder, update default gemini model, set thinkingLevel for Gemini 3.x, various bugfixes (field filtering, non-image file filtering, bulk error handling)
5.0.0 2026-07-05 Feature Make gemini model overwriteable via ENV or extension settings
4.1.0 2026-02-04 Feature Skip and log errors feature on CLI
4.0.1 2026-02-04 Bugfix Harden response handling against invalid formats
4.0.0 !!! 2026-02-04 Feature Performance update for systems with a lot of languages
3.0.1 2026-02-02 Task Add funding section to composer.json
3.0.0 2026-01-28 Feature Configure max length, configure a pre-prompt text, some improvements for local development
2.0.0 2025-12-31 Feature Prepare overruling of the GeminiRepository
1.2.0 2025-12-07 Feature Support TYPO3 14, use better titles and icons, decrease length for metadata, skip missing images
1.1.0 2025-12-04 Feature Add ddev as local environment, prevent syntax error in PHP 8.2
1.0.0 2025-12-03 Task Initial release of in2code/alternative

Breaking changes

Update to version 4.0.0: If you have implemented your own LLM by extending RepositoryInterface with your own PHP class, you have to adjust your integration with multilanguage support now. See implementation example above.

Contribution with ddev

This repository provides a DDEV-backed development environment. If DDEV is installed, simply run the following commands to quickly set up a local environment with example usages:

Backend Login:

Installation hint:

  1. Install ddev before, see: https://ddev.readthedocs.io/en/stable/#installation
  2. Install git-lfs before, see: https://git-lfs.github.com/
  3. Add the API key in .ddev/.env like

DDEV Commands

Command Description
ddev initialize Import test data into ddev (database and configurations)
ddev typo3 [command] Run TYPO3 CLI commands (e.g. ddev typo3 cache:flush)
ddev createdumpfile Create database dump and save to .ddev/data/db.sql.gz
ddev createfilesarchive Create fileadmin archive and save to .ddev/data/fileadmin.tar.gz

All versions of alternative with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2.0
typo3/cms-core Version ^13.4 || ^14.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 in2code/alternative contains the following files

Loading the files please wait ...