New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@gleanwork/web-sdk

Package Overview
Dependencies
Maintainers
10
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gleanwork/web-sdk

Library for embedding Glean UI components

latest
npmnpm
Version
2.5.0
Version published
Maintainers
10
Created
Source

Glean Web SDK

The Glean Web SDK enables integration of AI powered search and chat functionalities into your existing intranet portal. The toolkit offers different variants to suit various use-cases and provide a streamlined search experience.

NPM

We recommend to use the @gleanwork/web-sdk when integrate with Glean, it will provide proper type support as well.

Installation

Install the Glean Web SDK with the following command:

// npm
npm install @gleanwork/web-sdk

// yarn
yarn add @gleanwork/web-sdk

// pnpm
pnpm add @gleanwork/web-sdk

Usage

// Can import all methods in one namespace GleanWebSDK
import GleanWebSDK, { type ModalSearchOptions } from "@gleanwork/web-sdk"

const optionalModalSearchOptions: ModalSearchOptions = {
  // ...
}
GleanWebSDK.attach(document.getElementById('search-box'), optionalModalSearchOptions)

// or can import individual methods instead
import { attach, type ModalSearchOptions } from "@gleanwork/web-sdk"
attach(document.getElementById('search-box'), optionalModalSearchOptions)

Script tag

If npm is not a viable solution, you can also integrate Glean via script tag, just include the JS library in the <head> of your page, where YOUR_GLEAN_DOMAIN is where your company accesses Glean, such as app.glean.com, {company}.glean.com.

  <script
    src="https://{YOUR_GLEAN_DOMAIN}/sdk/glean-web-sdk-<version>.min.js"
  ></script>

This will provide all the methods available in NPM package via window.GleanWebSDK, other than that, the usage will remain the same.

Documentation

Details on usage can found on https://developers.glean.com/docs/browser_api/

Keywords

glean

FAQs

Package last updated on 30 Sep 2026

Related posts