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_URLenvironment variable setValid authentication credentials
Available Commands
Connector - Connect
Initiate integration with a third-party connector.
Usage
Parameters
--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
--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
Connector - Search
Search a connected third-party service using natural language queries.
Usage
Parameters
--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:
Default Mode: Uses Smart Search's internal BOSA credentials
BOSA Token Mode: Uses provided BOSA token
Error Handling
All commands provide clear error messages:
Best Practices
Use appropriate app names: Ensure the app name matches exactly (case-sensitive)
Handle setup URLs: For OAuth connectors, visit the setup URL to complete authentication
Stream large results: Use
--stream truefor better performance with large result setsJSON for automation: Use
--view jsonwhen integrating with scripts or CI/CD pipelinesSecure 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
