Cloud

rpk generate app

Generate application code to connect to Redpanda. Creates starter code for various programming languages.

This command is only supported in Serverless clusters.

Usage

rpk generate app [flags]

Supported languages

The following programming languages are supported:

  • Python

  • Go

  • Java

  • JavaScript/Node.js

  • Rust

Flags

Value Type Description

-l, --language

string

The language for the generated code sample (go, python, java, js, rust).

--new-sasl-credentials

string

If provided, rpk will generate and use these credentials (<user>:<password>).

--no-user

bool

Generates the sample app without SASL user.

-o, --output

string

The path where the app will be written.

Global flags

Value Type Description

--config

string

Redpanda or rpk config file; default search paths are ~/.config/rpk/rpk.yaml, $PWD/redpanda.yaml, and /etc/redpanda/redpanda.yaml.

-X, --config-opt

stringArray

Override rpk configuration settings; -X help for detail or -X list for terser detail.

--ignore-profile

bool

Ignore rpk.yaml and redpanda.yaml; use default settings.

--profile

string

rpk profile to use.

-v, --verbose

bool

Enable verbose logging.