Class ListModelsCommand

java.lang.Object
eu.svjatoslav.alyverkko_cli.commands.ListModelsCommand
All Implemented Interfaces:
Command

public class ListModelsCommand extends Object implements Command

Displays all available AI models in the configured models directory. This command provides a quick overview of currently available models and their metadata.

The implementation:

  • Loads the configuration
  • Instantiates ModelLibrary
  • Prints model details using ModelLibrary's printModels()

This command is primarily intended for administrative use to verify model availability before running tasks.

  • Constructor Details

    • ListModelsCommand

      public ListModelsCommand()
  • Method Details

    • getCommandName

      public String getCommandName()
      Specified by:
      getCommandName in interface Command
      Returns:
      the name of this command, i.e., "listmodels".
    • executeCommand

      public void executeCommand(String[] cliArguments) throws IOException
      Executes the command to load the user's configuration and list all known AI models, printing them to stdout.
      Specified by:
      executeCommand in interface Command
      Parameters:
      cliArguments - the command-line arguments after "listmodels".
      Throws:
      IOException - if loading configuration fails.