Command-line tool for querying Nectar database schemas and stored procedures with natural language support.
Option 1: Automated Installation with winget (Windows 10/11)
Open Command Prompt as Administrator and run:
winget install OpenJS.NodeJS.LTS
winget install Git.GitClose and reopen Command Prompt, then:
npm install -g git+https://github.com/jcolernectar/nectar-cli.gitOption 2: Automated Installation with Chocolatey
If you have Chocolatey installed, open Command Prompt as Administrator:
choco install nodejs git -yClose and reopen Command Prompt, then:
npm install -g git+https://github.com/jcolernectar/nectar-cli.gitOption 3: Manual Installation
- Download and install Node.js: https://nodejs.org/ (LTS version)
- Download and install Git: https://git-scm.com/download/win
- Open Command Prompt (not PowerShell) and run:
npm install -g git+https://github.com/jcolernectar/nectar-cli.gitImportant: Always use Command Prompt (cmd), not PowerShell, to avoid execution policy errors.
The automated installation commands above will install:
- Node.js (version 14 or higher) - Includes npm
- Git - Required to install from GitHub
To verify installation:
node --version
npm --version
git --versionnpm install -g git+https://github.com/jcolernectar/nectar-cli.gitcd C:\Users\JColer\nectar-cli
npm install
npm linkConfigure the CLI with your API key and endpoint:
# 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 configAsk questions in plain English - the AI will figure out which tools to use:
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" --fullnectar 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# 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# Ask about the procedure
nectar ask "How does usp_ProcessOrder work and what tables does it use?"
# Get full details
nectar proc usp_ProcessOrder# Search for all customer-related objects
nectar search "customer" --full
# Get specific table schemas
nectar schema Customers
nectar schema CustomerAddressesThe CLI stores configuration in:
- Windows:
%APPDATA%\nectar-cli\config.json - macOS:
~/Library/Preferences/nectar-cli/config.json - Linux:
~/.config/nectar-cli/config.json
# 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 permissionsnectar-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 infoEnable debug mode to see raw API responses:
DEBUG=true nectar ask "show me customer tables"For issues or questions:
- Check configuration:
nectar config - Test connection:
nectar info - Contact your Nectar administrator
Private - Internal use only