brave-cli-0.1.0 is not a library.
brave-cli
A command-line interface for the Brave Search API that retrieves search results and outputs them as JSON.
Features
- Search the web using Brave Search API
- Output results in clean JSON format
- Handle gzip-compressed API responses
- Configurable number of results
Installation
Make sure you have Rust and Cargo installed. Then build the project:
The executable will be available at target/release/brave-cli
.
Usage
First, set your Brave Search API key as an environment variable:
Then run a search:
Options
-q, --query <QUERY>
: Search query (required)-c, --count <COUNT>
: Number of results to return (default: 10)
Output Format
The output is a JSON object with a results
array containing search results:
Getting a Brave Search API Key
To use this tool, you need a Brave Search API key. You can get one by:
- Visiting the Brave Search API page
- Creating an account or signing in
- Following the instructions to obtain an API key
License
This project is open source and available under the MIT License.