Loading repository data…
Loading repository data…
belingud / repository
YAICLI: A powerful command-line AI assistant with 25+ LLM providers. Features chat, command execution, quick queries, function calling, MCP support, and persistent history. Seamlessly integrates into workflows with smart environment detection.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
YAICLI is a powerful yet lightweight command-line AI assistant that brings the capabilities of Large Language Models ( LLMs) like GPT-5 directly to your terminal. Interact with AI through multiple modes: have natural conversations, generate and execute shell commands, or get quick answers without leaving your workflow.
Supports both standard and deep reasoning models across all major LLM providers.
[!NOTE] YAICLI is actively developed. While core functionality is stable, some features may evolve in future releases.
We support MCP since v0.7.0!
We support Function Call since v0.5.0!
cat log.txt | ai "analyze this")--image/-i (JPEG, PNG, GIF, WebP)--image multiple times for comparison tasksFull document: https://belingud.github.io/yaicli/
# Using pip (recommended for most users)
pip install yaicli
# Using pipx (isolated environment)
pipx install yaicli
# Using uv (faster installation)
uv tool install yaicli
Yaicli has several optional dependencies group, you can copy below commands to install specific dependencies.
# install all denpendencies
pip install 'yaicli[all]'
# install with specific provider support
pip instsall 'yaicli[ollama,cohere,doubao,huggingface,gemini,mistral,anthropic]'
Install by uv.
# install all denpendencies
uv tool install 'yaicli[all]'
# install with specific provider support
uv tool instsall 'yaicli[ollama,cohere,doubao,huggingface,gemini,mistral,anthropic]'
git clone https://github.com/belingud/yaicli.git
cd yaicli
pip install .
YAICLI uses a simple configuration file to store your preferences and API keys.
ai once to generate the default configuration file~/.config/yaicli/config.ini to add your API keyThe default configuration file is located at ~/.config/yaicli/config.ini. You can use ai --template to see default
| Option | Description | Default | Env Variable |
|---|---|---|---|
PROVIDER | LLM provider (openai, claude, cohere, etc.) | openai | YAI_PROVIDER |
BASE_URL | API endpoint URL | - | YAI_BASE_URL |
API_KEY | Your API key | - | YAI_API_KEY |
MODEL | LLM model to use | gpt-5.2 | YAI_MODEL |
DEFAULT_ROLE | Default role | DEFAULT | YAI_DEFAULT_ROLE |
SHELL_NAME | Shell type | auto | YAI_SHELL_NAME |
OS_NAME | Operating system | auto | YAI_OS_NAME |
STREAM | Enable streaming | true | YAI_STREAM |
TIMEOUT | API timeout (seconds) | 60 | YAI_TIMEOUT |
EXTRA_HEADERS | Extra headers | - | YAI_EXTRA_HEADERS |
EXTRA_BODY | Extra body | - | YAI_EXTRA_BODY |
REASONING_EFFORT | Reasoning effort | - | YAI_REASONING_EFFORT |
INTERACTIVE_ROUND | Interactive mode rounds | 25 | YAI_INTERACTIVE_ROUND |
CODE_THEME | Syntax highlighting theme | monokai | YAI_CODE_THEME |
TEMPERATURE | Response randomness | 0.7 | YAI_TEMPERATURE |
FREQUENCY_PENALTY | Repeat pubnish | 0.0 | YAI_FREQUENCY_PENALTY |
TOP_P | Top-p sampling | 1.0 | YAI_TOP_P |
MAX_TOKENS | Max response tokens | 1024 | YAI_MAX_TOKENS |
MAX_HISTORY | Max history entries | 500 | YAI_MAX_HISTORY |
AUTO_SUGGEST | Enable history suggestions | true | YAI_AUTO_SUGGEST |
SHOW_REASONING | Enable reasoning display | true | YAI_SHOW_REASONING |
JUSTIFY | Text alignment | default | YAI_JUSTIFY |
CHAT_HISTORY_DIR | Chat history directory | <tempdir>/yaicli/chats | YAI_CHAT_HISTORY_DIR |
MAX_SAVED_CHATS | Max saved chats | 20 | YAI_MAX_SAVED_CHATS |
ROLE_MODIFY_WARNING | Warn user when modifying role | true | YAI_ROLE_MODIFY_WARNING |
ENABLE_FUNCTIONS | Enable function calling | true | YAI_ENABLE_FUNCTIONS |
SHOW_FUNCTION_OUTPUT | Show function output when calling function | true | YAI_SHOW_FUNCTION_OUTPUT |
ENABLE_MCP | Enable MCP tools | false | YAI_ENABLE_MCP |
SHOW_MCP_OUTPUT | Show MCP output when calling mcp | true | YAI_SHOW_MCP_OUTPUT |
MAX_TOOL_CALL_DEPTH | Max tool calls in one request | 8 | YAI_MAX_TOOL_CALL_DEPTH |
TOOL_CONFIRM | Confirm each tool call before running it | true | YAI_TOOL_CONFIRM |
Tool execution confirmation: With
TOOL_CONFIRMenabled (the default), YAICLI asks before running each tool/function call. At the prompt you can allow it once, allow it for the rest of the session, allow it permanently, or deny it. Permanent approvals are stored per tool name in~/.config/yaicli/tool_permissions.json. SetTOOL_CONFIRM=false(orYAI_TOOL_CONFIRM=false) to run tool calls silently, as in previous versions. In non-interactive sessions (e.g. piped input) only tools already in the permissions file run; others are denied.
YAICLI works with major LLM providers. The default configuration is set up for OpenAI, but you can easily switch to other providers.
Note: blank BASE_URL (or no BASE_URL) means use provider default url.
| Provider | BASE_URL |
|---|---|
| OpenAI (default) | https://api.openai.com/v1 |
| Claude (native API) | https://api.anthropic.com/v1 |
| Claude (OpenAI-compatible) | https://api.anthropic.com/v1/openai |
| Cohere | https://api.cohere.com |
| Gemini | https://generativelanguage.googleapis.com/v1beta/openai |
Note: Many providers offer OpenAI-compatible endpoints that work with the default settings.
- Google Gemini: https://ai.google.dev/gemini-api/docs/openai
- Claude: https://docs.anthropic.com/en/api/openai-sdk
If you not sure about base_url or just use the default provider base_url, just leave it blank or delete BASE_URL.
[core]
PROVIDER=cohere
BASE_URL=
API_KEY=xxx
MODEL=command-r-plus
Yaicli use openai as provider as default provider, gpt-5.2 as default model, you can add your api key to use as it is.
PROVIDER=openai
BASE_URL=
API_KEY=
MODEL=gpt-5.2
Extra params:
# REASONING_EFFORT: [high, midium, low]
REASONING_EFFORT=
See official for more details: https://platform.openai.com/docs/g