
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A CLI tool to chat with different AI models from your terminal (eg in vscode) from anthropic, google and openai.
Table of Contents generated with DocToc
A command-line interface (CLI) tool to interact seamlessly with various AI services like Google (Gemini), OpenAI (GPT) and Anthropic (Claude) directly from your terminal.
For those who feel cursor or co-pilot etc is not for them but loading a whole web-gui is too slow... fire up a terminal in your ide, or wherever, and get right to it.
The AI then becomes more like your teacher opposed to cursor or co-pilot being the coder...
Engage in interactive chat sessions or get quick answers to single prompts without leaving your command line. ai-shell
securely stores your preferences and API keys locally.
Opens your default text editor for long/multi-lined prompts.

Requires Node.js (v18 or later recommended).
Install the package globally using npm:
npm install -g ai-shell
(you can just ask a question and as nothing will be set already it will then ask for which model and keys)
Before using ais, you need to configure your preferred AI service, model, and API key. Run:
ais set
This interactive command will guide you through:
Your configuration is saved locally for future use.
set is called and a service picked, but not previously used (ie no api key found), it will ask for an API key
and add to the dict of keysA default system prompt is set as:
"You should be concise and as accurate as possible in your output. As few a niceties as possible. This is a developer you are talking to, they want rapid fast answers and on point. If needed, ask the user to make their question more accurate and less obtuse to enable you to provide a very on point answer."
You can override this by calling the set system prompt command:
ais set-system-prompt
# or for short
ais sp
This will replace the current system prompt with your input.
Pass your prompt directly as arguments after the ais command:
ais "Explain the difference between HTTP and HTTPS in simple terms"
The AI's response will be streamed directly to your terminal leaving you to continue talking to the model. You can then continue the conversation by continuing to type.
Longer prompts with line breaks are usually required at some point. To handle this the tool (on linux) will open the
default editor (it will default to nano when process.env.EDITOR is not set).
This all functions by 1st creating a temporary file in the OS tmp folder, opens the file thus allowing you to write to
it. After you save the changes and close the file, ai-shell grabs the content and uses it as the prompt while at the
same time removing the tmp file form disk.
To end the chat just press "control + c"
To see which service and model are currently configured. This will display the active service provider and model identifier. It will not display your API key.
ais config
To see the available models you can currently talk to:
ais list
# or the alias:
ais ls
For a list of all available commands and options:
ais --help
Configuration (service, model, API key) is stored locally using the conf package. You can typically find the configuration file at:
~/.config/ais-cli-nodejs/config.json~/Library/Preferences/ais-cli-nodejs/config.json%APPDATA%\ais-cli-nodejs\Config\config.jsonContributions, issues, and feature requests are welcome!
FAQs
A CLI tool to chat with different AI models from your terminal (eg in vscode) from anthropic, google and openai.
The npm package ai-shell receives a total of 23 weekly downloads. As such, ai-shell popularity was classified as not popular.
We found that ai-shell demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.