| Assists with SAP HANA Developer CLI (hana-cli) for database development and administration. (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.
npx skills add https://github.com/secondsky/sap-skills --skill sap-hana-cli
A 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
The hana-mcp-server integration enables natural language database operations through Claude's Model Context Protocol. Use conversational queries alongside traditional CLI commands for a complete development workflow.
The bundled MCP config pins [email protected]. Use sap-dependency-security before changing this pin because the server receives HANA tenant connection environment variables.
Required configuration (add to ~/.zshrc, ~/.bashrc, or project .env):
export HANA_HOST="your-hana-host.hanacloud.ondemand.com"
export HANA_PORT="443"
export HANA_USER="DBADMIN"
export HANA_PASSWORD="your-password"
export HANA_ENCRYPT="true" # Optional, defaults to true
export HANA_DATABASE="" # Optional, for MDC tenant
export HANA_CONNECTION_TYPE="single-container" # Optional
| Scenario | Recommended Tool | Why |
|----------|------------------|-----|
| Exploratory queries, ad-hoc analysis | MCP | Natural language, no syntax needed |
| Automation scripts, CI/CD pipelines | CLI | Scriptable, consistent output |
| Learning database structure | MCP | Conversational discovery |
| Generating CDS/EDMX/OpenAPI output | CLI | Supports 17+ formats |
| Complex multi-step workflows | CLI | Fine-grained control |
| Quick data sampling and inspection | MCP | Faster for one-off queries |
The hana-mcp-server provides these MCP tools:
list_schemas: Enumerate all schemaslist_tables: Show tables in a schemadescribe_table: Get table structure and metadataquery: Execute SQL queries from natural languagesample_data: Retrieve sample rowssystem_info: Database status and performance# 1. Use MCP to explore (natural language)
"Show me all tables in the PRODUCTS schema"
# 2. Use MCP to understand structure
"Describe the PRODUCTS.INVENTORY table"
# 3. Use CLI for format conversion (precise output)
hana-cli inspectTable -t INVENTORY -s PRODUCTS -o cds
# 4. Use CLI for HDI operations
hana-cli createContainer -c MY_CONTAINER
| 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/development-environment.md - Development setup and environment guidancereferences/connection-security.md - Secure connection and credential handlingreferences/troubleshooting.md - Common errors and recovery stepstemplates/default-env.json - Local connection template for CAP-style bindingstemplates/cdsrc-private.json - CAP private configuration template*Last Updated: 2025-11-26 | Version: 1.1.0*
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
Automatically creates user-facing changelogs from git commits by analyzing commit history, categorizing changes, and transforming technical commits into clear, customer-friendly release notes. Turns hours of manual changelog writing into minutes of automated generation.
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
React Native and Expo best practices for building performant mobile apps. Use when building React Native components, optimizing list performance, implementing animations, or working with native modules. Triggers on tasks involving React Native, Expo, mobile performance, or native platform APIs.
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
Use when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees with smart directory selection and safety verification
Take secondsky/sap-hana-cli from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference npm.
Without those the skill loads but fails at the first command.