Extended FAQ
Additional frequently asked questions beyond the main FAQ.
Development & Architecture
Q: How is the project structure organized?
A: The project is organized as:
├── bin/ # CLI entry points
├── app/ # Command implementations
├── utils/ # Utility functions
├── routes/ # API routes (REST server)
├── tests/ # Test files
├── types/ # TypeScript type definitions
├── docs/ # This documentation (VitePress)
├── mcp-server/ # Model Context Protocol implementation
└── _i18n/ # Internationalization filesQ: Where do I add a new command?
A:
- Create implementation in
app/[command-name].js - Add builder and handler functions
- Export from
app/index.js - Add tests in
tests/ - Document in
docs/02-commands/
Q: How is testing organized?
A: Test coverage has expanded from ~40% to ~85% with:
- 317+ new test cases
- 6 dedicated test files
- Focus on critical paths
- Run with:
npm test
Performance
Q: Why did startup time improve so much?
A: The 60-77% improvement comes from:
- Lazy-loading command modules (only load what's needed)
- Ultra-fast path for
--versionflag - Deferred yargs loading
- Conditional debug module loading
- Eliminated completion overhead
Startup went from ~2,200ms to ~700ms for most commands.
Database Operations
Q: Can I import different file formats?
A: Currently supported:
- CSV (comma-separated values)
- Excel (.xlsx files)
Use -o excel for Excel files.
Q: What if my data types don't match?
A: The import command has improved data type handling:
- Auto-detects common types
- Reports mismatches with clear errors
- Suggests corrections
- Use
--debugflag for detailed type information
Internationalization
Q: What languages are supported?
A:
- English (en) - Complete
- German (de) - First version complete
Contributing translations for other languages is welcome!
Q: How do I use German localization?
export HANA_LANG=de
hana-cli dbInfoMCP Server
Q: What is the MCP Server for?
A: Model Context Protocol enables AI assistants to interact with HANA CLI. It allows:
- AI-assisted database queries
- Automated schema analysis
- Code generation for data operations
- Integration with Claude, ChatGPT, etc.
Q: Where is MCP Server documentation?
A: See Development Guide - MCP Server section.
API Server
Q: Can I run HANA CLI as a server?
A: Yes! Start with:
hana-cli server --port 3000Swagger UI available at: http://localhost:3000/api-docs
Upgrades & Compatibility
Q: Which Node.js version should I use?
A: Latest stable is recommended. Current requirement: Node.js 22 or higher.
Q: How do I upgrade HANA CLI?
npm install -g hana-cli@latestOr from source:
git clone https://github.com/SAP-samples/hana-developer-cli-tool-example
cd hana-developer-cli-tool-example
npm install
npm linkQ: Is version 4.x backward compatible?
A: Mostly yes. Main breaking change:
- Express upgraded from 4.x to 5.x
- May affect REST API integration
See Changelog for details.
Custom Builds
Q: Can I customize HANA CLI?
A: Yes, you can:
- Fork the repository
- Modify source code in
app/,utils/,routes/ - Run tests:
npm test - Build:
npm run build - Install locally:
npm link
