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

sqlite3-ai-cli

v1.0.3

Published

SQLite3 CLI tool with AI integration and tab completion

Readme

SQLite3 AI CLI

A thin wrapper over the SQLite3 CLI with AI integration and tab completion.

Features

  • Full SQLite3 compatibility: All standard SQLite3 commands work as usual (.table, .headers on, SQL queries, etc.)
  • Tab completion: Intelligent completion for SQL keywords and table names
  • AI integration: Generate SQL queries using natural language with the .ai command
  • Model configuration: Configure which AI model to use with .model
  • API key management: Securely store your Anthropic API key with .anthropic-key

Installation

From npm (Recommended)

npm install -g sqlite3-ai-cli

From source

git clone <repository-url>
cd sqlite3-ai-cli
npm install
npm run build
npm install -g .

Usage

After installation, you can use the sqlite3-ai command:

# Connect to a database file
sqlite3-ai [database.db]

# Create/connect to a new database
sqlite3-ai mydatabase.db

Development Usage

# Run in development mode
npm run dev [database.db]

# Build and run locally
npm run build
npm start [database.db]

Commands

Standard SQLite3 Commands

All standard SQLite3 commands work as usual:

  • .tables - List all tables
  • .schema - Show table schemas
  • .headers on/off - Toggle column headers
  • Any SQL query (SELECT, INSERT, UPDATE, DELETE, etc.)

AI-Enhanced Commands

.model [model-name]

Set or view the current AI model.

.model                           -- View current model
.model claude-sonnet-4-20250514  -- Set model

.anthropic-key [api-key]

Set or view the current Anthropic API key.

.anthropic-key              -- View current key (masked)
.anthropic-key sk-ant-...   -- Set API key

.ai <prompt>

Generate SQL using natural language. The AI has access to your database schema.

.ai show all users
.ai find the top 10 customers by total orders
.ai create a table for storing product reviews

Tab Completion

Press Tab to see completions:

  • After typing sel + Tab → SELECT
  • After typing SELECT * FROM + Tab → shows available tables
  • After typing . + Tab → shows dot commands

Examples

-- Set up AI
.model claude-sonnet-4-20250514
.anthropic-key sk-ant-your-key-here

-- Use AI to generate queries
.ai show me all customers from California
-- This might generate: SELECT * FROM customers WHERE state = 'California';

-- Standard SQLite3 usage still works
.tables
.schema customers
SELECT COUNT(*) FROM customers;

Configuration

Configuration is stored in ~/.sqlite3-ai-cli/config.json and includes:

  • AI model selection
  • Anthropic API key (encrypted storage recommended for production use)