{"id":20484433,"url":"https://github.com/sap-samples/hana-developer-cli-tool-example","last_synced_at":"2026-05-15T00:17:05.521Z","repository":{"id":40363801,"uuid":"240335405","full_name":"SAP-samples/hana-developer-cli-tool-example","owner":"SAP-samples","description":"Learn how to build a developer-centric SAP HANA command line tool, particularly designed to be used when performing SAP HANA development in non-SAP tooling (for example from VS Code).","archived":false,"fork":false,"pushed_at":"2025-04-09T18:08:43.000Z","size":150603,"stargazers_count":92,"open_issues_count":1,"forks_count":24,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-04-13T04:05:02.867Z","etag":null,"topics":["command-line-tool","owner-jung-thomas","sample","sample-code","sap-hana","sap-hana-cloud","sap-hana-cloud-hana-database","vscode"],"latest_commit_sha":null,"homepage":"","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SAP-samples.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.js","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-13T18:45:21.000Z","updated_at":"2025-04-09T18:08:46.000Z","dependencies_parsed_at":"2024-04-09T16:25:51.868Z","dependency_job_id":"b3400915-93d0-4515-a812-91bc706ab79b","html_url":"https://github.com/SAP-samples/hana-developer-cli-tool-example","commit_stats":{"total_commits":285,"total_committers":8,"mean_commits":35.625,"dds":0.1578947368421053,"last_synced_commit":"60536cc878d886e81536d79f61c6a5fd858fbdb8"},"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-samples%2Fhana-developer-cli-tool-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-samples%2Fhana-developer-cli-tool-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-samples%2Fhana-developer-cli-tool-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SAP-samples%2Fhana-developer-cli-tool-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SAP-samples","download_url":"https://codeload.github.com/SAP-samples/hana-developer-cli-tool-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248661708,"owners_count":21141450,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line-tool","owner-jung-thomas","sample","sample-code","sap-hana","sap-hana-cloud","sap-hana-cloud-hana-database","vscode"],"created_at":"2024-11-15T16:22:22.066Z","updated_at":"2026-05-15T00:17:05.459Z","avatar_url":"https://github.com/SAP-samples.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SAP HANA Developer Command Line Interface\n\n[![REUSE status](https://api.reuse.software/badge/github.com/SAP-samples/hana-developer-cli-tool-example)](https://api.reuse.software/info/github.com/SAP-samples/hana-developer-cli-tool-example)\n\n## ⚠️ Important Notice - Major Updates (Feb/March 2026)\n\n\u003e **Version 4.x introduces significant changes including Express 5 migration, refactored database connection handling, and major performance improvements. While we've tested extensively, please be aware of potential issues in your specific environment.**\n\n**If you encounter problems:**\n\n- **Report Issues:** Please open an issue on our [GitHub Issues page](https://github.com/SAP-samples/hana-developer-cli-tool-example/issues) with details about your environment and the problem you're experiencing.\n\n- **Rollback to Stable Version:** If you need to quickly revert to the last stable release before these major changes, you can install version 3.202601.0 (January 2026):\n\n  ```shell\n  npm install -g hana-cli@3.202601.0\n  ```\n\n**What's Changed:** The [change log](CHANGELOG.md) describes all notable changes including Express 5 migration, database connection refactoring, CLI startup performance optimization (60-77% faster), expanded test coverage (85%+ coverage), and the new VitePress documentation site.\n\n## 📚 Documentation\n\nComplete documentation is available in the **[`docs/`](docs/)** folder and organized with VitePress. This README will maintain a high-level overview and quick links to the most important sections of the documentation but over time expect that more and more detailed documentation will be added to the docs folder as the project evolves.\n\n**Quick Links:**\n\n- **[Getting Started](docs/01-getting-started/)** - Installation and setup\n- **[Command Reference](docs/02-commands/)** - All 20+ commands with examples\n- **[Features Guide](docs/03-features/)** - CLI, API, MCP, and more\n- **[API Reference](docs/04-api-reference/)** - REST API documentation\n- **[FAQ](docs/faq.md)** - Frequently asked questions\n- **[Troubleshooting](docs/troubleshooting.md)** - Common issues and solutions\n\n### Run Documentation Locally\n\n```bash\ncd docs\nnpm install\nnpm run docs:dev\n# Open http://localhost:5173\n```\n\n### Build For Production\n\n```bash\ncd docs\nnpm run docs:build\nnpm run docs:serve\n```\n\nSee [docs/README.md](docs/README.md) for complete documentation setup details.\n\n---\n\n## Description\n\nThis sample is intended to shown how one could build a developer-centric SAP HANA command line tool, particularly designed to be used when performing local SAP HANA development in non-SAP tooling (like VSCode). It utilizes the default-env.json that is often used in local development for connectivity to a remote SAP HANA DB (although it can of course be used with a local SAP HANA, express edition instance as well). There is no intention to replacing the hdbsql tool as a generic SQL console. Instead this sample will focus on simplifying and grouping common and complex commands that otherwise might a lot of separate scripts.\n\nIntroduction Video: [https://youtu.be/dvVQfi9Qgog](https://youtu.be/dvVQfi9Qgog)\n\nHowever the tool isn't limited to only local development. It also works well when developing in the cloud. The hana-cli tool can also run well from a cloud shell in the SAP Business Application Studio, Google Cloud Shell, AWS Cloud9, etc. We can also run against a SAP HANA service for SAP BTP or SAP HANA Cloud instance. This demonstrates that the tool can run just about anywhere you can get a command line that has access to the Node.js Runtime.  We can also connect to a remote HANA instance even if it isn't running in the same cloud environment in which we are performing our development tasks.\n\n### Supported Environments\n\n```mermaid\ngraph TD\n    A[\"SAP HANA CLI Tool\"] --\u003e B{Development Environment}\n    B --\u003e C[\"Local Development\"]\n    B --\u003e D[\"Cloud Development\"]\n    \n    C --\u003e C1[\"VSCode\"]\n    C --\u003e C2[\"Local SAP HANA Express\"]\n    C --\u003e C3[\"Remote SAP HANA\"]\n    \n    D --\u003e D1[\"SAP Business App Studio\"]\n    D --\u003e D2[\"Google Cloud Shell\"]\n    D --\u003e D3[\"AWS Cloud9\"]\n    D --\u003e D4[\"SAP BTP HANA Service\"]\n    D --\u003e D5[\"SAP HANA Cloud\"]\n    \n    style A fill:#0070C0\n    style B fill:#FF6B6B\n    style C fill:#51CF66\n    style D fill:#FFD93D\n```\n\nRunning in Cloud Shells Video: [https://youtu.be/L7QyVLvAIIQ](https://youtu.be/L7QyVLvAIIQ)\n\n## Requirements / Download and Installation\n\nIf you would rather just access the tool directly, it is now available in npm as well. You can install via:\n\n```shell\nnpm install -g hana-cli\n```\n\n### Installation Methods\n\n```mermaid\ngraph LR\n    A[\"SAP HANA CLI Tool\"] --\u003e B{Installation Method}\n    \n    B --\u003e B1[\"NPM Package\u003cbr/\u003eQuick Install\"]\n    B1 --\u003e B1a[\"npm install -g hana-cli\"]\n    B1a --\u003e B1b[\"✅ Ready to Use\"]\n    \n    B --\u003e B2[\"Clone \u0026 Build\u003cbr/\u003eFrom Source\"]\n    B2 --\u003e B2a[\"Clone Repository\u003cbr/\u003efrom GitHub\"]\n    B2a --\u003e B2b[\"Run npm install\"]\n    B2b --\u003e B2c[\"Run npm link\"]\n    B2c --\u003e B2d[\"✅ Ready to Use\"]\n    \n    style B1 fill:#0070C0,color:#fff\n    style B2 fill:#FF6B6B,color:#fff\n    style B1b fill:#51CF66,color:#fff\n    style B2d fill:#51CF66,color:#fff\n```\n\nOtherwise you can also run it from the sources as described here:\n\n- Install Node.js version 20.19.0 or later on your development machine [https://nodejs.org/en/download/](https://nodejs.org/en/download/)\n\n- Clone the repository from [https://github.com/SAP-samples/hana-developer-cli-tool-example](https://github.com/SAP-samples/hana-developer-cli-tool-example)\n\n```shell\ngit clone https://github.com/SAP-samples/hana-developer-cli-tool-example\n```\n\n- Run NPM install from the root of the hana-developer-cli-tool-example project you just cloned to download dependencies\n\n```shell\nnpm install\n```\n\n- Run NPM link from the cloned project root to make the hana-cli command available from everywhere [https://docs.npmjs.com/cli/link](https://docs.npmjs.com/cli/link)\n\n```shell\nnpm link\n```\n\n[![asciicast](https://asciinema.org/a/301560.svg)](https://asciinema.org/a/301560)\n\n## BTP CLI Installation\n\nThe hana-cli tool includes several commands that interact with SAP Business Technology Platform (BTP) services. All BTP-related functionality in this tool relies on the [SAP BTP Command Line Interface (btp CLI)](https://help.sap.com/docs/btp/sap-business-technology-platform/btp-cli-command-reference) being installed and available in your system's PATH.\n\n### About the BTP CLI\n\nThe btp CLI is SAP's official command-line tool for managing resources and services on the SAP Business Technology Platform. It provides capabilities for managing global accounts, directories, subaccounts, entitlements, service instances, and more. The hana-cli tool wraps and extends many of these capabilities with developer-friendly commands.\n\n### Installing the BTP CLI with install-btp.sh\n\nFor Linux and macOS users, this repository includes a convenient installation script [`install-btp.sh`](install-btp.sh) that automates the installation of the BTP CLI.\n\nThe script performs the following actions:\n\n1. Downloads the latest BTP CLI installer from the SAP Development Tools download page\n2. Makes the installer executable and runs it with automatic confirmation\n3. Configures shell aliases for easier BTP CLI usage\n4. Adds the BTP CLI binary location to your PATH\n\n**To use the installation script:**\n\n```shell\nchmod +x install-btp.sh\n./install-btp.sh\n```\n\nAfter running the script, you may need to restart your terminal or run `source ~/.bashrc` to apply the PATH changes.\n\n**Note:** Windows users should download the BTP CLI from the [SAP Development Tools page](https://tools.hana.ondemand.com/#cloud-btpcli) and follow the platform-specific instructions there.\n\n### Verifying the Installation\n\nOnce installed, you can verify the BTP CLI is available by running:\n\n```shell\nbtp --version\n```\n\nYou can also use the hana-cli tool itself to check your BTP CLI configuration:\n\n```shell\nhana-cli btp\n```\n\nThis will display your current BTP target information including global account, directory, and subaccount if configured.\n\n## Security\n\nThis application primarily uses the default-env.json that is often used in local development for connectivity to a remote HANA DB (although it can of course be used with a local SAP HANA, express edition instance as well). For more details on how the default-env.json works, see the readme.md of the @sap/xsenv package or the @sap/hdi-deploy package.\n\n### Connection Configuration Resolution Order\n\nThe tool doesn't simply look for a default-env.json file in the current directory however. There are numerous options and places it will look for the connection parameters. Here is the order in which it checks:\n\n```mermaid\ngraph TD\n    A[\"Connection Resolution\u003cbr/\u003eStarted\"] --\u003e B{Admin Mode\u003cbr/\u003eEnabled?}\n    B --\u003e|YES| B1[\"Look for\u003cbr/\u003edefault-env-admin.json\"]\n    B --\u003e|NO| C{.cdsrc-private.json\u003cbr/\u003eFound?}\n    \n    B1 --\u003e B2{Found?}\n    B2 --\u003e|YES| Z1[\"Use Admin Credentials\"]\n    B2 --\u003e|NO| C\n    \n    C --\u003e|YES| C1[\"Use CAP cds bind\u003cbr/\u003eDynamic Lookup\"]\n    C --\u003e|NO| D{.env File\u003cbr/\u003eFound?}\n    \n    C1 --\u003e Z2[\"Secure Lookup\u003cbr/\u003efrom CF/K8s\"]\n    \n    D --\u003e|YES| D1{Contains\u003cbr/\u003eVCAP_SERVICES?}\n    D1 --\u003e|YES| Z3[\"Use VCAP Services\"]\n    D1 --\u003e|NO| E\n    D --\u003e|NO| E\n    \n    E{--conn Parameter\u003cbr/\u003eSpecified?} --\u003e|YES| E1[\"Look for specified\u003cbr/\u003econnection file\"]\n    E1 --\u003e E2{Local or\u003cbr/\u003eHome Found?}\n    E2 --\u003e|YES| Z4[\"Use Specified File\"]\n    E2 --\u003e|NO| F\n    E --\u003e|NO| F\n    \n    F[\"Look for\u003cbr/\u003edefault-env.json\u003cbr/\u003ein current/parent dirs\"]\n    F --\u003e G{Found?}\n    G --\u003e|YES| Z5[\"Use default-env.json\"]\n    G --\u003e|NO| H[\"Last Resort:\u003cbr/\u003eLook for default.json\u003cbr/\u003ein HOME/.hana-cli/\"]\n    \n    H --\u003e I{Found?}\n    I --\u003e|YES| Z6[\"Use default.json\"]\n    I --\u003e|NO| Z7[\"❌ No Connection\u003cbr/\u003eConfiguration Found\"]\n    \n    style Z1 fill:#51CF66\n    style Z2 fill:#51CF66\n    style Z3 fill:#51CF66\n    style Z4 fill:#51CF66\n    style Z5 fill:#51CF66\n    style Z6 fill:#51CF66\n    style Z7 fill:#FF6B6B\n```\n\n- First we look for the Admin option and use a default-env-admin.json - this overrides all other parameters\n- If no admin option or if there was an admin option but no default-env-admin.json could be found in this directory or 5 parent directories, then look for `.cdsrc-private.json` in this directory or 5 parent directories and use [`cds bind`](https://cap.cloud.sap/docs/advanced/hybrid-testing#bind-to-cloud-services) functionality to lookup the credentials securely. This is the most secure option, but please note: this will make each command take a few seconds longer as credentials are no longer stored locally but looked up from cf or k8s dynamically with each command\n- If no `.cdsrc-private.json` found in this directory or 5 parent directories, then look for a .env file in this directory or up to 5 parent directories\n- No .env file found or it doesn't contain a VCAP_SERVICES section, then check to see if the --conn parameter was specified. If so check for that file in the current directory or up to 5 parent directories\n- If the file specified via the --conn parameter wasn't found locally then check for it in the ${homedir}/.hana-cli/ folder\n- If no specific configuration file was was found then look for a file named default-env.json in the current directory or up to 5 parent directories\n- Last resort if nothing has been found up to this point - look for a file named default.json in the ${homedir}/.hana-cli/ folder\n\n## Examples\n\nA lot of the functionality of this tool revolves around typical tasks you face while doing HANA database development.\nFor example you might want to get a list of all views in your current schema/container:\n\n```shell\nC:\\github\\hana-xsa-opensap-hana7\\user_db\u003ehana-cli views\nSchema: OPENSAP_HANA_USER, View: *\nSCHEMA_NAME        VIEW_NAME                                    VIEW_OID  COMMENTS\n-----------------  -------------------------------------------  --------  ------------\nOPENSAP_HANA_USER  user.models::USER_DETAILS                    171133    USER_DETAILS\nOPENSAP_HANA_USER  user.models::USER_DETAILS/hier/USER_DETAILS  171139    null\n```\n\nThen perhaps you want to inspect a view to see the columns and their data types:\n\n```shell\nC:\\github\\hana-xsa-opensap-hana7\\user_db\u003ehana-cli view * user.models::USER_DETAILS\nSchema: %, View: user.models::USER_DETAILS\n{ SCHEMA_NAME: 'OPENSAP_HANA_USER',\n  VIEW_NAME: 'user.models::USER_DETAILS',\n  VIEW_OID: 171133,\n  COMMENTS: 'USER_DETAILS',\n  IS_COLUMN_VIEW: 'TRUE',\n  VIEW_TYPE: 'CALC',\n  HAS_STRUCTURED_PRIVILEGE_CHECK: 'TRUE',\n  HAS_PARAMETERS: 'TRUE',\n  HAS_CACHE: 'NONE',\n  CREATE_TIME: '2019-07-30 13:14:15.594000000' }\n\n\nSCHEMA_NAME        VIEW_NAME                  VIEW_OID  COLUMN_NAME  POSITION  DATA_TYPE_NAME  OFFSET  LENGTH  SCALE  IS_NULLABLE  DEFAULT_VALUE  CS_DATA_TYPE_NAME  COLUMN_ID  COMMENTS\n-----------------  -------------------------  --------  -----------  --------  --------------  ------  ------  -----  -----------  -------------  -----------------  ---------  ---------\nOPENSAP_HANA_USER  user.models::USER_DETAILS  171133    EMAIL        1         NVARCHAR        0       255     null   TRUE         null           STRING             171135     Email\nOPENSAP_HANA_USER  user.models::USER_DETAILS  171133    FIRSTNAME    2         NVARCHAR        0       40      null   TRUE         null           STRING             171136     FirstName\nOPENSAP_HANA_USER  user.models::USER_DETAILS  171133    LASTNAME     3         NVARCHAR        0       40      null   TRUE         null           STRING             171137     LastName\nOPENSAP_HANA_USER  user.models::USER_DETAILS  171133    USERID       4         INTEGER         0       10      0      TRUE         null           INT                171138     UserId\n```\n\nBut there are multiple output options for inspection. Perhaps you are using Cloud Application Programming Model and need to create a proxy entity in CDS for a view. This tool will read the catalog metadata and convert it to CDS:\n\n```shell\nC:\\github\\hana-xsa-opensap-hana7\\user_db\u003ehana-cli view OPENSAP_HANA_USER user.models::USER_DETAILS -o cds\nSchema: OPENSAP_HANA_USER, View: user.models::USER_DETAILS\n@cds.persistence.exists\nEntity user_modelsUSER_DETAILS {\n key    \"EMAIL\": String(255) null  @title: 'EMAIL: Email' ;\nkey     \"FIRSTNAME\": String(40) null  @title: 'FIRSTNAME: FirstName' ;\nkey     \"LASTNAME\": String(40) null  @title: 'LASTNAME: LastName' ;\nkey     \"USERID\": Integer null  @title: 'USERID: UserId' ;\n}\n```\n\nOr maybe you are service enabling this view and you want to see it converted to EDMX:\n\n```shell\nC:\\github\\hana-xsa-opensap-hana7\\user_db\u003ehana-cli view OPENSAP_HANA_USER user.models::USER_DETAILS -o edmx\nSchema: OPENSAP_HANA_USER, View: user.models::USER_DETAILS\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cedmx:Edmx Version=\"1.0\" xmlns:edmx=\"http://schemas.microsoft.com/ado/2007/06/edmx\" xmlns:m=\"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata\" xmlns:sap=\"http://www.sap.com/Protocols/SAPData\"\u003e\n  \u003cedmx:Reference Uri=\"https://wiki.scn.sap.com/wiki/download/attachments/448470974/Common.xml?api=v2\" xmlns:edmx=\"http://docs.oasis-open.org/odata/ns/edmx\"\u003e\n    \u003cedmx:Include Alias=\"Common\" Namespace=\"com.sap.vocabularies.Common.v1\"/\u003e\n  \u003c/edmx:Reference\u003e\n  \u003cedmx:DataServices m:DataServiceVersion=\"2.0\"\u003e\n    \u003cSchema Namespace=\"HanaCli\" xmlns=\"http://schemas.microsoft.com/ado/2008/09/edm\"\u003e\n      \u003cEntityContainer Name=\"EntityContainer\" m:IsDefaultEntityContainer=\"true\"\u003e\n        \u003cEntitySet Name=\"user_modelsUSER_DETAILS\" EntityType=\"HanaCli.user_modelsUSER_DETAILS\"/\u003e\n      \u003c/EntityContainer\u003e\n      \u003cEntityType Name=\"user_modelsUSER_DETAILS\"\u003e\n        \u003cKey\u003e\n          \u003cPropertyRef Name=\"EMAIL\"/\u003e\n          \u003cPropertyRef Name=\"FIRSTNAME\"/\u003e\n          \u003cPropertyRef Name=\"LASTNAME\"/\u003e\n          \u003cPropertyRef Name=\"USERID\"/\u003e\n        \u003c/Key\u003e\n        \u003cProperty Name=\"EMAIL\" Type=\"Edm.String\" MaxLength=\"255\"/\u003e\n        \u003cProperty Name=\"FIRSTNAME\" Type=\"Edm.String\" MaxLength=\"40\"/\u003e\n        \u003cProperty Name=\"LASTNAME\" Type=\"Edm.String\" MaxLength=\"40\"/\u003e\n        \u003cProperty Name=\"USERID\" Type=\"Edm.Int32\"/\u003e\n      \u003c/EntityType\u003e\n      \u003cAnnotations Target=\"HanaCli.user_modelsUSER_DETAILS/EMAIL\" xmlns=\"http://docs.oasis-open.org/odata/ns/edm\"\u003e\n        \u003cAnnotation Term=\"Common.Label\" String=\"EMAIL: Email\"/\u003e\n      \u003c/Annotations\u003e\n      \u003cAnnotations Target=\"HanaCli.user_modelsUSER_DETAILS/FIRSTNAME\" xmlns=\"http://docs.oasis-open.org/odata/ns/edm\"\u003e\n        \u003cAnnotation Term=\"Common.Label\" String=\"FIRSTNAME: FirstName\"/\u003e\n      \u003c/Annotations\u003e\n      \u003cAnnotations Target=\"HanaCli.user_modelsUSER_DETAILS/LASTNAME\" xmlns=\"http://docs.oasis-open.org/odata/ns/edm\"\u003e\n        \u003cAnnotation Term=\"Common.Label\" String=\"LASTNAME: LastName\"/\u003e\n      \u003c/Annotations\u003e\n      \u003cAnnotations Target=\"HanaCli.user_modelsUSER_DETAILS/USERID\" xmlns=\"http://docs.oasis-open.org/odata/ns/edm\"\u003e\n        \u003cAnnotation Term=\"Common.Label\" String=\"USERID: UserId\"/\u003e\n      \u003c/Annotations\u003e\n    \u003c/Schema\u003e\n  \u003c/edmx:DataServices\u003e\n\u003c/edmx:Edmx\u003e\n```\n\nThis tool will even create a temporary OData V4 service for any existing table, view or Calculation View and launch a test Fiori Ui locally.\n![Fioir Example](images/ex1.png)\n\n## Project Structure and Documentation\n\n### Utils Documentation\n\nFor developers looking to understand or extend the internal utilities used by this CLI tool, comprehensive documentation is available in the [utils/README.md](utils/README.md) file. This documentation covers:\n\n- **Core Utilities**: base module, connection management, database inspection, SQL injection protection\n- **CLI Integration**: BTP, Cloud Foundry, and XSA CLI integration utilities\n- **Database Abstraction**: Multi-database support (HANA, PostgreSQL, SQLite) with factory pattern\n- **Usage Examples**: Practical examples for using the utility modules\n\nThe utils folder contains reusable modules that provide the foundation for all CLI commands, including database connectivity, terminal UI components, security utilities, and internationalization support.\n\n### HTTP Routes Documentation\n\nThe hana-cli tool includes a built-in web server that exposes all CLI functionality through RESTful HTTP endpoints. Detailed documentation for all HTTP routes is available in the [routes/README.md](routes/README.md) file. This documentation covers:\n\n- **Base Configuration Endpoints**: GET/PUT operations for managing CLI prompts and settings\n- **HANA Database Endpoints**: Complete API for listing and inspecting HANA database objects (tables, views, schemas, containers, etc.)\n- **Documentation Endpoints**: Access to README and CHANGELOG as HTML\n- **WebSocket Support**: Real-time communication for long-running operations\n- **Static Resources**: UI5 application and DFA integration\n\nThe web server is automatically started when using certain CLI commands with the `-w` or `--web` flag, making all hana-cli functionality accessible via HTTP requests at `http://localhost:3010` (configurable port).\n\n### Swagger/OpenAPI Documentation\n\nThe hana-cli web server now includes comprehensive Swagger/OpenAPI 3.0 documentation for all REST API endpoints. This provides an interactive interface for exploring and testing all HTTP APIs, making it easier to integrate hana-cli functionality into your own applications.\n\n**Key Features:**\n\n- **Interactive API Documentation**: Browse all 27+ documented endpoints with full request/response schemas\n- **Try-It-Out Functionality**: Test any API endpoint directly from the browser\n- **Auto-Generated Specification**: Documentation automatically generated from JSDoc comments in route files\n- **OpenAPI 3.0 Standard**: Industry-standard specification for maximum compatibility\n- **Organized Categories**: Endpoints grouped into 10 logical categories (Configuration, HANA System, HANA Objects, HDI, Cloud Services, etc.)\n- **Export Support**: Download the raw OpenAPI JSON specification for client SDK generation\n\n**Accessing Swagger UI:**\n\n```shell\n# Start the UI server\nhana-cli ui\n\n# Open browser to Swagger UI\nhttp://localhost:3010/api-docs\n\n# Get raw OpenAPI JSON specification\nhttp://localhost:3010/api-docs.json\n```\n\nFor complete implementation details, usage examples, and customization options, see the [SWAGGER_IMPLEMENTATION.md](SWAGGER_IMPLEMENTATION.md) documentation.\n\n### Web Applications (Fiori Launchpad UI)\n\nThe hana-cli tool includes a complete browser-based interface built with SAP UI5 and the Fiori Launchpad, providing a graphical alternative to the command-line interface. This web interface offers an intuitive, tile-based navigation system for all database operations.\n\n```mermaid\ngraph TB\n    CLI[\"hana-cli\u003cbr/\u003eCommand Line\u003cbr/\u003eInterface\"]\n    \n    CLI --\u003e|--web flag| Server[\"Web Server\u003cbr/\u003ePort 3010\"]\n    \n    Server --\u003e UI[\"Fiori Launchpad UI\u003cbr/\u003eSAP UI5 Application\"]\n    \n    UI --\u003e DB[\"Database\u003cbr/\u003eOperations\"]\n    UI --\u003e Cloud[\"Cloud Services\u003cbr/\u003eBTP/CF Integration\"]\n    UI --\u003e Admin[\"Admin\u003cbr/\u003eFunctions\"]\n    \n    DB --\u003e T[\"Tables,\u003cbr/\u003eViews,\u003cbr/\u003eSchemas\"]\n    DB --\u003e I[\"Indexes,\u003cbr/\u003eFunctions,\u003cbr/\u003eProcedures\"]\n    \n    Cloud --\u003e HDI[\"HDI\u003cbr/\u003eContainers\"]\n    Cloud --\u003e SBSS[\"SBSS\u003cbr/\u003eServices\"]\n    Cloud --\u003e Store[\"SecureStore\u003cbr/\u003e\u0026 Schema\"]\n    \n    Admin --\u003e Conv[\"Mass\u003cbr/\u003eConversion\"]\n    Admin --\u003e Monitor[\"System\u003cbr/\u003eMonitoring\"]\n    Admin --\u003e API[\"REST API\"]\n    \n    API --\u003e Swagger[\"Swagger/OpenAPI\u003cbr/\u003eDocumentation\u003cbr/\u003e27+ Endpoints\"]\n    \n    style CLI fill:#0070C0,color:#fff\n    style Server fill:#FF6B6B,color:#fff\n    style UI fill:#FFD93D,color:#000\n    style Swagger fill:#51CF66,color:#000\n```\n\n**Key Features:**\n\n- **Fiori Launchpad Interface**: Modern, responsive UI with organized tile groups\n- **Multiple UI5 Applications**: Specialized apps for listing, inspecting, and managing database objects\n- **Real-Time Operations**: WebSocket-based communication for live updates and long-running tasks\n- **Mass Conversion Tool**: Bulk convert tables to CDS, HDBTable, or HDBMigrationTable formats\n- **System Information Dashboard**: View connection details, version info, and system status\n- **Database Object Browser**: Interactive exploration of tables, views, schemas, functions, indexes, and more\n- **Cloud Foundry Integration**: Manage HDI, SBSS, Schema, and SecureStore service instances\n- **Theme Support**: Automatic light/dark mode detection and customization\n- **Integrated Help**: SAP Digital Foundation Adapter (DFA) with contextual assistance\n\n**Quick Start:**\n\n```shell\nhana-cli tables -w    # Launch web interface with tables view\nhana-cli serve        # Start the web server standalone\n```\n\nThe web UI runs on `http://localhost:3010` by default and provides access to all CLI functionality through an easy-to-use graphical interface. For complete documentation of all web applications, UI5 components, configuration, and development guides, see the [app/README.md](app/README.md) file.\n\n### MCP (Model Context Protocol) Integration\n\nThe hana-cli tool includes a Model Context Protocol (MCP) server, enabling AI assistants like Claude to interact with SAP HANA databases through natural language. The server uses a progressive discovery model — starting with ~22 focused tools and expanding on demand to all 186 commands.\n\n```mermaid\ngraph LR\n    AI[\"🤖 AI Assistant\u003cbr/\u003eClaude, etc.\"]\n\n    AI --\u003e|Natural Language\u003cbr/\u003eQuery| MCP[\"MCP Server\u003cbr/\u003e~22 Default Tools\"]\n\n    MCP --\u003e|Router or\u003cbr/\u003eDirect Call| Tools[\"186 hana-cli\u003cbr/\u003eCommands\"]\n\n    Tools --\u003e DB[\"SAP HANA\u003cbr/\u003eDatabase\"]\n    Tools --\u003e Cloud[\"BTP/Cloud\u003cbr/\u003eServices\"]\n    Tools --\u003e HDI[\"HDI\u003cbr/\u003eContainers\"]\n\n    DB --\u003e|Data \u0026 Results| Tools\n    Cloud --\u003e|Service Info| Tools\n    HDI --\u003e|Container Status| Tools\n\n    Tools --\u003e|Formatted\u003cbr/\u003eResponse| MCP\n    MCP --\u003e|Natural Language\u003cbr/\u003eResult| AI\n\n    style AI fill:#9D55F0,color:#fff\n    style MCP fill:#0070C0,color:#fff\n    style Tools fill:#FF6B6B,color:#fff\n    style DB fill:#51CF66,color:#fff\n```\n\n**Key Features:**\n\n- Progressive tool discovery — tier-1 tools always available, others via router or dynamic promotion\n- Router tool (`hana_execute`) dispatches any of 183+ commands by name\n- AI-guided command recommendations and smart search\n- Seamless integration with Claude Desktop, VS Code, Cursor, and other MCP clients\n- `--full` mode available for environments where tool count is not a concern\n\nFor detailed setup instructions, configuration options, and usage examples, please refer to:\n\n- [docs/03-features/mcp-integration.md](docs/03-features/mcp-integration.md) - Complete MCP overview and setup guide\n- [mcp-server/README.md](mcp-server/README.md) - Server installation and configuration\n\n## Standard Parameters and Conventions\n\nThe hana-cli tool follows consistent parameter naming, aliasing, and default value conventions across all commands to provide a predictable and intuitive user experience.\n\n### Command Categories Overview\n\n```mermaid\ngraph TB\n    A[\"200+ hana-cli\u003cbr/\u003eCommands\"] --\u003e B{Command\u003cbr/\u003eCategory}\n    \n    B --\u003e C[\"Connection\u003cbr/\u003eCommands\"]\n    B --\u003e D[\"Data\u003cbr/\u003eManipulation\"]\n    B --\u003e E[\"Database\u003cbr/\u003eInspection\"]\n    B --\u003e F[\"Performance\u003cbr/\u003eAnalysis\"]\n    B --\u003e G[\"Cloud\u003cbr/\u003eIntegration\"]\n    B --\u003e H[\"HDI\u003cbr/\u003eManagement\"]\n    \n    C --\u003e C1[\"connect\u003cbr/\u003ecopy2DefaultEnv\u003cbr/\u003ecopy2Env\"]\n    \n    D --\u003e D1[\"export\u003cbr/\u003eimport\u003cbr/\u003edataSync\u003cbr/\u003etableCopy\"]\n    \n    E --\u003e E1[\"tables\u003cbr/\u003eviews\u003cbr/\u003eprocedures\u003cbr/\u003eschemas\u003cbr/\u003eindexes\"]\n    \n    F --\u003e F1[\"tableHotspots\u003cbr/\u003equeryPlan\u003cbr/\u003ealerts\u003cbr/\u003ehealthCheck\"]\n    \n    G --\u003e G1[\"btp\u003cbr/\u003ebtpInfo\u003cbr/\u003eactivateHDI\"]\n    \n    H --\u003e H1[\"containers\u003cbr/\u003ecreateContainer\u003cbr/\u003edropContainer\"]\n    \n    style A fill:#0070C0,color:#fff\n    style B fill:#FF6B6B,color:#fff\n    style C fill:#51CF66,color:#fff\n    style D fill:#9D55F0,color:#fff\n    style E fill:#FFD93D,color:#000\n    style F fill:#F39C12,color:#fff\n    style G fill:#1ABC9C,color:#fff\n    style H fill:#E74C3C,color:#fff\n```\n\n### Global Standard Parameters\n\nAll commands support the following standard connection and debugging parameters:\n\n| Parameter | Alias | Type | Default | Description |\n| --------- | ----- | ---- | ------- | ----------- |\n| `--admin` | `-a` | boolean | false | Connect via admin credentials (uses default-env-admin.json) |\n| `--conn` | — | string | — | Connection filename to override default-env.json |\n| `--disableVerbose` | `--quiet` | boolean | false | Disable verbose output for scripting |\n| `--debug` | `-d` | boolean | false | Enable debug output for troubleshooting |\n\n### Common Command Parameters\n\nCommands are organized into categories, each with their own standardized parameters:\n\n#### Data Manipulation Commands\n\nCommands like `export`, `import`, `compareData`, `tableCopy`, `dataSync`, etc.\n\n| Parameter | Alias | Type | Default | Description |\n| ----------- | ------- | ------ | --------- | ------------- |\n| `--schema` | `-s` | string | `**CURRENT_SCHEMA**` | Target schema name |\n| `--sourceSchema` | `-ss` | string | `**CURRENT_SCHEMA**` | Source schema for operations |\n| `--targetSchema` | `-ts` | string | `**CURRENT_SCHEMA**` | Target schema for operations |\n| `--table` / `--sourceTable` | `-t` / `-st` | string | — | Table name(s) |\n| `--output` | `-o` | string | — | Output file path |\n| `--format` | `-f` | string | see note | Output format (csv, json, excel, summary, etc.) |\n| `--limit` | `-l` | number | 1000 | Maximum result set size |\n| `--batchSize` | `-b`, `--batch` | number | 1000 | Batch size for processing |\n| `--timeout` | `-to` | number | 3600 | Operation timeout in seconds (1 hour) |\n| `--dryRun` | `-dr`, `--preview` | boolean | false | Preview operation without committing changes |\n| `--profile` | `-p` | string | — | Database profile (hana, postgresql, sqlite, etc.) |\n\n#### Batch Operations\n\nCommands like `massGrant`, `massUpdate`, `massDelete`, `massExport`, etc.\n\n| Parameter | Alias | Type | Default | Description |\n| ----------- | ------- | ------ | --------- | ------------- |\n| `--schema` | `-s` | string | — | Schema containing objects |\n| `--object` | `-o` | string | — | Object name pattern |\n| `--limit` | `-l` | number | 1000 | Maximum objects to process |\n| `--dryRun` | `-dr`, `--preview` | boolean | false | Preview without executing |\n| `--log` | — | boolean | false | Enable operation logging |\n\n#### List/Inspect Commands\n\nCommands like `tables`, `schemas`, `users`, `procedures`, `functions`, etc.\n\n| Parameter | Alias | Type | Default | Description |\n| --------- | ----- | ---- | ------- | ----------- |\n| `--schema` | `-s` | string | `**CURRENT_SCHEMA**` | Filter by schema |\n| `--limit` | `-l` | number | 200 | Maximum results to return |\n| `--profile` | `-p` | string | — | Database profile selector |\n\n### Naming Conventions\n\nThe tool follows these conventions for parameter naming:\n\n1. **Single Operations**: Use singular names (e.g., `schema`, `table`, `user`)\n2. **Source/Target Operations**: Use paired names (e.g., `sourceSchema`/`targetSchema`, `sourceTable`/`targetTable`)\n3. **Boolean Flags**: Use descriptive names (e.g., `dryRun`, `includeHeaders`, `withGrantOption`)\n4. **Aggregation Parameters**: Use plural or descriptive names (e.g., `columns`, `indexes`, `keyColumns`)\n\n### Alias Conventions\n\nAliases follow these consistent patterns:\n\n1. **Single-letter alias**: First letter of the parameter (e.g., `-s` for schema, `-t` for table)\n2. **Extended alias**: Meaningful abbreviation (e.g., `-dr` for dryRun, `-batch` for batchSize)\n3. **No self-referential aliases**: Parameter name itself is not used as an alias (e.g., `--schema` has alias `-s` only)\n4. **Maximum aliases**: Parameters typically have at most 2 aliases to avoid confusion\n\n### Default Values\n\nDefault values are standardized to ensure consistent behavior:\n\n| Parameter | Standard Default | Note |\n| ----------- | --------------- | ------ |\n| `schema` | `**CURRENT_SCHEMA**` | Uses the connection's current schema |\n| `limit` | 200 (lists) / 1000 (data) | Configurable per command based on context |\n| `batchSize` | 1000 | Applies to all data manipulation operations |\n| `timeout` | 3600 | 1 hour standard timeout for long-running operations |\n| `dryRun` | false | Changes are committed by default; use `--dryRun` to preview |\n| `format` | \"csv\" (export) / \"json\" (reports) | Varies by command type |\n| `compress` | true | Data backups are compressed by default |\n\n### Usage Examples\n\n#### Using Standard Parameters\n\n```mermaid\ngraph LR\n    A[\"hana-cli\u003cbr/\u003eCommand\"]\n    \n    A --\u003e B{Choose\u003cbr/\u003eOperation}\n    \n    B --\u003e C[\"List Operation\u003cbr/\u003etables, views, etc.\"]\n    C --\u003e C1[\"--schema\u003cbr/\u003e-s\"]\n    C --\u003e C2[\"--limit\u003cbr/\u003e-l\"]\n    C --\u003e C3[\"--profile\u003cbr/\u003e-p\"]\n    C1 --\u003e C4[\"Filter by schema\"]\n    C2 --\u003e C5[\"Limit results\"]\n    C3 --\u003e C6[\"Select DB profile\"]\n    \n    B --\u003e D[\"Data Operation\u003cbr/\u003eexport, import, etc.\"]\n    D --\u003e D1[\"--sourceTable/-st\u003cbr/\u003e--targetTable/-tt\"]\n    D --\u003e D2[\"--format\u003cbr/\u003e-f\"]\n    D --\u003e D3[\"--dryRun/-dr\u003cbr/\u003e--preview\"]\n    D1 --\u003e D4[\"Source/Target\"]\n    D2 --\u003e D5[\"Output format\"]\n    D3 --\u003e D6[\"Dry run preview\"]\n    \n    B --\u003e E[\"Batch Operation\u003cbr/\u003emassGrant, etc.\"]\n    E --\u003e E1[\"--schema/-s\"]\n    E --\u003e E2[\"--dryRun/-dr\"]\n    E --\u003e E3[\"--log\"]\n    E1 --\u003e E4[\"Target schema\"]\n    E2 --\u003e E5[\"Safe execution\"]\n    E3 --\u003e E6[\"Operation log\"]\n    \n    style A fill:#0070C0,color:#fff\n    style B fill:#FF6B6B,color:#fff\n    style C fill:#51CF66,color:#fff\n    style D fill:#9D55F0,color:#fff\n    style E fill:#FFD93D,color:#000\n```\n\n```bash\n# List all tables in current schema with preview of first 100\nhana-cli tables -s myschema -l 100\n\n# Export data with dry-run preview\nhana-cli export -t CUSTOMERS -s SALES -f csv -dr\n\n# Copy table structure without data (dry-run)\nhana-cli tableCopy --sourceTable ORDERS --targetTable ORDERS_ARCHIVE --structureOnly --dryRun\n\n# Compare schemas between databases with 2-hour timeout\nhana-cli compareSchema --sourceSchema PROD --targetSchema TEST -to 7200\n\n# Batch grant permissions (preview first)\nhana-cli massGrant -s MYSCHEMA -o MYTABLE -g DEVELOPER_USER -p SELECT -dr\n```\n\n#### Common Parameter Combinations\n\n```bash\n# Preview and log operations\nhana-cli massUpdate -s SCHEMA -o TABLE -c \"STATUS='ACTIVE'\" --dryRun --log\n\n# Limit results and increase timeout for large datasets\nhana-cli dataValidator -t BIGDATA -l 1000000 -to 7200\n\n# Specify output format and location\nhana-cli export -t CUSTOMERS -f json -o ./exports/customers.json\n```\n\n### Current Schema Defaults (`**CURRENT_SCHEMA**`)\n\nThe vast majority of schema-aware commands now use `**CURRENT_SCHEMA**` as the default value for schema parameters. This special placeholder allows you to work with your current database context without explicitly specifying the schema name each time.\n\n#### Supported Commands with Current Schema Default\n\nThe following command categories fully support the `**CURRENT_SCHEMA**` placeholder:\n\n**Listing Commands** (30+ commands):\n\n- All schema navigation: `tables`, `views`, `indexes`, `functions`, `procedures`, `triggers`, `sequences`, `synonyms`, `libraries`, `roles`, `objects`\n- Specialized lists: `partitions`, `columnStats`, `spatialData`, `ftIndexes`, `graphWorkspaces`, `tableHotspots`, `tableGroups`, `calcViewAnalyzer`\n\n**Data Manipulation Commands** (10+ commands):\n\n- `export`, `import`, `dataProfile`, `dataDiff`, `compareData`, `compareSchema`, `tableCopy`, `dataSync`\n\n**Analysis Commands** (10+ commands):\n\n- `dataValidator`, `duplicateDetection`, `erdDiagram`, `dataLineage`, `referentialCheck`, and more\n\n#### Current Schema Examples\n\n```bash\n# Without explicit schema - uses CURRENT_SCHEMA\nhana-cli tables                          # List tables in current schema\nhana-cli procedures                      # List procedures in current schema\nhana-cli export -t CUSTOMERS             # Export from current schema\n\n# With explicit schema override\nhana-cli tables -s PRODUCTION            # List tables in PRODUCTION schema\nhana-cli procedures -s OTHER_SCHEMA      # List procedures in OTHER_SCHEMA\nhana-cli export -t CUSTOMERS -s SALES    # Export from SALES schema\n```\n\nFor a complete list of all commands with `**CURRENT_SCHEMA**` support, see the [CONSISTENCY_REVIEW_COMPLETE.md](CONSISTENCY_REVIEW_COMPLETE.md) document.\n\n### Multi-Profile Database Support\n\nAll database-connected commands now support the `--profile` parameter (alias `-p`), enabling you to work with different database configurations without switching connections or redefining credentials.\n\n#### Supported Commands with Profile Parameter\n\nThe `--profile` parameter is available in:\n\n- All data operations: `export`, `import`, `dataProfile`, `dataDiff`, `dataSync`, `duplicateDetection`, `referentialCheck`, `tableCopy`\n- List operations: `tables`, `views`, `indexes`, `functions`, `procedures`, `triggers`, `sequences`, `libraries`, `roles`, `objects`, `partitions`, `columnStats`, `spatialData`, `ftIndexes`, `graphWorkspaces`, `tableHotspots`, `tableGroups`, `calcViewAnalyzer`\n- Analysis tools: `compareData`, `compareSchema`, `dataValidator`, `dataLineage`, `erdDiagram`, and more\n\n#### Profile Parameter Examples\n\n```bash\n# Specify database profile\nhana-cli tables --profile production     # Connect using 'production' profile\nhana-cli export -t CUSTOMERS -p staging  # Export from staging environment\nhana-cli dataValidator -t TABLE -p dev   # Validate data in development\n\n# Works with other parameters\nhana-cli tables -s MYSCHEMA -p prod      # List tables in schema using prod profile\nhana-cli compareSchema -ss SRC -ts TGT -p target  # Schema comparison using target profile\n```\n\nFor more details on database profile configuration, see the [utils/README.md](utils/README.md) documentation.\n\n### Quality Assurance Notes\n\nThe consistency of these parameters has been standardized across all 200+ commands in the tool. This standardization ensures:\n\n- **Predictability**: Users can rely on consistent parameter behavior across commands\n- **Discoverability**: Common parameters work the same way in different contexts\n- **Scripting**: Automation scripts are more maintainable with consistent patterns\n- **Error Reduction**: Familiar patterns reduce mistakes and learning curve\n- **Multi-Environment Support**: Profile parameter enables seamless switching between database instances\n\nFor detailed analysis of all command consistency improvements deployed in February 2026, including the 30 commands and 50+ parameters updated, see:\n\n- [CONSISTENCY_REVIEW_COMPLETE.md](CONSISTENCY_REVIEW_COMPLETE.md) - Complete review report\n- [COMMAND_CONSISTENCY_FIXES.md](COMMAND_CONSISTENCY_FIXES.md) - Implementation details\n- [COMMAND_CONSISTENCY_ANALYSIS.md](COMMAND_CONSISTENCY_ANALYSIS.md) - Detailed audit findings\n\nFor detailed information about specific commands, use the built-in help:\n\n```bash\nhana-cli help \u003ccommand\u003e\nhana-cli \u003ccommand\u003e --help\n```\n\n## Commands\n\n**📊 Visual Command Reference Guide**: For command structure diagrams, parameter relationships, and quick examples for all commands, see the **[Command Structure Reference Guide](COMMAND_REFERENCE.md)**. This separate document provides visual flowcharts and detailed usage patterns for:\n\n- Connection \u0026 setup commands\n- Data operations (export, import, sync)\n- Database inspection \u0026 analysis\n- HDI container management\n- Backup \u0026 recovery operations\n- Performance analysis tools\n- Mass operations\n- Cloud integration\n\nEach command diagram shows the command syntax, available parameters, and typical usage patterns.\n\n### Unit Testing\n\nThis project includes comprehensive unit tests to ensure code quality and reliability. The test suite covers core functionality, command execution, and database operations.\n\nFor detailed information about running tests, writing new tests, and understanding the test structure, please refer to the [Unit Testing Documentation](./tests/README_UNIT_TESTS.md).\n\n### Running Tests\n\nQuick start for running tests:\n\n```shell\n# Run all tests\nnpm test\n\n# Run specific test suites\nnpm run test:cli      # CLI tests only\nnpm run test:utils    # Utils tests only\nnpm run test:routes   # Routes tests only\n```\n\n### Code Coverage\n\nThe project uses [nyc (Istanbul)](https://github.com/istanbuljs/nyc) for code coverage reporting. To generate code coverage reports:\n\n```shell\n# Run all tests with coverage\nnpm run coverage\n\n# Run specific test suites with coverage\nnpm run coverage:cli      # CLI tests with coverage\nnpm run coverage:utils    # Utils tests with coverage\nnpm run coverage:routes   # Routes tests with coverage\n\n# Generate detailed HTML coverage report\nnpm run coverage:report\n\n# Check if coverage meets thresholds (80%)\nnpm run coverage:check\n```\n\nAfter running coverage tests, open `./coverage/index.html` in your browser to view the detailed interactive coverage report.\n\nThe project aims for 80% code coverage across:\n\n- Lines\n- Statements\n- Functions\n- Branches\n\nFor more information about code coverage configuration and interpretation, see the [Coverage section in the Unit Testing Documentation](./tests/README_UNIT_TESTS.md#code-coverage).\n\n## Cross-Platform Support\n\nThe HANA CLI tool is designed to work seamlessly across Windows, Linux, and macOS platforms. This section describes the cross-platform features and testing strategies employed to ensure consistent behavior.\n\n### Platform Compatibility\n\nThe tool has been tested and validated on:\n\n- **Windows**: Windows 10 and later\n- **Linux**: Ubuntu, Debian, RHEL, and other major distributions\n- **macOS**: macOS 10.15 (Catalina) and later\n\n### Cross-Platform Features\n\n#### Path Handling\n\nThe tool automatically handles platform-specific path differences:\n\n- Uses Node.js `path` module for all path operations\n- Automatically detects and uses correct path separators (`/` on Unix, `\\` on Windows)\n- Normalizes paths for consistent behavior across platforms\n- Supports both absolute and relative paths on all platforms\n\n#### Environment Variables\n\nPlatform-specific environment variables are handled correctly:\n\n- **Windows**: Uses `APPDATA` for configuration files\n- **macOS**: Uses `HOME/Library/Preferences` with fallback to `HOME/Library/Application Support`\n- **Linux**: Uses `HOME/.config` for configuration files\n\n#### Line Endings\n\nThe project uses `.gitattributes` to ensure consistent line endings:\n\n- Text files (`.js`, `.json`, `.md`, etc.) use LF (`\\n`) in the repository\n- Windows scripts (`.cmd`, `.bat`, `.ps1`) use CRLF (`\\r\\n`)\n- Binary files are handled appropriately\n\n### Cross-Platform Testing\n\nThe project includes comprehensive cross-platform testing:\n\n```shell\n# Run cross-platform specific tests\nnpm run test:platform\n\n# Run tests tagged for Windows\nnpm run test:windows\n\n# Run tests tagged for Unix systems (Linux/macOS)\nnpm run test:unix\n```\n\n#### Continuous Integration\n\nGitHub Actions CI runs the full test suite on all three platforms:\n\n- **Ubuntu Latest**: Tests Linux compatibility\n- **Windows Latest**: Tests Windows compatibility\n- **macOS Latest**: Tests macOS compatibility\n- **Node.js versions**: 20.x, 22.x, and 24.x on each platform\n\nThe CI workflow validates:\n\n- Package installation on each platform\n- All unit tests pass on each platform\n- Cross-platform specific tests\n- Platform-specific path handling\n- CLI command execution\n\n#### Mock Filesystem Testing\n\nTests use `mock-fs` to simulate different filesystem structures:\n\n- Tests can simulate Windows, macOS, and Linux filesystems\n- Validates path handling without requiring multiple OS environments\n- Tests platform-specific configuration file locations\n- Ensures consistent behavior across platforms\n\n### Development Recommendations\n\nWhen contributing to this project, follow these cross-platform best practices:\n\n1. **Always use `path.join()` or `path.resolve()`** instead of string concatenation for paths\n2. **Use `os.EOL`** for platform-appropriate line endings in generated content\n3. **Test environment variable fallbacks** for Windows (`APPDATA`, `USERPROFILE`) and Unix (`HOME`)\n4. **Tag platform-specific tests** with `@windows` or `@unix` as appropriate\n5. **Use `cross-env`** in npm scripts for environment variable consistency\n6. **Avoid hard-coded path separators** (`/` or `\\`) in code\n\nFor more details on cross-platform testing, see the [Cross-Platform Testing section in the Unit Testing Documentation](./tests/README_UNIT_TESTS.md#cross-platform-testing).\n\n## How to obtain support\n\nThis project is provided \"as-is\": there is no guarantee that raised issues will be answered or addressed in future releases.\n\n## License\n\nCopyright (c) 2026 SAP SE or an SAP affiliate company. All rights reserved.\nThis project is licensed under the Apache Software License, v. 2 except as noted otherwise in the [LICENSE](LICENSES/Apache-2.0.txt) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsap-samples%2Fhana-developer-cli-tool-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsap-samples%2Fhana-developer-cli-tool-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsap-samples%2Fhana-developer-cli-tool-example/lists"}