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

ghmeta

v1.0.2

Published

Metabase Agent API Demo - CLI tool for quick startup

Readme

Metabase Agent CLI

A CLI tool that provides a chat interface for the Metabase Agent API. Ask natural language questions about your data and get answers powered by AI.

Features

  • 🗣️ Natural Language Queries - Ask questions in plain English, get answers from your data
  • 🤖 Multi-Provider AI Support - Choose between Anthropic Claude or Zhipu GLM models
  • ⚙️ Web-Based Configuration - Configure API keys through the Settings page, no manual file editing
  • 🚀 Quick Start - One command to launch everything

Prerequisites

  • Metabase v59+ (Enterprise) with the agent-api feature flag
  • Metabase API Key (generate from Admin Settings > Developer Settings)
  • Anthropic API key OR Zhipu AI API key
  • Node.js 18+

Installation

Option 1: Using npm CLI (Recommended)

Install globally and run with a single command:

npm install -g ghmeta
ghmeta

The CLI will automatically install dependencies on first run.

Option 2: Manual setup

git clone https://github.com/metabase/metabase-agent-api-demo.git
cd metabase-agent-api-demo

# Install server dependencies
npm install

# Install client dependencies and build
cd client
npm install
npm run build
cd ..

# Start server
npm start

Getting Your Metabase API Key

  1. Go to Admin Settings > Developer Settings
  2. Click "Create API key"
  3. Copy the generated API key (starts with mb_)

Configuration

When you first run ghmeta, open http://localhost:30100/config in your browser and configure:

| Setting | Description | Required | |---------|-------------|----------| | Metabase Instance URL | Your Metabase URL (e.g., https://your-metabase.com) | Yes | | Metabase API Key | Your Metabase API key (starts with mb_) | Yes | | Anthropic API Key | Your Anthropic API key (starts with sk-ant-) | At least one | | Zhipu API Key | Your Zhipu AI API key | At least one | | Default Model | AI model to use (e.g., claude-sonnet-4-20250514, glm-4.7) | No |

Supported AI Models

Anthropic Claude:

  • claude-sonnet-4-20250514 - Claude Sonnet 4 (default)
  • claude-opus-4-20250514 - Claude Opus 4
  • claude-haiku-4-20250514 - Claude Haiku 4

Zhipu AI:

  • glm-4.7 - GLM-4.7
  • glm-4-plus - GLM-4 Plus

Usage

CLI Commands

# Start the server (opens browser automatically)
ghmeta

# Show help
ghmeta help

Web Interface

  • Chat Page: http://localhost:30100/ - Ask questions about your data
  • Settings Page: http://localhost:30100/config - Configure API keys

Example Queries

Show me the top 10 products by revenue
What's the average order value by month?
Count users by country

Development

# Install dependencies (root + client)
npm install
cd client && npm install && cd ..

# Build client
npm run build
# or from client directory: cd client && npm run build

# Start server
npm start

Environment Variables

You can also configure using a .env file (create from .env.example):

METABASE_INSTANCE_URL=http://localhost:3000
METABASE_API_KEY=mb_your_api_key_here
ANTHROPIC_API_KEY=sk-ant-your_key_here
ZHIPU_API_KEY=your_zhipu_key_here
selectedModel=claude-sonnet-4-20250514
SERVER_PORT=30100

Project Structure

├── bin/
│   └── ghmeta.js        # CLI entry point
├── client/              # React frontend (separate package)
│   ├── src/
│   │   ├── App.tsx      # Main chat interface
│   │   └── ConfigPage.tsx  # Settings page
│   ├── package.json     # Frontend dependencies
│   └── vite.config.ts   # Vite config (builds to ../public)
├── public/              # Built frontend assets (served by server)
│   ├── index.html
│   └── assets/
└── server/              # Express backend
    └── src/
        ├── index.ts      # Server with API endpoints
        ├── config.ts     # Configuration management
        ├── metabase.ts  # Metabase API client
        └── tools.ts     # Agent tool definitions

License

MIT