AskAI CLI for ChatGPT, Claude and DeepSeek
Ask questions, review a Git diff, explain logs or turn command output into a summary without leaving your terminal. One small, dependency-free client uses the same models and token allowance as your AskAI.free account.
$ git diff | askai "Review this change"
The validation is correct, but the error path can leave the transaction open. Move rollback into a finally block and add a test for the rejected request.
$ askai usage
Plan: Pro Tokens remaining: 24,883,420 Rate limit: 60 per minute
Install with npm
Requires Node.js 18 or newer. The package has no third-party runtime dependencies. The npm registry release is prepared; this direct package is available now while the AskAI npm publisher account is connected.
SHA-256: afb0a683e360d77e92ca8a0c74816aae5248c667347ce27c6b26eb9e5cc34691
AI that fits into terminal workflows
The CLI is deliberately small: it sends prompts to the existing AskAI API, prints clean answers to standard output and composes naturally with pipes, files and scripts.
Run askai "your question" without opening a browser or changing your current task.
Send logs, diffs or generated text through stdin and add a plain-English instruction for the model.
Use --model to choose any ChatGPT, Claude or DeepSeek model available to your plan.
Add --json when another program needs the full OpenAI-compatible response rather than only the answer.
askai models shows availability and token rates; askai usage shows the remaining allowance.
The hidden setup prompt writes a user-only config file. CI can use ASKAI_API_KEY without saving a file.
Set up the AskAI CLI in three steps
The CLI uses an AskAI API key. Keys are available to paying Pro and Max accounts after the first subscription payment clears; the free trial itself does not include API or CLI access.
Install the package
Install globally so the askai command is available in every terminal.
npm install -g https://askai.free/static/downloads/askaifree-1.0.0.tarCreate and save an API key
Create the key in your account, then use the hidden local prompt. The full key is never printed again by AskAI.
askai config set-keyAsk, pipe or automate
Start with a direct prompt, then combine the command with tools you already use.
git diff | askai "Find correctness and security risks"Useful AskAI CLI commands
askai config set-model claude-opus-5
askai -m chatgpt-5-6-sol "Plan this migration"
askai -s "Be concise" "Explain this stack trace"
askai models
askai usage
ASKAI_API_KEY=... askai --json "Summarize the build"
AskAI CLI questions
What is the AskAI CLI?
It is a dependency-free Node.js command-line client for the AskAI.free API. It sends direct prompts or piped input to the model you choose and prints the answer in the terminal.
Does it work during the free trial?
No. The CLI uses the paid API entitlement. Pro and Max customers receive API access after the first subscription payment clears.
Where is my API key stored?
Interactive setup stores it in your operating system's user configuration directory with user-only permissions. For CI or short-lived environments, set ASKAI_API_KEY instead.
Which models can I use?
Run askai models to see the live model catalogue and which models your plan can call. You can choose a model for one command or save a default.
Does the CLI execute AI-generated shell commands?
No. It only sends text and prints the model's response. It does not execute returned commands, modify project files or grant the model terminal access.
Inspired by a distribution idea shared by Taras on X: a CLI can be both a useful customer interface and a discoverable software package.