Agent skill

Sap Hana CLI

by secondsky in secondsky/sap-skills

Assists with SAP HANA Developer CLI (hana-cli) for database development and administration.

GPL-3.0Auto-check: notesDatabases

Install Sap Hana CLI

skills CLI
$ npx skills add secondsky/sap-skills --skill sap-hana-cli -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install secondsky/sap-skills sap-hana-cli --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/secondsky/sap-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/sap-hana-cli/skills/sap-hana-cli .claude/skills/sap-hana-cli && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
sap-hana-cli
GitHub stars
460
Token cost
~3.1k tokens
SKILL.md length
929 words
Files
17 (incl. references)
Skills in repo
41
Repo updated
First seen
Licence
GPL-3.0

At a glance

Assists with SAP HANA Developer CLI (hana-cli) for database development and administration.

  • Works in 2 steps: Environment Variables → Connection Types
  • : installing hana-cli
  • SKILL.md covers Related Skills, Table of Contents, Quick Start and MCP Integration (AI-Driven…, plus 8 more sections
  • Calls npm; needs HANA_PASSWORD

What it does

Sap Hana CLI is an agent skill from secondsky/sap-skills. 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.

Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 19 other files, including reference files (for example `README.md`, `agents/openai.yaml` and `references/abap-programming.md`).

It sits in Databases, covering MCP servers, OpenAPI specifications and SQL. It works with SAP, Model Context Protocol, OpenAPI and SQL. The repository describes itself as: Production-ready plugins for SAP development with AI coding assistants — BTP, CAP, Fiori, ABAP, HANA, Analytics Cloud, Datasphere, and more. The licence is GPL-3.0.

When your agent uses it

  • : installing hana-cli
  • Connecting to SAP HANA databases
  • Inspecting database objects (tables
  • Managing HDI containers

Example prompts

  • “Use the sap-hana-cli skill to assist with SAP HANA Developer CLI (hana-cli) for database development and administration”
  • “/sap-hana-cli”

Requirements

  • Node.js

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. Environment Variables
  2. Connection Types

What it can do on your machine

Read from SKILL.md and the folder at commit 652a861. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com
    • youtu.be
    • npmjs.com
    • help.sap.com
    • cap.cloud.sap

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • HANA_PASSWORD

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Sap Hana CLI loads about 3.1k tokens when it runs, and up to ~22k if it reads all its reference files. Until then it costs about 132 tokens; SKILL.md has 929 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~132
When it runs · the whole SKILL.md, loaded when a task matches
~3.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~22k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:83
    (add to ~/.zshrc, ~/.bashrc, or project .env):
  • NoteMentions a .env fileSKILL.md:239
    3. `.env` file with VCAP_SERVICES

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from secondsky/sap-skills at commit 652a861, republished under its GPL-3.0 licence (© secondsky). 929 words, ~3,091 tokens.

Download SKILL.mdSave it as .claude/skills/sap-hana-cli/SKILL.md (or your agent's skills folder). This skill also uses 16 other files; get the full folder from GitHub.
name
sap-hana-cli
description
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.
license
GPL-3.0
metadata.maintainer
Eduard Jiglau
metadata.maintainer_email
hello@sap-ai-skills.com
metadata.website
https://sap-ai-skills.com
metadata.version
2.4.1
metadata.last_verified
2025-11-26

SAP HANA Developer CLI (hana-cli)

  • sap-cap-capire: Use for CAP database development, HDI container management, and CDS syntax comparison
  • sap-btp-cloud-platform: Use for HANA Cloud operations, BTP integration, and cloud instance management
  • sap-abap-cds: Use for comparing CDS syntax between CAP and ABAP or understanding HANA CDS features
  • sap-datasphere: Use when working with SAP Datasphere integration or data warehousing scenarios
  • sap-dependency-security: Use for secure dependency upgrades, exact MCP server pins, npm package hardening, lockfile linting, and cooldown policy when projects include hana-cli dependencies

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


Table of Contents

Quick Start

Installation
bash
# Install globally via npm (recommended)
npm install -g hana-cli

# Verify installation
hana-cli version
First Connection
bash
# 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

MCP Integration (AI-Driven Database Operations)

Overview

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.

Setup

The bundled MCP config pins hana-mcp-server@0.3.4. Use sap-dependency-security before changing this pin because the server receives HANA tenant connection environment variables.

1. Environment Variables

Required configuration (add to ~/.zshrc, ~/.bashrc, or project .env):

bash
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
2. Connection Types
  • single-container (default): Standard HANA databases
  • mdc-system: Multi-tenant system database
  • mdc-tenant: Specific tenant in multi-tenant environment
When to Use: CLI vs MCP
ScenarioRecommended ToolWhy
Exploratory queries, ad-hoc analysisMCPNatural language, no syntax needed
Automation scripts, CI/CD pipelinesCLIScriptable, consistent output
Learning database structureMCPConversational discovery
Generating CDS/EDMX/OpenAPI outputCLISupports 17+ formats
Complex multi-step workflowsCLIFine-grained control
Quick data sampling and inspectionMCPFaster for one-off queries
Example Natural Language Queries
Schema & Table Discovery
  • "Show me all schemas in this HANA database"
  • "List all tables in the SYSTEM schema"
  • "What tables exist in the MY_APP schema?"
  • "Show me all views in the PUBLIC schema"
Table Structure & Metadata
  • "Describe the structure of the USERS table"
  • "What columns does the ORDERS table have?"
  • "Show me the data types for MY_TABLE"
  • "What is the primary key of the CUSTOMERS table?"
Data Sampling & Inspection
  • "Sample 5 rows from the PRODUCTS table"
  • "Show me the first 10 records from SALES_DATA"
  • "Get sample data from ORDER_ITEMS table"
  • "Display a few rows from MY_TABLE"
Query Execution
  • "How many rows are in the CUSTOMERS table?"
  • "Show me distinct values in the STATUS column of ORDERS"
  • "What is the maximum value in the PRICE column of PRODUCTS?"
  • "Find all records in USERS where country is 'USA'"
System Performance & Monitoring
  • "Check the HANA database status"
  • "Show me system performance metrics"
  • "What is the current database version?"
MCP Tools Available

The hana-mcp-server provides these MCP tools:

  • list_schemas: Enumerate all schemas
  • list_tables: Show tables in a schema
  • describe_table: Get table structure and metadata
  • query: Execute SQL queries from natural language
  • sample_data: Retrieve sample rows
  • system_info: Database status and performance
Example: MCP + CLI Workflow
bash
# 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

Core Command Categories

Database Object Inspection
CommandAliasesPurpose
inspectTableit, tableInspect 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
Query Execution
CommandAliasesPurpose
querySimpleqsExecute SQL query
callProcedurecpExecute stored procedure
hdbsql-Direct SQL execution
HDI Container Management
CommandAliasesPurpose
containerscontList HDI containers
createContainer-Create new container
dropContainer-Remove container
activateHDI-Enable HDI service
adminHDI-Administer HDI privileges
Show full SKILL.md (360 more words)Show less
Cloud & BTP Operations
CommandAliasesPurpose
hanaCloudInstances-List HANA Cloud instances
hanaCloudStart-Start cloud instance
hanaCloudStop-Stop cloud instance
btp-Configure BTP CLI
btpInfo-Display BTP target info

Output Formats

The --output / -o option supports 17+ formats:

FormatUse Case
tblHuman-readable table (default)
jsonJSON data
yamlYAML format
csvCSV export
excelExcel file
cdsCAP CDS definitions
hdbcdsHANA CDS format
hdbtableHDB Table definitions
sqlSQL DDL statements
edmxOData EDMX metadata
openapiOpenAPI/Swagger spec
graphqlGraphQL schema

Connection Configuration

Connection credentials are searched in priority order:

  1. default-env-admin.json (with --admin flag)
  2. .cdsrc-private.json (via cds bind)
  3. .env file with VCAP_SERVICES
  4. File specified via --conn parameter
  5. default-env.json in current/parent directories
  6. ~/.hana-cli/default.json

For connection templates, see templates/default-env.json.


Common Workflows

Inspect and Convert Table to CDS
bash
# Inspect table structure
hana-cli inspectTable -s MYSCHEMA -t MYTABLE

# Convert to CDS format
hana-cli inspectTable -s MYSCHEMA -t MYTABLE -o cds
Mass Convert Schema Objects
bash
# Convert all objects in schema to CDS
hana-cli massConvert -s MYSCHEMA
Execute Query with Export
bash
# 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
Manage HDI Containers
bash
# 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

UI Commands

Many commands have browser-based UI alternatives (suffix UI):

  • tablesUI - Browse tables visually
  • containersUI - Manage containers in browser
  • massConvertUI - Visual mass conversion
  • querySimpleUI - Query builder interface
  • systemInfoUI - System dashboard

Key Features

  • Multi-database support: HANA, PostgreSQL, SQLite backends
  • Format conversion: 17+ output formats including CDS, EDMX, OpenAPI
  • HDI management: Full container lifecycle management
  • Cloud integration: SAP BTP CLI and HANA Cloud support
  • Interactive prompts: Missing parameters prompted automatically
  • Service key auth: Secure cloud authentication

Detailed References

For comprehensive documentation:

  • All 91 Commands: See references/command-reference.md
  • Connection & Security: See references/connection-security.md
  • HDI Management: See references/hdi-management.md
  • Output Formats: See references/output-formats.md
  • Cloud Operations: See references/cloud-operations.md
  • Database Inspection: See references/db-inspection.md
  • Mass Operations: See references/mass-operations.md
  • System Administration: See references/system-admin.md
  • Web UI Interface: See references/web-ui.md
  • Troubleshooting Guide: See references/troubleshooting.md
  • Development Environment: See references/development-environment.md
  • ABAP Programming Patterns: See references/abap-programming.md

Troubleshooting

Connection Issues
bash
# 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
Permission Errors
bash
# Diagnose privilege errors
hana-cli privilegeError

# View current user info
hana-cli inspectUser
Version Compatibility
  • Node.js: Requires ≥20.19.0
  • @sap/cds: Uses 9.4.4
  • @sap/cds-dk: Requires ≥8.9 for cds bind

Bundled Resources

Reference Documentation
  • references/command-reference.md - Complete command reference with all options
  • references/abap-programming.md - ABAP-specific programming patterns
  • references/development-environment.md - Development setup and environment guidance
  • references/connection-security.md - Secure connection and credential handling
  • references/troubleshooting.md - Common errors and recovery steps
Templates
  • templates/default-env.json - Local connection template for CAP-style bindings
  • templates/cdsrc-private.json - CAP private configuration template

Resources


Last Updated: 2025-11-26 | Version: 1.1.0

© secondsky, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 16 other files (references) in plugins/sap-hana-cli/skills/sap-hana-cli of secondsky/sap-skills.

  • SKILL.md
  • README.md
  • agents/openai.yaml
  • references/abap-programming.md
  • references/cloud-operations.md
  • references/command-reference.md
  • references/connection-security.md
  • references/db-inspection.md
  • references/development-environment.md
  • references/hdi-management.md
  • references/mass-operations.md
  • references/output-formats.md
  • references/system-admin.md
  • references/troubleshooting.md
  • references/web-ui.md
  • templates/cdsrc-private.json
  • templates/default-env.json

Open the folder on GitHubat commit 652a861

Compare with similar skills

Sap Hana CLI next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Sap Hana CLI compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Sap Hana CLI this skillsecondsky/sap-skills460—~3.1kAutomated safety check: NotesGPL-3.0
Tune Monitorsickn33/agentic-awesome-skills47k1 repos~3.3kAutomated safety check: PassApache-2.0
Alloydb Basicsgoogle/skills21k—~1.7kAutomated safety check: PassApache-2.0
Dune MCP Skillholon-run/uxc115—~1.2kAutomated safety check: PassMIT
Kingdee MCP DevWaHaiLong/KingdeeMCP103—~853Automated safety check: PassMIT
Semantic Analystsidequery/sidemantic129—~982Automated safety check: PassAGPL-3.0

Similar skills

  • Tune Monitor

    sickn33/agentic-awesome-skills

    Analyze a Monte Carlo monitor and recommend config changes to reduce alert noise.

    47k GitHub starsUsed in 1 repo~3.3k tokens
    DatabasesAuto-check passed
  • Alloydb Basics

    google/skills

    Official

    Manages clusters, instances, and backups for AlloyDB for PostgreSQL, and integrates with AlloyDB Model Context Protocol (MCP) tools for automated database operations.

    21k GitHub stars~1.7k tokensUpdated today
    DatabasesAuto-check passed
  • Dune MCP Skill

    holon-run/uxc

    Use Dune MCP through UXC for blockchain table discovery, SQL query creation/execution, execution result retrieval, and visualization with help-first schema inspection, explicit auth binding, and…

    115 GitHub stars~1.2k tokensUpdated 22 days ago
    DatabasesAuto-check passed
  • Kingdee MCP Dev

    WaHaiLong/KingdeeMCP

    Knowledge base for the Kingdee MCP Dev Squad. An agent skill from WaHaiLong/KingdeeMCP.

    103 GitHub stars~853 tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Semantic Analyst

    sidequery/sidemantic

    Answer analytical, KPI, metric, trend, cohort, and business-performance questions through a Sidemantic semantic layer.

    129 GitHub stars~982 tokensUpdated today
    DatabasesAuto-check passed
  • Pytorch Clickhouse

    pytorch/test-infra

    Load this FIRST whenever working with PyTorch CI data (any pytorch/ org repo), the torchci/HUD codebase, or the PyTorch HUD ClickHouse database.

    113 GitHub stars~2.8k tokensUpdated today
    DatabasesAuto-check passed

More from secondsky/sap-skills

All 41 skills in this repo
  • Sap Rpt1

    secondsky/sap-skills

    SAP-RPT-1-OSS local tabular prediction workflows for FI/CO prototype datasets.

    460 GitHub stars~1.8k tokensUpdated 2 days ago
    Auto-check: notes
  • Dependency Upgrade

    secondsky/sap-skills

    Secure dependency upgrades with supply chain protection, cooldowns, and staged rollout.

    460 GitHub stars~4.8k tokensUpdated 2 days ago
    Auto-check: warnings
  • Sap Abap

    secondsky/sap-skills

    Comprehensive ABAP development skill for SAP systems. An agent skill from secondsky/sap-skills.

    460 GitHub stars~3.9k tokensUpdated 2 days ago
    Auto-check passed
  • Sap Dependency Security

    secondsky/sap-skills

    SAP dependency security and MCP executable trust policy with secure upgrades, cooldowns, staged rollout, and supply-chain protection.

    460 GitHub stars~5.9k tokensUpdated 2 days ago
    Auto-check: warnings
  • Sap Abap Cds

    secondsky/sap-skills

    Comprehensive SAP ABAP CDS (Core Data Services) reference for data modeling, view development, and semantic enrichment.

    460 GitHub stars~4.2k tokensUpdated 2 days ago
    Auto-check passed
  • Sap AI Core

    secondsky/sap-skills

    Guides development with SAP AI Core and SAP AI Launchpad for enterprise AI/ML workloads on SAP BTP.

    460 GitHub stars~3.3k tokensUpdated 2 days ago
    Auto-check passed

Questions about Sap Hana CLI

What does Sap Hana CLI do?

Assists with SAP HANA Developer CLI (hana-cli) for database development and administration. Sap Hana CLI is an agent skill from secondsky/sap-skills. Assists with SAP HANA Developer CLI (hana-cli) for database development and administration.

When should I use Sap Hana CLI?

Sap Hana CLI fits situations like: : installing hana-cli; connecting to SAP HANA databases; inspecting database objects (tables; managing HDI containers.

How do I install Sap Hana CLI in Claude Code?

Run `npx skills add secondsky/sap-skills --skill sap-hana-cli -a claude-code`. Or copy the skill folder (plugins/sap-hana-cli/skills/sap-hana-cli in secondsky/sap-skills) into .claude/skills/sap-hana-cli in your project. Claude Code loads it when a task matches its description.

How do I install Sap Hana CLI in Codex?

Run `npx skills add secondsky/sap-skills --skill sap-hana-cli -a codex`. Or copy the skill folder (plugins/sap-hana-cli/skills/sap-hana-cli in secondsky/sap-skills) into .agents/skills/sap-hana-cli in your project. Codex loads it when a task matches its description.

Can I use Sap Hana CLI in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add secondsky/sap-skills --skill sap-hana-cli -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/sap-hana-cli, .gemini/skills/sap-hana-cli, .github/skills/sap-hana-cli and .opencode/skills/sap-hana-cli in your project.

What does Sap Hana CLI need to run?

Going by SKILL.md and its folder, Sap Hana CLI needs the command-line tools its instructions call (npm) and credentials named HANA_PASSWORD. Our summary lists: Node.js.

Does Sap Hana CLI access the network?

SKILL.md names 5 domains. As links in the text: github.com, youtu.be, npmjs.com, help.sap.com and cap.cloud.sap. This is read from the text; nothing was executed.

Is Sap Hana CLI safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Sap Hana CLI use?

Sap Hana CLI is published under the GPL-3.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Sap Hana CLI use?

About 3.1k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 19k tokens, read only when the agent opens those files.

What are the alternatives to Sap Hana CLI?

Skills that share tags, products or a category with Sap Hana CLI: Tune Monitor (sickn33/agentic-awesome-skills, 47k stars), Alloydb Basics (google/skills, 21k stars), Dune MCP Skill (holon-run/uxc, 115 stars) and Kingdee MCP Dev (WaHaiLong/KingdeeMCP, 103 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Sap Hana CLI?

secondsky (a GitHub user) maintains it in secondsky/sap-skills, which has 460 GitHub stars. The repository holds 41 skills in this directory. The repository was last updated on October 5, 2026.

Source: secondsky/sap-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.