Generate prompt
--generate-prompt¶
Generate a prompt for consulting LLMs about CLI options.
Outputs a formatted prompt containing your current options, all available options by category, and full help text. Pipe to CLI LLM tools or copy to clipboard for web-based LLM chats.
Use --output-format json when an LLM agent or tool should consume structured
option metadata instead of Markdown.
Use --output-format-json-schema generate-prompt when the agent needs the JSON
Schema for that structured payload, such as when defining a tool contract.
See also: LLM Integration for detailed usage examples
Usage
datamodel-codegen --generate-prompt # (1)!
datamodel-codegen --generate-prompt "How do I generate strict types?" # (2)!
datamodel-codegen --generate-prompt --output-format json # (3)!
datamodel-codegen --output-format-json-schema generate-prompt # (4)!
-
--generate-prompt- generate prompt without a question - Include a specific question in the prompt
- Emit structured JSON for LLM/tool ingestion
- Emit JSON Schema for structured prompt JSON