| Crates.io | brave-cli |
| lib.rs | brave-cli |
| version | 0.1.0 |
| created_at | 2025-03-16 20:10:31.209759+00 |
| updated_at | 2025-03-16 20:10:31.209759+00 |
| description | Command-line interface for the Brave Search API |
| homepage | https://github.com/thesurlydev/brave-cli |
| repository | https://github.com/thesurlydev/brave-cli |
| max_upload_size | |
| id | 1594739 |
| size | 54,880 |
A command-line interface for the Brave Search API that retrieves search results and outputs them as JSON.
Make sure you have Rust and Cargo installed. Then build the project:
cargo build --release
The executable will be available at target/release/brave-cli.
First, set your Brave Search API key as an environment variable:
export BRAVE_API_KEY=your_api_key_here
Then run a search:
brave-cli -q "your search query"
-q, --query <QUERY>: Search query (required)-c, --count <COUNT>: Number of results to return (default: 10)The output is a JSON object with a results array containing search results:
{
"results": [
{
"title": "Result title",
"url": "https://example.com/result",
"description": "Description of the result"
},
...
]
}
To use this tool, you need a Brave Search API key. You can get one by:
This project is open source and available under the MIT License.