Toy project for asking quick questions in the terminal. The problem was that I
occasionally needed to ask a quick question, and I didn't want to open a browser.
It is additionally used for learning purposes.
- Setup a key on gemini since it's free. https://deepmind.google/technologies/gemini/flash/
- export the key as an environment variable
export API_KEY=your_key
orsetx API_KEY "your_key"
on windows - Run
ask --configure
and accept the defaults. - Ask a question
ask how do i use sudo tee
$ ask --configure
# Follow the prompts
$ ask what is the capital of France
Download the release from the tags with your distribution.
wget <link to release.tar.gz>
tar -xvf release.tar.gz
# move the binary to a location that is on the $PATH, like $HOME/.local/bin for user installs
cp ask*/ask $HOME/.local/bin
- Download the windows zip file
- Extract the file
- Copy
ask.exe
into somewhere in your PATH or add the location of this folder to your PATH
Notes: You can set permanent changes to PATH with this cmd setx PATH "%PATH%;%CD%"
Requires cargo to be installed.
git clone
cd ask-rs
cargo build --release
# Install to bins, this installs to PATH/bin/ask
cargo install --path . --root $HOME/.local
- This is a toy project, it's not meant to be used in production.
- It does not handle some special characters well, like
?
. - It uses gemini as a default, but you can configure it to use other openai compatible endpoints.
- Larger binaries due to the vendored openssl I suppose.
- Compilation from source is slow due to the need for openssl in cross compiling.