Skip to content

ThatCrispyToast/ask

Repository files navigation

ask

A dead simple openrouter cli.

program demo

Installation

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 ask

Note 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.

Setup

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.

Usage

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.

Development

NixOS

A nix flake is provided to create an environment with all development dependencies.

Linux, Windows, MacOS

Requirements:

Python dependencies are managed by uv.

About

A lightweight command-line interface for fast, one-shot responses from Openrouter.

Topics

Resources

Stars

Watchers

Forks