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

terminalai-app

v1.0.1

Published

AI-powered terminal command generator - type natural language, get shell commands

Readme

terminalai

AI-powered terminal command generator. Type natural language, get shell commands.

$ ai find all jpg files larger than 1mb
find . -name "*.jpg" -size +1M

Features

  • Natural language to shell commands - Just describe what you want
  • Pre-fills your command line - Review and edit before executing
  • Free to use - Uses free AI models via OpenRouter (free API key required)
  • Multi-shell support - Zsh, Bash, and Fish

Installation

# Install globally
npm install -g terminalai-app

# Set up shell integration (creates the 'ai' command)
terminalai setup

# Restart your terminal or run: source ~/.zshrc

On first run, you'll be prompted for a free API key from OpenRouter. The key is saved to ~/.config/terminalai/config.json.

Or try it without installing:

npx terminalai "find all jpg files"

Usage

After setup, use the ai command:

# Find files
ai find all python files modified today

# System info
ai show disk usage by folder

# Git operations
ai show commits from last week

# Text processing
ai count lines in all js files

# Network
ai show what is using port 3000

The generated command appears in your terminal ready to execute. Press Enter to run it, or edit it first.

How It Works

  1. You type ai <your request>
  2. terminalai sends your request to a free AI model via OpenRouter
  3. The AI generates the appropriate shell command
  4. The command is pre-filled in your terminal
  5. You review, optionally edit, and press Enter to execute

Configuration

API Key

On first run, terminalai will prompt you for an API key and save it automatically.

Get a free key from OpenRouter (takes 30 seconds). The free tier is sufficient for personal use.

Model Selection

On first run, you'll be prompted to select a model. You can change it anytime:

# Interactive model selection
ai model

# Set a specific model directly
ai model anthropic/claude-sonnet-4

Available free models:

  • mistralai/devstral-2512:free - Coding-focused (recommended)
  • deepseek/deepseek-r1-0528:free - Strong reasoning
  • meta-llama/llama-3.3-70b-instruct:free - General purpose

Browse all models at: https://openrouter.ai/models

Environment Variables

| Variable | Description | |----------|-------------| | OPENROUTER_API_KEY | Override saved API key | | TERMINALAI_MODEL | Override saved model | | TERMINALAI_SHELL | Override detected shell (zsh, bash, fish) |

Config is stored at: ~/.config/terminalai/config.json

Shell Support

| Shell | Pre-fill Support | Notes | |-------|------------------|-------| | Zsh | Full | Uses print -z | | Fish | Full | Uses commandline -r | | Bash | Partial | Adds to history, prints command |

Manual Shell Setup

If you prefer to set up manually, add one of these to your shell config:

Zsh (~/.zshrc):

function ai() {
  local cmd=$(terminalai "$*")
  [[ -n "$cmd" ]] && print -z "$cmd"
}

Fish (~/.config/fish/config.fish):

function ai
  set cmd (terminalai $argv)
  test -n "$cmd" && commandline -r "$cmd"
end

Bash (~/.bashrc):

function ai() {
  local cmd=$(terminalai "$*")
  [[ -n "$cmd" ]] && history -s "$cmd" && echo "$cmd"
}

Safety

  • Commands are never auto-executed - you always review first
  • The AI avoids destructive commands by default
  • You can edit any generated command before running

More Free Tools

I build free developer tools. Follow me on X to get notified about new releases:

@eibrahim

License

MIT