CLI Connector

The Smart Search SDK provides CLI commands to interact with third-party connectors such as GitHub, Google Drive, Google Calendar, Google Mail, and Chief Retrieval.

Overview

Connector commands allow you to:

  • Connect to third-party services

  • Disconnect from third-party services

  • Search within connected services using natural language queries

Prerequisites

Before using connector commands, ensure you have:

  • Smart Search SDK installed

  • SMARTSEARCH_BASE_URL environment variable set

  • Valid authentication credentials

Available Commands

Connector - Connect

Initiate integration with a third-party connector.

Usage

Parameters

Parameter
Required
Type
Description

--app-name

Yes

String

App name to connect to. Options: github, google_mail, google_calendar, google_drive, chief_retrieval

--bosa-token

No

String

BOSA token for authentication (optional)

--callback-url

No

String

OAuth callback URL (defaults to Smart Search's URL)

--view

No

String

Output format: pretty or json (default: pretty)

Examples

Interactive mode:

Connect to GitHub:

Connect to Google Drive with custom callback:

Response

When OAuth setup is required:

When already connected:


Connector - Disconnect

Remove integration with a third-party connector.

Usage

Parameters

Parameter
Required
Type
Description

--app-name

Yes

String

App name to disconnect from. Options: github, google_mail, google_calendar, google_drive, chief_retrieval

--bosa-token

No

String

BOSA token for authentication (optional)

--view

No

String

Output format: pretty or json (default: pretty)

Examples

Disconnect from GitHub:

Disconnect with BOSA token:

Response


Search a connected third-party service using natural language queries.

Usage

Parameters

Parameter
Required
Type
Description

--query

Yes

String

Natural language search query

--app-name

Yes

String

App name to search. Options: github, google_mail, google_calendar, google_drive, chief_retrieval

--bosa-token

No

String

BOSA token for authentication (optional)

--view

No

String

Output format: table or json (default: table)

--stream

No

Boolean

Enable streaming response (default: false)

Examples

Search GitHub issues:

Search Google Calendar:

Search Google Drive with streaming:

Response (Table View)

Response (JSON View)

Authentication

The connector commands support two authentication modes:

  1. Default Mode: Uses Smart Search's internal BOSA credentials

  2. BOSA Token Mode: Uses provided BOSA token

Error Handling

All commands provide clear error messages:

Best Practices

  1. Use appropriate app names: Ensure the app name matches exactly (case-sensitive)

  2. Handle setup URLs: For OAuth connectors, visit the setup URL to complete authentication

  3. Stream large results: Use --stream true for better performance with large result sets

  4. JSON for automation: Use --view json when integrating with scripts or CI/CD pipelines

  5. Secure tokens: Never hardcode BOSA tokens in scripts; use environment variables

Common Use Cases

Searching GitHub Issues

Finding Email Threads

Locating Calendar Events

Searching Documents

Last updated