#!/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
`);