Assists with SAP HANA Developer CLI (hana-cli) for database development and administration. Use when: installing hana-cli, connecting to SAP HANA databases, inspecting database objects (tables, views, procedures, functions), managing HDI containers, executing SQL queries, converting metadata to CDS/EDMX/OpenAPI formats, managing SAP HANA Cloud instances, working with BTP CLI integration, or troubleshooting hana-cli commands. Covers: 91 commands, 17+ output formats, HDI container management, cloud operations.
/plugin marketplace add secondsky/sap-skills/plugin install sap-hana-cli@sap-skillsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
README.mdreferences/abap-programming.mdreferences/cloud-operations.mdreferences/command-reference.mdreferences/connection-security.mdreferences/db-inspection.mdreferences/development-environment.mdreferences/hdi-management.mdreferences/mass-operations.mdreferences/output-formats.mdreferences/system-admin.mdreferences/troubleshooting.mdreferences/web-ui.mdtemplates/cdsrc-private.jsontemplates/default-env.jsonA developer-centric command-line interface for SAP HANA database development, particularly useful in non-SAP tooling environments like VS Code.
Repository: https://github.com/SAP-samples/hana-developer-cli-tool-example npm Package: https://www.npmjs.com/package/hana-cli Current Version: 3.202405.1 (April 2024) Node.js Requirement: ≥20.19.0
# Install globally via npm (recommended)
npm install -g hana-cli
# Verify installation
hana-cli version
# Interactive connection setup
hana-cli connect
# Or specify connection directly
hana-cli connect -n "hostname:port" -u DBUSER -p PASSWORD --save
# Using service key (HANA Cloud)
hana-cli connectViaServiceKey
| Command | Aliases | Purpose |
|---|---|---|
inspectTable | it, table | Inspect table structure |
inspectView | - | Inspect view definition |
inspectProcedure | - | Inspect stored procedure |
inspectFunction | - | Inspect function definition |
tables | - | List all tables in schema |
views | - | List all views in schema |
procedures | - | List stored procedures |
functions | - | List functions |
| Command | Aliases | Purpose |
|---|---|---|
querySimple | qs | Execute SQL query |
callProcedure | cp | Execute stored procedure |
hdbsql | - | Direct SQL execution |
| Command | Aliases | Purpose |
|---|---|---|
containers | cont | List HDI containers |
createContainer | - | Create new container |
dropContainer | - | Remove container |
activateHDI | - | Enable HDI service |
adminHDI | - | Administer HDI privileges |
| Command | Aliases | Purpose |
|---|---|---|
hanaCloudInstances | - | List HANA Cloud instances |
hanaCloudStart | - | Start cloud instance |
hanaCloudStop | - | Stop cloud instance |
btp | - | Configure BTP CLI |
btpInfo | - | Display BTP target info |
The --output / -o option supports 17+ formats:
| Format | Use Case |
|---|---|
tbl | Human-readable table (default) |
json | JSON data |
yaml | YAML format |
csv | CSV export |
excel | Excel file |
cds | CAP CDS definitions |
hdbcds | HANA CDS format |
hdbtable | HDB Table definitions |
sql | SQL DDL statements |
edmx | OData EDMX metadata |
openapi | OpenAPI/Swagger spec |
graphql | GraphQL schema |
Connection credentials are searched in priority order:
default-env-admin.json (with --admin flag).cdsrc-private.json (via cds bind).env file with VCAP_SERVICES--conn parameterdefault-env.json in current/parent directories~/.hana-cli/default.jsonFor connection templates, see templates/default-env.json.
# Inspect table structure
hana-cli inspectTable -s MYSCHEMA -t MYTABLE
# Convert to CDS format
hana-cli inspectTable -s MYSCHEMA -t MYTABLE -o cds
# Convert all objects in schema to CDS
hana-cli massConvert -s MYSCHEMA
# Run query and export to JSON
hana-cli querySimple -q "SELECT * FROM MYTABLE" -o json
# Export to Excel file
hana-cli querySimple -q "SELECT * FROM MYTABLE" -o excel -f ./output -n report
# List all containers
hana-cli containers
# Create new container
hana-cli createContainer -c MY_CONTAINER -g MY_GROUP
# Create container users
hana-cli createContainerUsers -c MY_CONTAINER
Many commands have browser-based UI alternatives (suffix UI):
tablesUI - Browse tables visuallycontainersUI - Manage containers in browsermassConvertUI - Visual mass conversionquerySimpleUI - Query builder interfacesystemInfoUI - System dashboardFor comprehensive documentation:
references/command-reference.mdreferences/connection-security.mdreferences/hdi-management.mdreferences/output-formats.mdreferences/cloud-operations.mdreferences/db-inspection.mdreferences/mass-operations.mdreferences/system-admin.mdreferences/web-ui.mdreferences/troubleshooting.mdreferences/development-environment.mdreferences/abap-programming.md# Check current connection status
hana-cli status
# Test with explicit credentials
hana-cli connect -n "host:443" -u USER -p PASS --encrypt true
# Use SSL trust store
hana-cli connect --trustStore /path/to/certificate.pem
# Diagnose privilege errors
hana-cli privilegeError
# View current user info
hana-cli inspectUser
references/command-reference.md - Complete command reference with all optionsreferences/abap-programming.md - ABAP-specific programming patternsreferences/quick-start.md - Quick start guide and examplesscripts/hana-setup.sh - HANA development environment setup scriptscripts/migration-helper.sh - Migration helper script for existing projectsLast Updated: 2025-11-26 | Version: 1.1.0
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.