npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ai2cli

v1.1.0

Published

CLI utility to convert English text to shell commands using an LLM

Readme

ai2cli

CLI utility to convert English text to shell commands using an LLM.

npm version License: MIT

Description

ai2cli is a command-line utility that converts natural language queries into shell commands using various LLM providers. It helps you generate complex commands without having to remember syntax or read through documentation.

Features

  • Convert English descriptions to shell commands
  • Multiple AI provider support (OpenAI, Anthropic, Google, DeepSeek, Groq, Mistral, XAI, Ollama)
  • Interactive command refinement
  • Command clarification when information is missing
  • Save and refine scripts
  • Command execution with confirmation
  • Command explanation and breakdown
  • Safety checks for destructive commands

Installation

# Install globally using npm
npm install -g ai2cli

# or using yarn
yarn global add ai2cli

# or using pnpm
pnpm add -g ai2cli

Setup

On first run, ai2cli will create a configuration file at ~/.ai2cli. You will need to add your API keys to this file.

You can also enter setup mode:

ai2cli --setup

Basic Usage

# Basic command generation
ai2cli "find all JavaScript files modified in the last week"

# Generate a script instead of a command
ai2cli --script "backup all my markdown files, compress them, and upload to my S3 bucket"

# Use a specific model
ai2cli --model openai/gpt-4o "convert all png images in this directory to jpeg"

# Refine existing scripts
ai2cli --refine-scripts

Configuration

Configuration is stored in ~/.ai2cli and follows this format:

{
  "defaultModel": "openai/gpt-4o",
  "models": ["openai/gpt-4o", "anthropic/claude-3.7", "ollama/llama3.2"],
  "scriptsDir": "~/.ai2cli-scripts",
  "providers": {
    "openai": {
      "apiKey": "YOUR_OPENAI_API_KEY",
      "baseURL": "https://api.openai.com"
    },
    "anthropic": {
      "apiKey": "YOUR_ANTHROPIC_API_KEY",
      "baseURL": "https://api.anthropic.com"
    }
  }
}

Supported LLM Providers

  • OpenAI (GPT-4o, GPT-4, GPT-3.5 Turbo, etc.)
  • Anthropic (Claude 3.7, Claude 3.5, Claude 3 Opus, etc.)
  • Google (Gemini models)
  • Deepseek
  • Groq
  • Mistral
  • XAI (Grok)
  • Ollama (local models)

Command Line Options

  • [request...] - Natural language request for a command
  • --model <model> - Override the default model from config
  • --script - Skip command generation and go directly to script mode
  • --debug - Enable debug features
  • --refine-scripts - Select and refine an existing script from the scripts directory
  • --setup - Enter setup mode to configure or modify your ai2cli settings

License

MIT