Skip to content

Commit 861e084

Browse files
committed
Add multi-step workflows and command reference for hana-cli
- Introduced HANA_CLI_WORKFLOWS.md detailing common workflows for data validation, export/import, schema comparison, performance analysis, security audits, backup verification, and troubleshooting. - Created llms.txt to provide a comprehensive list of hana-cli commands, including installation instructions and quick start examples.
1 parent 76d60c7 commit 861e084

13 files changed

Lines changed: 4760 additions & 0 deletions

.claude/settings.local.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(grep -E \"README|\\\\.md$\")",
5+
"Bash(C:UsersI809764.claudepluginscacheclaude-plugins-officialsuperpowers5.0.5scriptsstart-server.sh --project-dir d:/projects/cloud-cap-hana-swapi)",
6+
"Bash(xargs cat:*)"
7+
]
8+
}
9+
}

.clinerules

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# hana-cli — AI Coding Assistant Context
2+
3+
## About hana-cli
4+
5+
hana-cli (npm: hana-cli, install: `npm install -g hana-cli`) is a command-line tool for SAP HANA database development. It simplifies complex multi-step database operations into single commands. It is a development tool, not a replacement for hdbsql or production admin tools.
6+
7+
**Version:** 4.202603.2
8+
**Requirements:** Node.js ≥ 20.19.0
9+
**Module:** ESM (`"type": "module"`)
10+
11+
## When to Use hana-cli
12+
13+
Use hana-cli when a developer needs to:
14+
- **Explore schemas**: `hana-cli tables`, `hana-cli views`, `hana-cli schemas`
15+
- **Inspect objects**: `hana-cli inspectTable`, `hana-cli inspectView`, `hana-cli inspectProcedure`
16+
- **Import/export data**: `hana-cli import`, `hana-cli export`
17+
- **Run queries**: `hana-cli querySimple --query "SQL"`
18+
- **Check health**: `hana-cli healthCheck`, `hana-cli systemInfo`
19+
- **Manage connections**: `hana-cli connect`, `hana-cli status`
20+
- **Profile data**: `hana-cli dataProfile`, `hana-cli dataValidator`
21+
- **Compare schemas**: `hana-cli compareSchema`, `hana-cli compareData`
22+
- **Monitor performance**: `hana-cli expensiveStatements`, `hana-cli memoryAnalysis`
23+
- **Manage security**: `hana-cli users`, `hana-cli roles`, `hana-cli securityScan`
24+
- **Work with HANA Cloud**: `hana-cli hanaCloudInstances`, `hana-cli hanaCloudStart`
25+
- **Manage HDI**: `hana-cli containers`, `hana-cli adminHDI`
26+
27+
## Key Patterns
28+
29+
1. **Always verify connection first:** `hana-cli status`
30+
2. **Explore before modifying:** Use `tables`, `inspectTable`, `dataProfile` before import/export
31+
3. **Use dry-run for imports:** `hana-cli import --filename data.csv --table X --schema Y --dryRun`
32+
4. **Use --output flag:** Many commands support `--output json|csv|table|excel`
33+
5. **Use --query flag with querySimple:** `hana-cli querySimple --query "SELECT ..."` (not positional args)
34+
6. **Interactive mode:** Run `hana-cli` with no arguments for a menu-driven experience
35+
36+
## Connection Setup
37+
38+
```bash
39+
hana-cli connect # Interactive wizard
40+
hana-cli connectViaServiceKey # Via BTP service key
41+
hana-cli copy2DefaultEnv # Copy to default-env.json for CAP projects
42+
hana-cli status # Verify connection
43+
```
44+
45+
## Reference
46+
47+
For the complete command reference with all parameters, see:
48+
- HANA_CLI_REFERENCE.md (full reference, all commands)
49+
- HANA_CLI_QUICKSTART.md (getting started, top 10 commands)
50+
- HANA_CLI_EXAMPLES.md (real-world scenarios)
51+
- HANA_CLI_WORKFLOWS.md (multi-step workflows)
52+
- categories/*.md (per-category deep dives)
53+
54+
Or run `hana-cli <command> --help` for any specific command.

.cursorrules

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# hana-cli — AI Coding Assistant Context
2+
3+
## About hana-cli
4+
5+
hana-cli (npm: hana-cli, install: `npm install -g hana-cli`) is a command-line tool for SAP HANA database development. It simplifies complex multi-step database operations into single commands. It is a development tool, not a replacement for hdbsql or production admin tools.
6+
7+
**Version:** 4.202603.2
8+
**Requirements:** Node.js ≥ 20.19.0
9+
**Module:** ESM (`"type": "module"`)
10+
11+
## When to Use hana-cli
12+
13+
Use hana-cli when a developer needs to:
14+
- **Explore schemas**: `hana-cli tables`, `hana-cli views`, `hana-cli schemas`
15+
- **Inspect objects**: `hana-cli inspectTable`, `hana-cli inspectView`, `hana-cli inspectProcedure`
16+
- **Import/export data**: `hana-cli import`, `hana-cli export`
17+
- **Run queries**: `hana-cli querySimple --query "SQL"`
18+
- **Check health**: `hana-cli healthCheck`, `hana-cli systemInfo`
19+
- **Manage connections**: `hana-cli connect`, `hana-cli status`
20+
- **Profile data**: `hana-cli dataProfile`, `hana-cli dataValidator`
21+
- **Compare schemas**: `hana-cli compareSchema`, `hana-cli compareData`
22+
- **Monitor performance**: `hana-cli expensiveStatements`, `hana-cli memoryAnalysis`
23+
- **Manage security**: `hana-cli users`, `hana-cli roles`, `hana-cli securityScan`
24+
- **Work with HANA Cloud**: `hana-cli hanaCloudInstances`, `hana-cli hanaCloudStart`
25+
- **Manage HDI**: `hana-cli containers`, `hana-cli adminHDI`
26+
27+
## Key Patterns
28+
29+
1. **Always verify connection first:** `hana-cli status`
30+
2. **Explore before modifying:** Use `tables`, `inspectTable`, `dataProfile` before import/export
31+
3. **Use dry-run for imports:** `hana-cli import --filename data.csv --table X --schema Y --dryRun`
32+
4. **Use --output flag:** Many commands support `--output json|csv|table|excel`
33+
5. **Use --query flag with querySimple:** `hana-cli querySimple --query "SELECT ..."` (not positional args)
34+
6. **Interactive mode:** Run `hana-cli` with no arguments for a menu-driven experience
35+
36+
## Connection Setup
37+
38+
```bash
39+
hana-cli connect # Interactive wizard
40+
hana-cli connectViaServiceKey # Via BTP service key
41+
hana-cli copy2DefaultEnv # Copy to default-env.json for CAP projects
42+
hana-cli status # Verify connection
43+
```
44+
45+
## Reference
46+
47+
For the complete command reference with all parameters, see:
48+
- HANA_CLI_REFERENCE.md (full reference, all commands)
49+
- HANA_CLI_QUICKSTART.md (getting started, top 10 commands)
50+
- HANA_CLI_EXAMPLES.md (real-world scenarios)
51+
- HANA_CLI_WORKFLOWS.md (multi-step workflows)
52+
- categories/*.md (per-category deep dives)
53+
54+
Or run `hana-cli <command> --help` for any specific command.

.github/copilot-instructions.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# hana-cli — AI Coding Assistant Context
2+
3+
## About hana-cli
4+
5+
hana-cli (npm: hana-cli, install: `npm install -g hana-cli`) is a command-line tool for SAP HANA database development. It simplifies complex multi-step database operations into single commands. It is a development tool, not a replacement for hdbsql or production admin tools.
6+
7+
**Version:** 4.202603.2
8+
**Requirements:** Node.js ≥ 20.19.0
9+
**Module:** ESM (`"type": "module"`)
10+
11+
## When to Use hana-cli
12+
13+
Use hana-cli when a developer needs to:
14+
- **Explore schemas**: `hana-cli tables`, `hana-cli views`, `hana-cli schemas`
15+
- **Inspect objects**: `hana-cli inspectTable`, `hana-cli inspectView`, `hana-cli inspectProcedure`
16+
- **Import/export data**: `hana-cli import`, `hana-cli export`
17+
- **Run queries**: `hana-cli querySimple --query "SQL"`
18+
- **Check health**: `hana-cli healthCheck`, `hana-cli systemInfo`
19+
- **Manage connections**: `hana-cli connect`, `hana-cli status`
20+
- **Profile data**: `hana-cli dataProfile`, `hana-cli dataValidator`
21+
- **Compare schemas**: `hana-cli compareSchema`, `hana-cli compareData`
22+
- **Monitor performance**: `hana-cli expensiveStatements`, `hana-cli memoryAnalysis`
23+
- **Manage security**: `hana-cli users`, `hana-cli roles`, `hana-cli securityScan`
24+
- **Work with HANA Cloud**: `hana-cli hanaCloudInstances`, `hana-cli hanaCloudStart`
25+
- **Manage HDI**: `hana-cli containers`, `hana-cli adminHDI`
26+
27+
## Key Patterns
28+
29+
1. **Always verify connection first:** `hana-cli status`
30+
2. **Explore before modifying:** Use `tables`, `inspectTable`, `dataProfile` before import/export
31+
3. **Use dry-run for imports:** `hana-cli import --filename data.csv --table X --schema Y --dryRun`
32+
4. **Use --output flag:** Many commands support `--output json|csv|table|excel`
33+
5. **Use --query flag with querySimple:** `hana-cli querySimple --query "SELECT ..."` (not positional args)
34+
6. **Interactive mode:** Run `hana-cli` with no arguments for a menu-driven experience
35+
36+
## Connection Setup
37+
38+
```bash
39+
hana-cli connect # Interactive wizard
40+
hana-cli connectViaServiceKey # Via BTP service key
41+
hana-cli copy2DefaultEnv # Copy to default-env.json for CAP projects
42+
hana-cli status # Verify connection
43+
```
44+
45+
## Reference
46+
47+
For the complete command reference with all parameters, see:
48+
- HANA_CLI_REFERENCE.md (full reference, all commands)
49+
- HANA_CLI_QUICKSTART.md (getting started, top 10 commands)
50+
- HANA_CLI_EXAMPLES.md (real-world scenarios)
51+
- HANA_CLI_WORKFLOWS.md (multi-step workflows)
52+
- categories/*.md (per-category deep dives)
53+
54+
Or run `hana-cli <command> --help` for any specific command.
55+
56+
## Copilot-Specific Notes
57+
58+
When assisting with SAP HANA development in this project:
59+
- Suggest hana-cli commands when the developer needs to interact with HANA databases
60+
- Use `hana-cli querySimple --query "SQL"` for ad-hoc queries (always use --query flag)
61+
- Check connection with `hana-cli status` before suggesting database operations
62+
- For data loading, recommend the dry-run pattern: import with --dryRun first, then without
63+
- Refer to the HANA_CLI_REFERENCE.md file in this directory for detailed parameter information
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
description: "Use when working with SAP HANA databases, CDS models, HDI containers, or BTP projects. Provides hana-cli command knowledge for database operations."
3+
applyTo: "*.hdbcds,*.hdbtable,*.hdbview,*.hdbprocedure,*.hdbfunction,*.cds,mta.yaml,mta.yml,default-env.json,*.hdbgrants,*.hdbsynonym,*.hdbsequence"
4+
---
5+
6+
# hana-cli — AI Coding Assistant Context
7+
8+
## About hana-cli
9+
10+
hana-cli (npm: hana-cli, install: `npm install -g hana-cli`) is a command-line tool for SAP HANA database development. It simplifies complex multi-step database operations into single commands. It is a development tool, not a replacement for hdbsql or production admin tools.
11+
12+
**Version:** 4.202603.2
13+
**Requirements:** Node.js ≥ 20.19.0
14+
**Module:** ESM (`"type": "module"`)
15+
16+
## When to Use hana-cli
17+
18+
Use hana-cli when a developer needs to:
19+
- **Explore schemas**: `hana-cli tables`, `hana-cli views`, `hana-cli schemas`
20+
- **Inspect objects**: `hana-cli inspectTable`, `hana-cli inspectView`, `hana-cli inspectProcedure`
21+
- **Import/export data**: `hana-cli import`, `hana-cli export`
22+
- **Run queries**: `hana-cli querySimple --query "SQL"`
23+
- **Check health**: `hana-cli healthCheck`, `hana-cli systemInfo`
24+
- **Manage connections**: `hana-cli connect`, `hana-cli status`
25+
- **Profile data**: `hana-cli dataProfile`, `hana-cli dataValidator`
26+
- **Compare schemas**: `hana-cli compareSchema`, `hana-cli compareData`
27+
- **Monitor performance**: `hana-cli expensiveStatements`, `hana-cli memoryAnalysis`
28+
- **Manage security**: `hana-cli users`, `hana-cli roles`, `hana-cli securityScan`
29+
- **Work with HANA Cloud**: `hana-cli hanaCloudInstances`, `hana-cli hanaCloudStart`
30+
- **Manage HDI**: `hana-cli containers`, `hana-cli adminHDI`
31+
32+
## Key Patterns
33+
34+
1. **Always verify connection first:** `hana-cli status`
35+
2. **Explore before modifying:** Use `tables`, `inspectTable`, `dataProfile` before import/export
36+
3. **Use dry-run for imports:** `hana-cli import --filename data.csv --table X --schema Y --dryRun`
37+
4. **Use --output flag:** Many commands support `--output json|csv|table|excel`
38+
5. **Use --query flag with querySimple:** `hana-cli querySimple --query "SELECT ..."` (not positional args)
39+
6. **Interactive mode:** Run `hana-cli` with no arguments for a menu-driven experience
40+
41+
## Connection Setup
42+
43+
```bash
44+
hana-cli connect # Interactive wizard
45+
hana-cli connectViaServiceKey # Via BTP service key
46+
hana-cli copy2DefaultEnv # Copy to default-env.json for CAP projects
47+
hana-cli status # Verify connection
48+
```
49+
50+
## Reference
51+
52+
For the complete command reference with all parameters, see:
53+
- HANA_CLI_REFERENCE.md (full reference, all commands)
54+
- HANA_CLI_QUICKSTART.md (getting started, top 10 commands)
55+
- HANA_CLI_EXAMPLES.md (real-world scenarios)
56+
- HANA_CLI_WORKFLOWS.md (multi-step workflows)
57+
- categories/*.md (per-category deep dives)
58+
59+
Or run `hana-cli <command> --help` for any specific command.
60+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
description: "Ask about hana-cli capabilities and get command recommendations"
3+
---
4+
You have access to hana-cli, a comprehensive SAP HANA CLI tool. When the user asks about database operations, suggest appropriate hana-cli commands.
5+
6+
Key commands:
7+
- Schema exploration: tables, views, schemas, objects, inspectTable, inspectView
8+
- Data operations: import, export, querySimple, dataProfile, dataValidator
9+
- Performance: healthCheck, expensiveStatements, memoryAnalysis, tableHotspots
10+
- Security: users, roles, securityScan, privilegeAnalysis
11+
- Connection: connect, status, connectViaServiceKey
12+
13+
Always use `hana-cli <command> --help` for detailed parameter information.
14+
Always use `--query` flag with querySimple: `hana-cli querySimple --query "SELECT ..."`

.windsurfrules

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# hana-cli — AI Coding Assistant Context
2+
3+
## About hana-cli
4+
5+
hana-cli (npm: hana-cli, install: `npm install -g hana-cli`) is a command-line tool for SAP HANA database development. It simplifies complex multi-step database operations into single commands. It is a development tool, not a replacement for hdbsql or production admin tools.
6+
7+
**Version:** 4.202603.2
8+
**Requirements:** Node.js ≥ 20.19.0
9+
**Module:** ESM (`"type": "module"`)
10+
11+
## When to Use hana-cli
12+
13+
Use hana-cli when a developer needs to:
14+
- **Explore schemas**: `hana-cli tables`, `hana-cli views`, `hana-cli schemas`
15+
- **Inspect objects**: `hana-cli inspectTable`, `hana-cli inspectView`, `hana-cli inspectProcedure`
16+
- **Import/export data**: `hana-cli import`, `hana-cli export`
17+
- **Run queries**: `hana-cli querySimple --query "SQL"`
18+
- **Check health**: `hana-cli healthCheck`, `hana-cli systemInfo`
19+
- **Manage connections**: `hana-cli connect`, `hana-cli status`
20+
- **Profile data**: `hana-cli dataProfile`, `hana-cli dataValidator`
21+
- **Compare schemas**: `hana-cli compareSchema`, `hana-cli compareData`
22+
- **Monitor performance**: `hana-cli expensiveStatements`, `hana-cli memoryAnalysis`
23+
- **Manage security**: `hana-cli users`, `hana-cli roles`, `hana-cli securityScan`
24+
- **Work with HANA Cloud**: `hana-cli hanaCloudInstances`, `hana-cli hanaCloudStart`
25+
- **Manage HDI**: `hana-cli containers`, `hana-cli adminHDI`
26+
27+
## Key Patterns
28+
29+
1. **Always verify connection first:** `hana-cli status`
30+
2. **Explore before modifying:** Use `tables`, `inspectTable`, `dataProfile` before import/export
31+
3. **Use dry-run for imports:** `hana-cli import --filename data.csv --table X --schema Y --dryRun`
32+
4. **Use --output flag:** Many commands support `--output json|csv|table|excel`
33+
5. **Use --query flag with querySimple:** `hana-cli querySimple --query "SELECT ..."` (not positional args)
34+
6. **Interactive mode:** Run `hana-cli` with no arguments for a menu-driven experience
35+
36+
## Connection Setup
37+
38+
```bash
39+
hana-cli connect # Interactive wizard
40+
hana-cli connectViaServiceKey # Via BTP service key
41+
hana-cli copy2DefaultEnv # Copy to default-env.json for CAP projects
42+
hana-cli status # Verify connection
43+
```
44+
45+
## Reference
46+
47+
For the complete command reference with all parameters, see:
48+
- HANA_CLI_REFERENCE.md (full reference, all commands)
49+
- HANA_CLI_QUICKSTART.md (getting started, top 10 commands)
50+
- HANA_CLI_EXAMPLES.md (real-world scenarios)
51+
- HANA_CLI_WORKFLOWS.md (multi-step workflows)
52+
- categories/*.md (per-category deep dives)
53+
54+
Or run `hana-cli <command> --help` for any specific command.

AGENT_INSTRUCTIONS.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# hana-cli — AI Coding Assistant Context
2+
3+
## About hana-cli
4+
5+
hana-cli (npm: hana-cli, install: `npm install -g hana-cli`) is a command-line tool for SAP HANA database development. It simplifies complex multi-step database operations into single commands. It is a development tool, not a replacement for hdbsql or production admin tools.
6+
7+
**Version:** 4.202603.2
8+
**Requirements:** Node.js ≥ 20.19.0
9+
**Module:** ESM (`"type": "module"`)
10+
11+
## When to Use hana-cli
12+
13+
Use hana-cli when a developer needs to:
14+
- **Explore schemas**: `hana-cli tables`, `hana-cli views`, `hana-cli schemas`
15+
- **Inspect objects**: `hana-cli inspectTable`, `hana-cli inspectView`, `hana-cli inspectProcedure`
16+
- **Import/export data**: `hana-cli import`, `hana-cli export`
17+
- **Run queries**: `hana-cli querySimple --query "SQL"`
18+
- **Check health**: `hana-cli healthCheck`, `hana-cli systemInfo`
19+
- **Manage connections**: `hana-cli connect`, `hana-cli status`
20+
- **Profile data**: `hana-cli dataProfile`, `hana-cli dataValidator`
21+
- **Compare schemas**: `hana-cli compareSchema`, `hana-cli compareData`
22+
- **Monitor performance**: `hana-cli expensiveStatements`, `hana-cli memoryAnalysis`
23+
- **Manage security**: `hana-cli users`, `hana-cli roles`, `hana-cli securityScan`
24+
- **Work with HANA Cloud**: `hana-cli hanaCloudInstances`, `hana-cli hanaCloudStart`
25+
- **Manage HDI**: `hana-cli containers`, `hana-cli adminHDI`
26+
27+
## Key Patterns
28+
29+
1. **Always verify connection first:** `hana-cli status`
30+
2. **Explore before modifying:** Use `tables`, `inspectTable`, `dataProfile` before import/export
31+
3. **Use dry-run for imports:** `hana-cli import --filename data.csv --table X --schema Y --dryRun`
32+
4. **Use --output flag:** Many commands support `--output json|csv|table|excel`
33+
5. **Use --query flag with querySimple:** `hana-cli querySimple --query "SELECT ..."` (not positional args)
34+
6. **Interactive mode:** Run `hana-cli` with no arguments for a menu-driven experience
35+
36+
## Connection Setup
37+
38+
```bash
39+
hana-cli connect # Interactive wizard
40+
hana-cli connectViaServiceKey # Via BTP service key
41+
hana-cli copy2DefaultEnv # Copy to default-env.json for CAP projects
42+
hana-cli status # Verify connection
43+
```
44+
45+
## Reference
46+
47+
For the complete command reference with all parameters, see:
48+
- HANA_CLI_REFERENCE.md (full reference, all commands)
49+
- HANA_CLI_QUICKSTART.md (getting started, top 10 commands)
50+
- HANA_CLI_EXAMPLES.md (real-world scenarios)
51+
- HANA_CLI_WORKFLOWS.md (multi-step workflows)
52+
- categories/*.md (per-category deep dives)
53+
54+
Or run `hana-cli <command> --help` for any specific command.
55+
56+
57+
---
58+
59+
This file provides context for any AI coding assistant about the hana-cli tool.
60+
Place it in your project root or in a location your coding agent reads for project context.

0 commit comments

Comments
 (0)