yogpt is a small command-line utility for simple LLM calls from the shell.
It uses the OpenAI-compatible Responses API, so the same command can work with
OpenAI, Yandex AI Studio, or another provider that follows the same API shape.
pip install yogptAfter installation:
yogpt Hello, how are you today?Ask a question directly:
yogpt What is the 10th digit of Pi?Pipe stdin into the model:
echo What is the 10th digit of Pi? | yogpt -If yogpt sees piped stdin and no explicit query, it reads stdin automatically:
cat notes.txt | yogpt -p summarizeRead input from a file with @filename:
yogpt @program.pyStart an interactive chat:
yogptContinue chatting after an initial prompt:
yogpt -s "You are a software expert. Read this Python program and answer follow-up questions." -c @program.pySelect a configured model:
yogpt -m qwen Explain why sky is blueSet temperature:
yogpt -t 0.2 Write a short commit message for this changeUse an inline template. The {} placeholder is replaced with the input:
cat program.py | yogpt -p "Please explain what the following Python code does:{}"Use a named template from .yogpt.config.json:
cat english.txt | yogpt -p translate -1 German -Templates can use {param_1}, {param_2}, and {param_3}, supplied by -1,
-2, and -3.
You can also load a template from a file:
yogpt -p @prompt.txt @input.txtUse a system message directly:
yogpt -s "You are a concise technical assistant." Explain DNSUse a named system message from the config:
yogpt -s expert @proposal.mdUse a system message from a file:
yogpt -s @system.txt @input.txtAttach one or more image files with --image:
yogpt --image screenshot.png "Describe what is wrong in this UI"
yogpt --image before.png --image after.png "Compare these two images"Images are sent as Responses API input_image items using base64 data URLs.
Enable the Responses API web search tool:
yogpt --web "What changed in Python recently?"Control search context size:
yogpt --web --web-detail low "Give a short current answer"
yogpt --web --web-detail hi "Give a detailed current answer with context"--web-detail med is the default and maps to the API value medium.
Enable Code Interpreter with --code:
yogpt --code "Create a CSV with the numbers 1 to 10 and their squares"If the model creates files, yogpt downloads them into the current directory.
Use --output-dir to choose another location:
yogpt --code --output-dir outputs "Create a line chart as a PNG"Generated files are discovered from Code Interpreter output and file citation
annotations. yogpt first uses the OpenAI client container file APIs and then
falls back to the regular Files API when needed.
By default, yogpt waits for the full response and prints it at once. Use
--stream to display text as it is generated:
yogpt --stream "Write a short story about a command-line tool"Configuration is read from ~/.yogpt.config.json. For tests or temporary
setups, set YOGPT_CONFIG to another JSON file path.
A minimal model entry looks like this:
{
"name": "gpt",
"model_name": "gpt-5.5",
"base_url": "https://api.openai.com/v1",
"api_key": "%OPENAI_API_KEY%",
"default": true,
"params": {
"reasoning": { "effort": "none" }
}
}Fields:
name: short model name used with-mor--modelmodel_name: model identifier sent to the Responses APIbase_url: provider endpoint, defaulting tohttps://api.openai.com/v1api_key: provider API keyproject: optional project or folder ID for providers that need itdefault: optional default model markerparams: optional extra fields passed toresponses.create
Environment variables can be used anywhere in the config with %NAME% syntax.
For example, Yandex AI Studio model names usually include the folder ID:
{
"name": "qwen",
"model_name": "gpt://%folder_id%/qwen3.5-35b-a3b-fp8",
"base_url": "https://ai.api.cloud.yandex.net/v1",
"api_key": "%api_key%",
"project": "%folder_id%"
}See sample_config.json for a fuller starting point with OpenAI and Yandex AI
Studio models, templates, and system messages.
The models array defines available command-line model aliases:
"models": [
{
"name": "gpt",
"model_name": "gpt-5.5",
"base_url": "https://api.openai.com/v1",
"api_key": "%OPENAI_API_KEY%",
"default": true
}
]The templates array defines reusable prompt templates:
{
"name": "translate",
"template": "Please, translate the text in triple backquotes below into the following language: {param_1}. Here is the text:\n```{}```"
}If a template name is not found and the value has no spaces or {} placeholder,
yogpt prints a warning and treats it as a literal template.
The system_messages array defines reusable model instructions:
{
"name": "expert",
"message": "You are a careful technical expert. Give precise, practical answers and call out assumptions."
}If a system message name is not found and the value has no spaces, yogpt
prints a warning and treats it as a literal system message.