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

@shell-ai/cli

v1.1.1

Published

Interactive command-line interface for Shell AI with Ollama backend

Readme

@shell-ai/cli

Interactive command-line interface for Shell AI with Ollama backend.

NPM Version GitHub Stars License Issues PRs Welcome

Overview

This package provides the command-line interface for Shell AI, enabling users to interact with local AI models through a powerful terminal interface with comprehensive model, and memory management.

Features

  • Interactive Chat: Real-time conversation with AI models using React-based terminal UI
  • Model Management: Download, list, and remove Ollama models
  • Configuration Management: Comprehensive config system with nested key support
  • Memory Management: Conversation persistence with search and statistics
  • Tool Integration: Access to Shell AI's complete tool ecosystem
  • Agent Integration: ReAct agent model with reasoning capabilities

Installation

Global Installation

npm install -g @shell-ai/cli

Direct Usage

npx @shell-ai/cli

Usage

shell-ai

With options:

# Use specific model and Ollama URL
shell-ai --model mistral --url http://localhost:11434

# Custom system prompt and temperature
shell-ai --system "You are a coding expert" --temperature 0.9

# Set max tokens
shell-ai --max-tokens 2048

Interactive Mode Commands

Within the interactive chat session, use slash commands:

  • /help - Show available commands and usage
  • /model - Switch between models
  • /info - Show information about the current session
  • /clear - Clear conversation history
  • /exit or /quit - Exit the interactive session

Global Options

Available for most commands:

  • -u, --url <url> - Set Ollama URL (default: http://localhost:11434)
  • -m, --model <model> - Use specific model
  • -s, --system <prompt> - Set custom system prompt
  • -t, --temperature <temp> - Set temperature (0-2)
  • --max-tokens <tokens> - Set maximum tokens for response

Configuration

Configuration File

Shell AI automatically creates and manages a configuration file with settings for:

  • Current model selection
  • Ollama URL
  • System prompts
  • Memory settings (max messages, persistence, file path)
  • Temperature and token limits

Example Configuration

{
  "currentModel": "gpt-oss",
  "ollamaUrl": "http://localhost:11434",
  "systemPrompt": "You are a helpful AI assistant",
  "temperature": 0.7,
  "memory": {
    "maxMessages": 50,
    "persistToFile": true,
    "filePath": "~/.shell-ai/memory.json"
  }
}

Model Context Protocol (MCP) Integration

Shell AI supports the Model Context Protocol (MCP), allowing you to extend functionality by connecting to external MCP servers. This enables integration with databases, APIs, custom tools, and third-party services.

MCP Configuration

Create a configuration file at ~/.shell-ai/mcp.json to define your MCP servers:

{
  "servers": [
    {
      "name": "github-server",
      "enabled": true,
      "http": {
        "url": "https://api.github.com/mcp",
        "auth": {
          "type": "bearer",
          "token": "your_github_token"
        }
      },
      "description": "GitHub MCP server integration"
    }
  ],
  "globalTimeout": 30000,
  "maxConcurrentConnections": 10,
  "enableAutoReconnect": true
}

Supported Transport Types

  • HTTP: Standard HTTP connections with authentication support
  • SSE: Server-Sent Events for real-time communication
  • STDIO: Local process communication for development

Authentication Methods

  • Bearer Token: For OAuth2 and API tokens
  • Basic Auth: Username/password authentication
  • API Key: Custom API key headers
  • OAuth2: Full OAuth2 flow support

For example checkout the MCP Example Integration for a complete implementation.

Memory System

Shell AI includes a sophisticated memory system that:

  • Persists conversations across sessions
  • Supports different memory types (conversation, file, command)
  • Enables searching through past interactions
  • Provides detailed statistics and management

Requirements

  • Node.js >= 20.18.1
  • Ollama installed and running
  • At least one Ollama model downloaded

Quick Setup

# Install and start Ollama
# Visit https://ollama.ai/ for installation instructions

# Pull a model
ollama pull gpt-oss

# Start Ollama server (if not running)
ollama serve

# Install and run Shell AI
npm install -g @shell-ai/cli
shell-ai

Troubleshooting

Ollama Connection Issues

  1. Ensure Ollama is running: ollama serve
  2. Check available models: ollama list or shell-ai model list
  3. Test connection: shell-ai --url <your-ollama-url> --model <your-model>

Permission Issues

If you encounter permission issues with global installation:

# Use npx instead
npx @shell-ai/cli

# Or install with proper permissions (Unix/macOS)
sudo npm install -g @shell-ai/cli

License

Apache-2.0 © 2025 Shell AI Team