Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Sharely.ai

No security coverage Under active development

This module enhances Drupal's search by integrating with Sharely.ai, providing a single search box that can either perform traditional ranked searches or answer user questions directly, citing its sources from your site's content. It respects Drupal's access permissions, ensuring users only see content they are allowed to view.

Sharely.ai for Drupal replaces your site's search with one that understands meaning, and adds an Ask mode that answers questions from your own pages with citations. Every visitor sees only what Drupal lets them see.

Drupal's core search matches words. This module serves /search from a Sharely.ai workspace instead: a visitor types once and chooses whether to Search (ranked results, linking to your pages) or Ask AI (a written answer, streamed, citing the pages it came from). It stays Drupal's own search page, rendered with your theme.

Features

  • One box, two things. A select before the search field chooses Search or Ask AI; only the chosen one runs, so asking never also costs you a search.
  • Answers with citations. Ask streams an answer built only from this site's published pages, with numbered markers linking back to them. Each citation is resolved through Drupal, so its title and link are the page's own, and a page the visitor cannot view is never cited.
  • Access-aware, twice. Drupal roles are mirrored into the workspace and every page is tagged with the roles that may view it; each visitor's token carries their roles, and results are filtered against Drupal again before render. Pages visible only through per-user grants are never sent — they're counted and listed instead.
  • Field-level access respected. A field is sent only if every role tagged on the page may view it, so internal or hidden fields never reach Sharely.
  • Your theme, your markup. The search page is a Single Directory Component using your theme's own CSS custom properties. Override it in a theme with replaces: sharelyai:search-experience.
  • Syncing that survives the real world. Small sites sync in the browser with a progress bar; larger sites fill a queue that cron drains. Failures retry with backoff, rate limits pause the run, and every failure is listed with its reason.
  • Search activity. The status page counts what visitors searched for and, more usefully, what found nothing. Query text and result counts only — no user, no session, no IP, and nothing sent to Sharely.
  • Protected against abuse. New anonymous visitor identities are rate limited per IP address (300 an hour by default, adjustable); over the limit, search falls back to core results.
  • Degrades, never breaks. If the workspace is unreachable, /search falls back to Drupal core search with a notice. Disconnecting or uninstalling restores core search, tells Sharely the site is gone, and leaves your workspace untouched.
  • Extensible. hook_sharelyai_document_alter() and hook_sharelyai_roles_alter() let you change what is sent and who may see it.

Installation

composer require drupal/sharelyai
drush cr
drush recipe modules/contrib/sharelyai/recipes/sharelyai_search

Using DDEV or Lando? Prefix each command with ddev or lando.

The recipe installs the module and core search, makes Sharely the default search page and lets visitors search. Rebuild caches first (drush cr) so Drupal sees the new module, and give the path from the docroot — modules/contrib/…, not web/modules/contrib/…. Applying it again is safe.

Without Drush, use core's own tool and rebuild caches before and after the recipe (otherwise /search answers Page not found):

vendor/bin/dr cr
vendor/bin/dr recipe modules/contrib/sharelyai/recipes/sharelyai_search
vendor/bin/dr cr

Without the recipe: enable the module at Extend and give Anonymous and Authenticated the Use search permission at People → Permissions (Drupal 11.4's Standard profile does not grant it).

Updating

composer update drupal/sharelyai
drush updatedb
drush cr

Drush asks you to confirm the updates; press Enter for Yes, or add -y. Coming from 1.0.0-alpha1 or 1.0.x-dev, run composer require drupal/sharelyai:^1.0 once instead of composer update, because those versions are pinned in composer.json. If you deploy configuration, run drush cex and commit after drush updatedb.

Uninstalling

drush pm:uninstall sharelyai
composer remove drupal/sharelyai
drush cr
drush cron

Uninstall before removing the code. If the code was removed first, put it back with composer require drupal/sharelyai and drush cr, then uninstall and remove it. Cron builds core's search index, which was not filled while Sharely served search. If you deploy configuration, run drush cex and commit. Your Sharely workspace is left untouched.

Post-Installation

Go to Configuration → Search and metadata → Sharely.ai for Drupal and click Connect to Sharely. You approve the connection in Sharely, a workspace is created for the site, and the first sync starts. Search works within minutes.

Settings cover which content types and text fields are read, whether Ask is offered, what a bare search link opens with, results per page, and how long search statistics are kept. The workspace, its API key and the Sharely URLs are not editable in the UI by design — the key comes from the connection and is kept out of configuration exports, and the URLs belong to the deployment (see settings.example.php).

Additional Requirements

  • A Sharely.ai workspace. This module is a client for the hosted Sharely.ai service; you need an account at https://sharely.ai. Without a connection, /search serves Drupal core results.
  • Published content is sent to Sharely. Page text, title and URL are sent and stored there, tagged with the Drupal roles that may view them. Unpublished content and per-user-restricted pages are never sent.
  • Drupal core: Node, Search, and the core Search Node page (kept installed as the fallback). Drupal 11.4 or newer — the module needs core's Search Node module, which arrived in 11.4.
  • PHP 8.2 or newer. No third-party PHP libraries.
  • Cron, for sites above the in-browser sync threshold.

Recommended modules/libraries

None. The module has no third-party dependencies.

Drupal 11 · not 10 PHP 8.2

Ask your assistant about Sharely.ai

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • node Drupal core
  • search Drupal core
  • search_node Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Oct 2026
Latest release
3 weeks ago
Releases (12 mo)
4 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core PHP Release date
1.0.1 Stable 11 PHP 8.2 Oct 22, 2026
1.0.0 Stable 11 PHP 8.2 Oct 21, 2026
1.0.x-dev Dev 10–11 PHP 8.2 Oct 14, 2026
1.0.0-alpha1 Pre-release 10–11 PHP 8.2 Oct 1, 2026