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

@nine-lab/nine-query-connector

v0.1.4

Published

NineQuery AI Connector for Database

Readme

cat < README.md

@nine-lab/nine-query-connector 🚀

자연어 기반 SQL 생성 엔진(NineQuery)과 실제 데이터베이스 사이를 연결하는 AI 전용 DB 커넥터 서비스입니다.

AI가 생성한 SQL을 안전하게 실행하고, 데이터베이스의 구조(Schema)를 AI에게 전달하기 위한 표준 API 환경을 제공합니다.


🌟 주요 기능

  • Multi-DB 지원: MySQL, PostgreSQL, MariaDB와 즉시 연결 가능합니다.
  • 스키마 자동 추출: AI가 쿼리를 생성할 때 필요한 테이블 및 컬럼 정보를 API로 제공합니다.
  • 보안 가드: 오직 `SELECT` 쿼리만 실행할 수 있도록 설계되어 데이터 변조를 원천 차단합니다.
  • BigInt 대응: 데이터베이스의 큰 숫자형(`BigInt`) 데이터를 JSON으로 안전하게 변환하여 반환합니다.

🛠 설치 및 실행 방법

1. 전역(Global) 설치

어느 경로에서나 명령어로 즉시 기동할 수 있도록 전역 설치를 권장합니다.

```bash npm install -g @nine-lab/nine-query-connector ```

2. 환경 변수 설정 (`.env`)

서버 실행 전, 데이터베이스 접속 정보를 설정해야 합니다. 실행할 경로에 `.env` 파일을 생성하거나 시스템 환경 변수를 설정하세요.

```env

서버 포트 (기본값: 3000)

SERVER_PORT=3000

데이터베이스 설정

DB_TYPE=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_USER=your_user DB_PASS=your_password DB_NAME=your_database ```

3. 서버 기동

설정이 완료되었다면 터미널에서 아래 명령어를 입력합니다.

```bash nine-connector ```


🔌 API 명세

1. 데이터베이스 스키마 조회

AI 모델이 현재 DB 구조를 학습할 수 있도록 메타데이터를 반환합니다.

  • Endpoint: `GET /api/schema`

2. SQL 쿼리 실행

AI가 생성한 SQL을 실행합니다. 보안을 위해 SELECT 문만 허용됩니다.

  • Endpoint: `POST /api/query`

📄 라이선스

MIT © nine-lab EOF