class CommandLineMetadataController extends AbstractMetadataController {

	private final CommandLineHelpGenerator commandLineHelpGenerator;

	public CommandLineMetadataController(InitializrMetadataProvider metadataProvider,
			TemplateRenderer templateRenderer) {
		super(metadataProvider);
		this.commandLineHelpGenerator = new CommandLineHelpGenerator(templateRenderer);
	}

	@GetMapping(path = "/", produces = "text/plain")
	public ResponseEntity<String> serviceCapabilitiesText(
			@RequestHeader(value = HttpHeaders.USER_AGENT, required = false) String userAgent) throws IOException {<FILL_FUNCTION_BODY>}

}

		String appUrl = generateAppUrl();
		InitializrMetadata metadata = this.metadataProvider.get();

		BodyBuilder builder = ResponseEntity.ok().contentType(MediaType.TEXT_PLAIN);
		if (userAgent != null) {
			Agent agent = Agent.fromUserAgent(userAgent);
			if (agent != null) {
				if (AgentId.CURL.equals(agent.getId())) {
					String content = this.commandLineHelpGenerator.generateCurlCapabilities(metadata, appUrl);
					return builder.eTag(createUniqueId(content)).body(content);
				}
				if (AgentId.HTTPIE.equals(agent.getId())) {
					String content = this.commandLineHelpGenerator.generateHttpieCapabilities(metadata, appUrl);
					return builder.eTag(createUniqueId(content)).body(content);
				}
				if (AgentId.SPRING_BOOT_CLI.equals(agent.getId())) {
					String content = this.commandLineHelpGenerator.generateSpringBootCliCapabilities(metadata, appUrl);
					return builder.eTag(createUniqueId(content)).body(content);
				}
			}
		}
		String content = this.commandLineHelpGenerator.generateGenericCapabilities(metadata, appUrl);
		return builder.eTag(createUniqueId(content)).body(content);
	
<methods><variables>private java.lang.Boolean forceSsl,protected final non-sealed io.spring.initializr.metadata.InitializrMetadataProvider metadataProvider