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_imagemetadata table is created to store per-asset description, tags, objects, colors, and the embedding vector (as JSON).
  • If you’re running Postgres with the vector extension installed, a second migration also creates spectacles_imagevectors for 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.

More in AI & Search

Pairs well with Spectacles

Getting found, by people and by machines. Faceted search, recommendations, GEO and instant indexing, image similarity, and tools that keep links and the search index honest.