You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However 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.
14
14
15
+
### Supported Environments
16
+
17
+
```mermaid
18
+
graph TD
19
+
A["SAP HANA CLI Tool"] --> B{Development Environment}
20
+
B --> C["Local Development"]
21
+
B --> D["Cloud Development"]
22
+
23
+
C --> C1["VSCode"]
24
+
C --> C2["Local SAP HANA Express"]
25
+
C --> C3["Remote SAP HANA"]
26
+
27
+
D --> D1["SAP Business App Studio"]
28
+
D --> D2["Google Cloud Shell"]
29
+
D --> D3["AWS Cloud9"]
30
+
D --> D4["SAP BTP HANA Service"]
31
+
D --> D5["SAP HANA Cloud"]
32
+
33
+
style A fill:#0070C0
34
+
style B fill:#FF6B6B
35
+
style C fill:#51CF66
36
+
style D fill:#FFD93D
37
+
```
38
+
15
39
Running in Cloud Shells Video: [https://youtu.be/L7QyVLvAIIQ](https://youtu.be/L7QyVLvAIIQ)
16
40
17
41
## Requirements / Download and Installation
@@ -22,6 +46,28 @@ If you would rather just access the tool directly, it is now available in npm as
22
46
npm install -g hana-cli
23
47
```
24
48
49
+
### Installation Methods
50
+
51
+
```mermaid
52
+
graph LR
53
+
A["SAP HANA CLI Tool"] --> B{Installation Method}
54
+
55
+
B --> B1["NPM Package<br/>Quick Install"]
56
+
B1 --> B1a["npm install -g hana-cli"]
57
+
B1a --> B1b["✅ Ready to Use"]
58
+
59
+
B --> B2["Clone & Build<br/>From Source"]
60
+
B2 --> B2a["Clone Repository<br/>from GitHub"]
61
+
B2a --> B2b["Run npm install"]
62
+
B2b --> B2c["Run npm link"]
63
+
B2c --> B2d["✅ Ready to Use"]
64
+
65
+
style B1 fill:#0070C0,color:#fff
66
+
style B2 fill:#FF6B6B,color:#fff
67
+
style B1b fill:#51CF66,color:#fff
68
+
style B2d fill:#51CF66,color:#fff
69
+
```
70
+
25
71
Otherwise you can also run it from the sources as described here:
26
72
27
73
* Install Node.js version 14.x or 16.x on your development machine [https://nodejs.org/en/download/](https://nodejs.org/en/download/)
@@ -102,8 +148,54 @@ This will display your current BTP target information including global account,
102
148
103
149
This 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.
104
150
151
+
### Connection Configuration Resolution Order
152
+
105
153
The 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:
G -->|NO| H["Last Resort:<br/>Look for default.json<br/>in HOME/.hana-cli/"]
185
+
186
+
H --> I{Found?}
187
+
I -->|YES| Z6["Use default.json"]
188
+
I -->|NO| Z7["❌ No Connection<br/>Configuration Found"]
189
+
190
+
style Z1 fill:#51CF66
191
+
style Z2 fill:#51CF66
192
+
style Z3 fill:#51CF66
193
+
style Z4 fill:#51CF66
194
+
style Z5 fill:#51CF66
195
+
style Z6 fill:#51CF66
196
+
style Z7 fill:#FF6B6B
197
+
```
198
+
107
199
* First we look for the Admin option and use a default-env-admin.json - this overrides all other parameters
108
200
* 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
109
201
* 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
@@ -269,6 +361,37 @@ For complete implementation details, usage examples, and customization options,
269
361
270
362
The 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.
DB --> I["Indexes,<br/>Functions,<br/>Procedures"]
378
+
379
+
Cloud --> HDI["HDI<br/>Containers"]
380
+
Cloud --> SBSS["SBSS<br/>Services"]
381
+
Cloud --> Store["SecureStore<br/>& Schema"]
382
+
383
+
Admin --> Conv["Mass<br/>Conversion"]
384
+
Admin --> Monitor["System<br/>Monitoring"]
385
+
Admin --> API["REST API"]
386
+
387
+
API --> Swagger["Swagger/OpenAPI<br/>Documentation<br/>27+ Endpoints"]
388
+
389
+
style CLI fill:#0070C0,color:#fff
390
+
style Server fill:#FF6B6B,color:#fff
391
+
style UI fill:#FFD93D,color:#000
392
+
style Swagger fill:#51CF66,color:#000
393
+
```
394
+
272
395
**Key Features:**
273
396
274
397
***Fiori Launchpad Interface**: Modern, responsive UI with organized tile groups
@@ -294,6 +417,31 @@ The web UI runs on `http://localhost:3010` by default and provides access to all
294
417
295
418
The hana-cli tool now includes experimental support for the Model Context Protocol (MCP), enabling AI assistants like Claude to interact with SAP HANA databases through natural language. This integration exposes all 100+ hana-cli commands as tools that AI assistants can invoke directly.
296
419
420
+
```mermaid
421
+
graph LR
422
+
AI["🤖 AI Assistant<br/>Claude, etc."]
423
+
424
+
AI -->|Natural Language<br/>Query| MCP["MCP Server<br/>hana-cli Integration"]
425
+
426
+
MCP -->|Tool Invocation| Tools["100+ hana-cli<br/>Commands as Tools"]
427
+
428
+
Tools --> DB["SAP HANA<br/>Database"]
429
+
Tools --> Cloud["BTP/Cloud<br/>Services"]
430
+
Tools --> HDI["HDI<br/>Containers"]
431
+
432
+
DB -->|Data & Results| Tools
433
+
Cloud -->|Service Info| Tools
434
+
HDI -->|Container Status| Tools
435
+
436
+
Tools -->|Formatted<br/>Response| MCP
437
+
MCP -->|Natural Language<br/>Result| AI
438
+
439
+
style AI fill:#9D55F0,color:#fff
440
+
style MCP fill:#0070C0,color:#fff
441
+
style Tools fill:#FF6B6B,color:#fff
442
+
style DB fill:#51CF66,color:#fff
443
+
```
444
+
297
445
**Key Features:**
298
446
299
447
* Natural language database queries and operations
@@ -312,6 +460,41 @@ For detailed setup instructions, configuration options, and usage examples, plea
312
460
313
461
The hana-cli tool follows consistent parameter naming, aliasing, and default value conventions across all commands to provide a predictable and intuitive user experience.
0 commit comments