Installation
Requirements
- Craft CMS 5.0 or later
- PHP 8.2 or later
- An API key from one of the supported AI providers, or a local Ollama daemon
Install via Composer
From your Craft project root:
composer require justinholtweb/craft-spectacles
Install the Plugin
Run the Craft CLI installer:
php craft plugin/install spectacles
Or navigate to Settings → Plugins in the Control Panel and click “Install” next to Spectacles.
What Happens on Install
- A
spectacles_imagemetadatatable is created to store per-asset description, tags, objects, colors, and the embedding vector (as JSON). - If you’re running Postgres with the
vectorextension installed, a second migration also createsspectacles_imagevectorsfor native pgvector cosine-distance lookups. Otherwise it’s a no-op.
Next: configure a provider
Spectacles ships with vision and embedding providers but they need credentials before they can do anything. Head to Configuration for the settings screen walkthrough, or jump straight to AI Providers for a side-by-side comparison.