AI CLI to help you with commands, coding, apps, and more from your terminal.
npm install ask-cli-aibash
npm install -g ask-cli-ai
`
Usage
> To use Ask CLI, you first need to set up the API key. See Select model to learn how.
$3
`bash
Basic usage
ask
Examples
ask how to terminate a linux process
ask what is a javascript promise
ask how to create a git branch
Using quotes
ask 'What does this command do: git config user.name "Ask CLI"?'
`
$3
You can use how and what as aliases for the ask command:
`bash
Using 'how' alias
how to install docker on ubuntu
Using 'what' alias
what is the difference between git merge and rebase
`
$3
By default, Ask CLI cannot run commands on your computer. However, you can use the -c or --command option to execute a command and include its output in your question. This allows Ask CLI to analyze errors, logs, or any command output and provide context-aware answers.
`bash
Analyze an error
ask why is this failing -c "npm run build"
Get help with command output
ask explain this output -c "docker ps -a"
Debug issues
ask what is wrong here -c "git status"
`
Select model
You can select a model using the ask /models command. This will list all the available models and let you select the model you want to use.
!Model selection screen
> If it's the first time you select a model, you will be prompted to set the API key for the model's provider.
Supported models
Gemini
- Gemini 3 Flash Preview
- Gemini 3 Pro Preview
- Gemini 2.5 Flash
- Gemini 2.5 Flash Lite
- Gemini 2.5 Pro
OpenAI
- GPT-5 Mini
- GPT-5 Nano
- GPT-5
- GPT-5.2
- GPT-5.2 Pro
- GPT-4.1
Anthropic
- Claude Haiku 4.5
- Claude Sonnet 4.5
- Claude Opus 4.5
Connect to local or external providers
You can use the ask /connect command to connect to local models or external providers, using an OpenAI-compatible API, like llama.cpp, Ollama, Hugging Face, etc.
!Connect screen
Reference
`
AI CLI to help you with commands, coding, apps and more.
Version: 1.2.2
Usage: ask
Commands:
ask Ask something. Alias: what, how [default]
ask /models Select a model
ask /providers Setup providers
ask /config Configuration
ask /connect Connect to an external provider using OpenAI-compatible API
ask /history List the chat history
ask /clear Clear the chat history
Positionals:
prompt [string]
Options:
--version Show version number [boolean]
--help Show help [boolean]
-c, --command Command to execute [string]
Examples:
ask how to run a docker container
how to setup my git account
what is the chmod command
ask what is using port 80 -c "netstat -ano"
``