Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问clear审计异常

sap-hana-cliSAP hana CLI 搜索

Agent Skill

sap-hana-cli 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,854

周安装

75

GitHub Stars

239

下载量

582
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:sap-hana-cli(SAP hana CLI 搜索)
来源仓库:https://github.com/secondsky/sap-skills
仓库路径:skills/sap-hana-cli
安装命令:
npx skills add https://github.com/secondsky/sap-skills --skill sap-hana-cli
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/secondsky/sap-skills --skill sap-hana-cli

简介

用于查找、检索和筛选 SAP HANA CLI 相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据任务场景快速定位资料。
  • 通过 npx skills add 命令从 GitHub 仓库安装使用。
  • 建议确认权限范围和维护状态,避免触发联网或文件读写操作。
  • 可结合原始 README 进一步核验具体用法和功能边界。

SKILL.md

SAP HANA Developer CLI (hana-cli)

Related Skills

  • 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

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

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

# Verify installation
hana-cli version

First Connection

# 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

1. 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

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

# 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

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

# 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

# Convert all objects in schema to CDS
hana-cli massConvert -s MYSCHEMA

Execute Query with Export

# 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

# 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

# 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

# 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/quick-start.md - Quick start guide and examples

Scripts

  • scripts/hana-setup.sh - HANA development environment setup script
  • scripts/migration-helper.sh - Migration helper script for existing projects

Resources


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

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

26.41%
按下载量换算154

windsurf

23.77%
按下载量换算138

trae

17.15%
按下载量换算100

OpenCode

12.65%
按下载量换算74

Codex

8.05%
按下载量换算47

Antigravity

3.73%
按下载量换算22

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills