Skip to main content

Overview

The S4Kit CLI provides utilities for type generation, project initialization, and more.
Or install globally:

Commands

generate-types

Generate TypeScript type definitions from SAP OData metadata:

Options

OptionAliasDescriptionRequired
--api-key-kYour S4Kit API keyYes
--base-url-bAPI proxy URLNo
--output-oOutput directory pathYes

Examples

Generated Types

The CLI generates comprehensive TypeScript types:

Using Generated Types

init

Initialize a new S4Kit project:
This creates:
  • .env.example with configuration template
  • s4kit.config.ts with default settings
  • TypeScript configuration if not present

version

Display the CLI version:

help

Show help information:

Environment Variables

The CLI respects these environment variables:
VariableDescription
S4KIT_API_KEYDefault API key
S4KIT_BASE_URLCustom API base URL

CI/CD Integration

GitHub Actions

GitLab CI

Troubleshooting

Authentication Failed

Verify your API key:
  • Check the API key is correct
  • Ensure the --api-key flag is provided
  • Try using environment variable S4KIT_API_KEY

Invalid Base URL

Verify the base URL:
  • Check the --base-url flag points to your S4Kit proxy
  • Ensure the URL is reachable from your network