CLI
Last updated
Last updated
The most convenient way to interact with our API is by using our cross-platform CLI:
Alternatively, if you prefer using Homebrew:
Before using the Datasherlocks CLI, you need to set up your API token. Visit the Organization to create an API token for your client. Once you have created the token, set it as a new environment variable:
You are now ready to use the Datasherlocks CLI to manage your agents and interact with the Datasherlocks platform.
The Datasherlocks CLI provides several commands to manage and query agents, as well as perform other tasks. Here are the available commands:
Use the register command to register a Datasherlocks agent with the platform. This command requires a configuration file and agent name.
Example:
With the ask command, you can send a question to a Datasherlocks agent running on a specific host. You need to specify the question, agent ID, and optionally, the output format (JSON or table).
Example:
The list command retrieves a list of Datasherlocks agents registered with the platform. It provides details such as agent ID, name, host, database, username, type, and remote URL.
Example:
The serve command starts the Datasherlocks agent using the provided configuration file. It initializes the agent and allows it to communicate with the Datasherlocks platform. Please note that the serve command is intended for local testing only and is not recommended for production use.
Example (Local Testing):
Example (Production Deployement)
NOTE: For production deployments, we recommend following our AWS/Kubernetes deployment guide, which provides instructions for deploying the agent in a production environment.