A dead simple openrouter cli.
Requirements:
Run ask transiently with uvx:
uvx --from git+https://github.com/ThatCrispyToast/ask/ ask Hello!
uvx --from git+https://github.com/ThatCrispyToast/ask/ ask -sp "Respond in Spanish." Who invented the computer?Install with:
uv tool install git+https://github.com/ThatCrispyToast/ask/This will expose an executable under the name ask.
Uninstall with:
uv tool uninstall askNote that your configuration files (stored at your system's default user config directory) will remain after uninstallation.
Warning
Revoke your Openrouter API key after uninstallation.
When running ask for the first time, you'll be prompted to enter your Openrouter API key. Generate one at the Openrouter website.
You'll also be prompted to enter the model(s) you'd like to use by default. Reasonable defaults are provided.
Run ask --help to get a list of options and examples.
For the sake for convienence, ask parses arguments differently. Any passed arguments that don't match a known option are sent as a part of the prompt.
# These are functionally the same
ask "python set vs list"
ask python set vs list
# As are these
ask -m "openai/gpt-oss-20b" -10 + -10
ask -m "openai/gpt-oss-20b" "-10 + -10"
Note that system prompts do still require quotes.
ask Hello! --system-prompt "Speak in pig latin."
ask Hello! --system-prompt Speak in pig latin. # In this case, the system prompt will be set to "Speak" and "in pig latin" will be appended to the prompt.A nix flake is provided to create an environment with all development dependencies.
Requirements:
