{"id":"21e864265c51d40e","repo":"spring-projects/spring-boot","slug":"name-is-not-a-valid-command-see-help","errorCode":null,"errorMessage":"'${name}' is not a valid command. See 'help'.","messagePattern":"'(.+?)' is not a valid command\\. See 'help'\\.","errorType":"exception","errorClass":"NoSuchCommandException","httpStatus":null,"severity":"error","filePath":"cli/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/CommandRunner.java","lineNumber":217,"sourceCode":"\t\t}\n\t\treturn StringUtils.toStringArray(rtn);\n\t}\n\n\t/**\n\t * Parse the arguments and run a suitable command.\n\t * @param args the arguments\n\t * @return the outcome of the command\n\t * @throws Exception if the command fails\n\t */\n\tprotected ExitStatus run(String... args) throws Exception {\n\t\tif (args.length == 0) {\n\t\t\tthrow new NoArgumentsException();\n\t\t}\n\t\tString commandName = args[0];\n\t\tString[] commandArguments = Arrays.copyOfRange(args, 1, args.length);\n\t\tCommand command = findCommand(commandName);\n\t\tif (command == null) {\n\t\t\tthrow new NoSuchCommandException(commandName);\n\t\t}\n\t\tbeforeRun(command);\n\t\ttry {\n\t\t\treturn command.run(commandArguments);\n\t\t}\n\t\tfinally {\n\t\t\tafterRun(command);\n\t\t}\n\t}\n\n\t/**\n\t * Subclass hook called before a command is run.\n\t * @param command the command about to run\n\t */\n\tprotected void beforeRun(Command command) {\n\t}\n\n\t/**","sourceCodeStart":199,"sourceCodeEnd":235,"githubUrl":"https://github.com/spring-projects/spring-boot/blob/5b2dbdbb8be64415eb6552f81ff7c449c8d251e6/cli/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/CommandRunner.java#L199-L235","documentation":"Error \"'${name}' is not a valid command. See 'help'.\" thrown in spring-projects/spring-boot.","triggerScenarios":"Thrown at cli/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/CommandRunner.java:217 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"5b2dbdbb8be64415eb6552f81ff7c449c8d251e6","analyzedAt":"2026-08-04T18:53:14.967Z","schemaVersion":2}