#!/usr/bin/env node
/**
* Help System for SQL Server MCP
* Provides comprehensive information about all npm commands and usage
*/
console.log(`
π SQL Server MCP - Command Reference
${'='.repeat(80)}
π QUICK START COMMANDS
${'β'.repeat(80)}
npm start Start the MCP server
npm run dev Start with auto-reload for development
npm run help Show this help (you are here!)
π§ͺ TESTING COMMANDS
${'β'.repeat(80)}
π Unit & Integration Tests
npm test Run all automated unit tests (~10s)
npm run test:watch Run tests in watch mode
npm run test:coverage Run tests with coverage report
npm run test:ui Run tests with visual UI interface
π Integration Tests
npm run test:integration π Full integration test suite with Docker (~5-10min)
npm run test:integration:run Run integration tests (requires running database)
npm run test:integration:manual Manual phase tests (1, 2, 3)
npm run test:integration:ci For CI environments with external database
β‘ Performance Tests
npm run test:integration:performance β RECOMMENDED: Fast performance test (~2s)
npm run test:integration:warp Test with Warp MCP integration (~10s)
π‘ Protocol & Cloud Integration Tests
npm run test:integration:protocol MCP protocol smoke test
npm run test:integration:aws AWS Secrets Manager integration
npm run test:integration:azure Azure Key Vault integration
π³ DOCKER CONTAINER MANAGEMENT
${'β'.repeat(80)}
ποΈ Container Lifecycle
npm run docker:start Start SQL Server container & wait for ready
npm run docker:stop Stop and remove SQL Server container
npm run docker:restart Restart SQL Server container
npm run docker:clean Stop container & remove all volumes/data
npm run docker:status Check container status
π Debugging & Maintenance
npm run docker:wait Test database readiness
npm run docker:logs View SQL Server container logs
npm run docker:shell Get shell access to container
npm run docker:sql Connect to SQL Server CLI in container
π§ CODE QUALITY COMMANDS
${'β'.repeat(80)}
npm run lint Check code style and quality
npm run lint:fix Fix linting issues automatically
npm run format Format code with Prettier
npm run format:check Check if code is properly formatted
π DOCUMENTATION COMMANDS
${'β'.repeat(80)}
npm run docs:extract Extract JSDoc comments
npm run docs:generate-tools Generate tools documentation
npm run docs:generate-landing Generate landing page
npm run docs:build Build all documentation
npm run markdown:lint Check markdown files
npm run markdown:fix Fix markdown issues
npm run links:check Verify all markdown links
π‘οΈ SECURITY & MAINTENANCE
${'β'.repeat(80)}
npm run security:audit Run security audit
npm run audit:fix Fix security vulnerabilities
npm run clean Clean node_modules and build artifacts
π LOG VIEWING COMMANDS
${'β'.repeat(80)}
npm run logs Show server logs (smart path detection)
npm run logs:server Show server logs (explicit)
npm run logs:audit Show security audit logs
npm run logs:tail Follow server logs in real-time
npm run logs:tail:server Follow server logs in real-time
npm run logs:tail:audit Follow security audit logs in real-time
π‘ Custom File Paths:
npm run logs -- --file PATH View logs from custom file path
npm run logs -- --path PATH (alias for --file)
./scripts/show-logs.sh --help Detailed help for all options
π GIT HOOKS & CI/CD
${'β'.repeat(80)}
npm run hooks:install Install git pre-commit hooks
npm run hooks:uninstall Remove git hooks
npm run precommit Run pre-commit checks locally
npm run prepush Run pre-push validation
npm run ci Run full CI pipeline locally
π COMMAND CATEGORIES BY USE CASE
${'β'.repeat(80)}
π Daily Development:
npm run dev # Development with auto-reload
npm test # Quick unit + integration test validation
npm run test:integration # β RECOMMENDED: Full Docker integration testing
npm run test:integration:performance # Performance validation
npm run logs # View recent server logs
npm run logs:tail # Follow logs in real-time
π§ Testing & Validation:
npm run test:integration # π Complete integration suite with Docker
npm run test:coverage # Full test suite with coverage
npm run test:integration:ci # CI testing with external database
npm run test:unit # Just unit tests (fast)
npm run ci # Full CI validation
π§ Maintenance & Quality:
npm run lint:fix # Fix code style issues
npm run format # Format code
npm run security:audit # Security validation
π Documentation & Release:
npm run docs:build # Generate documentation
npm run links:check # Validate documentation
π‘ TESTING OPTIONS COMPARISON
${'β'.repeat(80)}
π³ INTEGRATION TESTING (β Recommended for Development):
npm run test:integration
β’ Setup Time: 2-3 minutes (automatic Docker)
β’ Prerequisites: Docker only
β’ Environment: SQL Server 2022 (standardized)
β’ Isolation: Complete (no system pollution)
β’ Use for: Development, learning, fast iteration
π§ CI TESTING (Production Validation):
npm run test:integration:ci
β’ Setup Time: Requires external SQL Server setup
β’ Prerequisites: SQL Server installation
β’ Environment: Your actual SQL Server version
β’ Use for: Production validation, enterprise testing
β‘ PERFORMANCE TESTING:
npm run test:integration:performance
β’ Duration: ~2 seconds
β’ Success Rate: 100%
β’ Features: Single persistent process, concurrent testing
β’ Use for: Regular validation, CI/CD, development
π WARP INTEGRATION:
npm run test:integration:warp
β’ Duration: ~10 seconds
β’ Success Rate: ~100%
β’ Features: Tests against running Warp instance
β’ Use for: End-to-end validation
π COMPREHENSIVE TESTING:
npm run test:integration
β’ Duration: ~5-10 minutes (depends on Docker)
β’ Coverage: Unit + Integration tests
β’ Features: Complete validation across all environments
β’ Use for: Pre-release validation, complete confidence
π TROUBLESHOOTING QUICK REFERENCE
${'β'.repeat(80)}
π³ Docker Test Issues:
β’ Container not starting: npm run docker:logs
β’ Port 1433 in use: docker ps (check for conflicts)
β’ Database not ready: npm run docker:wait
β’ Clean reset: npm run docker:clean && npm run docker:start
π§ Manual Test Failures:
β’ Check SQL Server is running: telnet localhost 1433
β’ Verify .env configuration
β’ Kill orphaned processes: pkill -f "node index.js"
Performance Issues:
β’ Use npm run test:integration:performance (current)
β’ Check connection pool settings in .env
β’ Monitor system resources
Connection Problems:
β’ Docker: npm run docker:status && npm run docker:logs
β’ Manual: Verify SQL_SERVER_HOST, SQL_SERVER_PORT
β’ Check SQL Server TCP/IP enabled
β’ Test direct connection: npm run test:integration:performance
π DOCUMENTATION LINKS
${'β'.repeat(80)}
README.md Project overview and quick start
docs/TESTING-GUIDE.md Comprehensive testing documentation
docs/SECURITY.md Security configuration guide
docs/ARCHITECTURE.md Technical architecture details
π‘ TIPS
${'β'.repeat(80)}
β’ Use 'npm run' (no arguments) to see all available scripts
β’ Most commands have descriptive output and progress indicators
β’ Performance tests include detailed metrics and benchmarks
β’ Docker tests require Docker, manual tests require SQL Server
β’ Use Docker for development, manual for production validation
π Ready to get started?
β’ New contributors: npm run test:integration
β’ Quick performance test: npm run test:integration:performance
β’ Complete validation: npm run test:integration
β’ Production validation: npm run test:integration:ci
`);