Token导航 LogoToken导航TokenDH.com
Nectar CLI logo
数据服务未说明官方级别未说明来源级核验

Nectar CLI

MCP Server

Nectar CLI是一个命令行工具,支持通过自然语言查询Nectar数据库模式和存储过程,适用于数据库开发和维护场景。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
数据分析JavaScript命令行工具

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

nectarstudio-ai

提供方

nectarstudio-ai

最后核验

2026/5/17 20:21

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

Nectar CLI

用于查询Nectar数据库模式和存储过程的命令行工具,支持自然语言。

快速入门(Windows)

选项1:带翼子板的自动安装(Windows 10/11)

打开 命令提示符 以管理员身份运行:

winget install OpenJS.NodeJS.LTS
winget install Git.Git

关闭并重新打开命令提示符,然后:

npm install -g git+https://github.com/jcolernectar/nectar-cli.git

选项2:使用Chocolatey自动安装

如果您安装了Chocolatey,请打开 命令提示符 作为管理员:

choco install nodejs git -y

关闭并重新打开命令提示符,然后:

npm install -g git+https://github.com/jcolernectar/nectar-cli.git

选项3:手动安装

  1. 下载并安装Node.js:https://nodejs.org/(LTS版本)
  2. 下载并安装Git:https://git-scm.com/download/win
  3. 打开 命令提示符 (非PowerShell)并运行:
npm install -g git+https://github.com/jcolernectar/nectar-cli.git

重要:始终使用 命令提示符 (cmd),而不是PowerShell,以避免执行策略错误。

先决条件

上面的自动安装命令将安装:

  1. Node.js (版本14或更高)-包括npm
  2. Git -需要从GitHub安装

要验证安装:

node --version
npm --version
git --version

安装

来自GitHub

npm install -g git+https://github.com/jcolernectar/nectar-cli.git

从地方发展

cd C:\Users\JColer\nectar-cli
npm install
npm link

设置

使用API密钥和终结点配置CLI:

# Set your API key (from Applications in Nectar)
nectar config:set-key YOUR_64_CHAR_API_KEY_HERE

# Set the endpoint (default: https://staging-api.magazinemanager.biz)
nectar config:set-endpoint https://staging-api.magazinemanager.biz

# Verify configuration
nectar config

用法

自然语言查询(推荐)

用简单的英语提问——人工智能会找出使用哪些工具:

nectar ask "What tables are used in the opportunities module?"
nectar ask "Show me the schema for customer-related tables"
nectar ask "How does usp_ProcessOrder work?"
nectar ask "What are the parameters for usp_GetCustomerData?"

直接命令

搜索对象

# Search by keyword
nectar search "customer"
nectar search "order"

# Include full schemas in results
nectar search "invoice" --full

获取表架构

nectar schema Customers
nectar schema dbo.Orders
nectar table Invoices  # 'table' is an alias for 'schema'

获取程序详细信息

nectar proc usp_GetCustomerData
nectar procedure usp_ProcessOrder  # 'procedure' is an alias for 'proc'

发现数据库

# Show all objects
nectar discover

# Show only specific types
nectar discover --tables
nectar discover --procs
nectar discover --views
nectar discover --functions

服务器信息

# Show server and role info
nectar info

# List all available tools
nectar tools

配置管理

# Show current configuration
nectar config

# Clear all configuration
nectar config:clear

示例

示例1:探索新模块

# Start with natural language
nectar ask "I'm working on the billing module. What tables and procedures should I know about?"

# Drill down on specific tables
nectar schema Invoices
nectar schema Payments

# Check procedure details
nectar proc usp_CreateInvoice

示例2:理解存储过程

# Ask about the procedure
nectar ask "How does usp_ProcessOrder work and what tables does it use?"

# Get full details
nectar proc usp_ProcessOrder

示例3:查找相关对象

# Search for all customer-related objects
nectar search "customer" --full

# Get specific table schemas
nectar schema Customers
nectar schema CustomerAddresses

配置文件位置

CLI将配置存储在:

  • 视窗: %APPDATA%\nectar-cli\config.json
  • macOS: ~/Library/Preferences/nectar-cli/config.json
  • Linux: ~/.config/nectar-cli/config.json

故障排除

API密钥无效

# Verify your API key is 64 characters
nectar config

# Get a new API key from Applications in Nectar
# Set it again:
nectar config:set-key YOUR_NEW_API_KEY

连接错误

# Verify endpoint is correct
nectar config

# Test connection
nectar info

权限错误

# Check which role your API key is using
nectar info

# Contact admin to verify role has MCP enabled and correct permissions

发展

项目结构

nectar-cli/
├── bin/
│   └── nectar.js          # Main CLI entry point
├── lib/
│   ├── api.js              # API client
│   ├── config.js           # Configuration management
│   ├── formatter.js        # Output formatting
│   └── commands/           # Command implementations
│       ├── ask.js
│       ├── config.js
│       ├── discover.js
│       ├── proc.js
│       ├── schema.js
│       └── search.js
├── package.json
└── README.md

局部测试

# Install dependencies
npm install

# Link for local testing
npm link

# Test commands
nectar config
nectar info

调试

启用调试模式以查看原始API响应:

DEBUG=true nectar ask "show me customer tables"

支持

对于问题或疑问:

  1. 检查配置: nectar config
  2. 测试连接: nectar info
  3. 联系您的Nectar管理员

许可证

私人-仅供内部使用

目录标签

目录标签

数据分析JavaScript命令行工具数据库查询本地部署自然语言处理数据库开发存储过程

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

api-key

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明api-key部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP