npm package: @scoutbar/sdk
Description: <img src="https://i.ibb.co/PWVZZfZ/Frame-1171274461.png" alt="Frame-1171274461"  width="70" height="70" />
Latest version: 0.0.2


<img src="https://i.ibb.co/PWVZZfZ/Frame-1171274461.png" alt="Frame-1171274461"  width="70" height="70" />

# 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](#installation)
- [Usage](#usage)
- [API Reference](#api-reference)
- [CDN Usage](#cdn-usage)
- [Development](#development)
- [About Scoutbar](#about-scoutbar)
- [License](#license)

## Installation

You can install the Scoutbar SDK using npm or yarn:

```bash
npm install @scoutbar/sdk
# or
yarn add @scoutbar/sdk
```

## Usage

Here's a basic example of how to initialize and use the Scoutbar SDK:

```javascript
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
```typescript
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 widget
- `ScoutbarSDK.open()`: Open the Scoutbar widget
- `ScoutbarSDK.close()`: Close the Scoutbar widget
- `ScoutbarSDK.update(options)`: Update Scoutbar options
- `ScoutbarSDK.destroy()`: Remove the Scoutbar widget from the DOM
- `ScoutbarSDK.log()`: Get current Scoutbar status


## CDN Usage

You can also include Scoutbar SDK directly in your HTML file using a CDN:

```html
<!-- 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/sdk@0.1.0/dist/scout-sdk.js"></script>
```

After including the script, you can use the `ScoutbarSDK` object to interact with the Scoutbar widget:

```html
<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:

1. Clone the repository
2. Install dependencies: `npm install`
3. 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](LICENSE) file for details.