To get a local copy up and running follow these simple steps.
Make sure you have Rust installed.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Rocket uses the nightly version of Rust so make sure you use that. If you'd like to only use nightly for this project, you can run this from the root of the project after cloning.
# from the root of the project
rustup override set nightly
- Clone the project
git clone https://github.com/jkjetty/hare.git
- Make sure you're using nightly
cargo --version
- Build the project
cargo build
- Run the project
cargo run
- Visit localhost:8000
- To test a command, go to localhost:8000/search?cmd=tw and you should be redirected to Twitter
To test out a command, type in http://localhost:8000/search?cmd= followed by your command.
See supported commands in the redirect_url
list.
Everything else redirects to a google search with your query.
Chrome instructions:
- Go to
chrome://settings
- Click the "Search engine" tab on the right
- Click "manage search engines"
- Under "Site search" click the "Add" button
- Enter "hare" for the search engine and shortcut
- Enter
localhost:8000/search?cmd=%s
as the URL - Click "Add" to save the search engine
- Click the menu (three dots) next to your new entry
- Click "Make default"
- Open a new tab and try it out! Enter "g robot vacuums" and make sure google search comes up
Distributed under the MIT License. See LICENSE
for more information.