@scoutbar/sdk
v0.0.2
Published
<img src="https://i.ibb.co/PWVZZfZ/Frame-1171274461.png" alt="Frame-1171274461" width="70" height="70" />
Downloads
4
Readme
Scoutbar SDK
Scoutbar SDK is a powerful tool designed to simplify the CMD + K experience in web applications. It provides a seamless search and navigation interface, with the added capability of autonomous web browsing and task automation.
Table of Contents
Installation
You can install the Scoutbar SDK using npm or yarn:
npm install @scoutbar/sdk
# or
yarn add @scoutbar/sdk
Usage
Here's a basic example of how to initialize and use the Scoutbar SDK:
import { ScoutbarSDK as scoutbar } from '@scoutbar/sdk';
// Initialize the SDK
scoutbar.init({
theme: 'light', // or 'dark'
onOpen: () => console.log('Scoutbar opened'),
onClose: () => console.log('Scoutbar closed'),
});
// Open Scoutbar
scoutbar.open();
// Close Scoutbar
scoutbar.close();
// Update Scoutbar options
scoutbar.update({ theme: 'dark' });
// Destroy Scoutbar instance
scoutbar.destroy();
API Reference
Options
export interface WidgetOptions {
theme?: keyof typeof Theme; // 'light' or 'dark'
onOpen?: () => void;
onClose?: () => void;
colorVariables?: Record<string, string>; // Custom color variables for the theme
container?: string;
config?: {
autoOpen?: boolean; // default is false: open Scoutbar on initialization
keyBind?: string; // default is 'ctrl/cdm+k'
};
}
ScoutbarSDK.init(options)
: Initialize the Scoutbar widgetScoutbarSDK.open()
: Open the Scoutbar widgetScoutbarSDK.close()
: Close the Scoutbar widgetScoutbarSDK.update(options)
: Update Scoutbar optionsScoutbarSDK.destroy()
: Remove the Scoutbar widget from the DOMScoutbarSDK.log()
: Get current Scoutbar status
CDN Usage
You can also include Scoutbar SDK directly in your HTML file using a CDN:
<!-- Latest version -->
<script src="https://cdn.jsdelivr.net/npm/@scoutbar/sdk@latest/dist/scout-sdk.js"></script>
<!-- Specific version -->
<script src="https://cdn.jsdelivr.net/npm/@scoutbar/[email protected]/dist/scout-sdk.js"></script>
After including the script, you can use the ScoutbarSDK
object to interact with the Scoutbar widget:
<script>
ScoutbarSDK.init({
theme: 'light',
onOpen: () => console.log('Scoutbar opened'),
onClose: () => console.log('Scoutbar closed'),
});
ScoutbarSDK.open();
</script>
Development
To set up the development environment:
- Clone the repository
- Install dependencies:
npm install
- Start the development server:
npm run dev
About Scoutbar
Scoutbar is revolutionizing the way people interact with the web. Imagine having a highly intelligent assistant by your side as you browse, one that understands your needs, navigates complex websites with ease, and completes tasks for you in seconds. That's Scoutbar.
For individual users, Scoutbar is a powerful Chrome extension that acts as your personal guide to the internet. It uses advanced AI to understand your intent, helping you find information and complete online tasks faster than ever before. Whether you're shopping, researching, or just trying to navigate a tricky website, Scoutbar is there to make your online experience smooth and efficient.
For businesses, Scoutbar offers an innovative iframe solution that transforms your website into an interactive, user-friendly environment. By guiding visitors, answering questions, and automating complex processes, Scoutbar dramatically improves user engagement, reduces bounce rates, and boosts conversions.
But Scoutbar's impact goes beyond convenience. It's a game-changer for web accessibility, breaking down digital barriers for users with disabilities. Through voice commands, simplified inputs, and seamless integration with assistive technologies, Scoutbar ensures that the web is truly open and navigable for everyone.
License
This project is licensed under the MIT License. See the LICENSE file for details.