Command-line Interface

assign(name: str = <typer.models.ArgumentInfo object>, version: str = <typer.models.ArgumentInfo object>, validation: Optional[bool] = <typer.models.OptionInfo object>)

Change main version of a service.

Parameters
  • name (str) – Name of the service to change to primary.

  • version (str) – Version of the service to change to primary.

  • validation (bool, optional) – Give confirmation to kill services at runtime. Skips prompt, so use with caution.

Raises

Exit – If the user does not validate the assign.

deploy(name: str = <typer.models.ArgumentInfo object>, version: str = <typer.models.ArgumentInfo object>, source: str = <typer.models.ArgumentInfo object>, port: Optional[int] = <typer.models.OptionInfo object>, image_flag: Optional[bool] = <typer.models.OptionInfo object>, git_flag: Optional[bool] = <typer.models.OptionInfo object>)

Deploy a new service.

Parameters
  • name (str) – Name of the new service.

  • version (str) – Version of the new service.

  • source (str) – Path to the source of the service.

  • port (int, optional) – Internal port for the service.

  • image_flag (bool, optional) – Indicate that an image is being used for creating the service. Default False.

  • git_flag (bool, optional) – Indicate that a git repository is being used for creating the service. Default False.

Raises

Exit – If given an invalid path or user specifies both the -i and the -g option.

init(path: Optional[pathlib.Path] = <typer.models.ArgumentInfo object>, project_name: Optional[str] = <typer.models.OptionInfo object>)

Generates skeleton code for a new MVI project.

Parameters
  • path (Path, optional) – Project generation output directory.

  • project_name (str, optional) – Name of the project to skip prompt.

Raises

Exit – If the output directory could not be found

kill(name: Optional[str] = <typer.models.ArgumentInfo object>, version: Optional[str] = <typer.models.ArgumentInfo object>, all_: Optional[bool] = <typer.models.OptionInfo object>, validation: Optional[bool] = <typer.models.OptionInfo object>)

Kill one or multiple services by name and version.

Parameters
  • name (str, optional) – Name of the service(s) to kill. Defaults to None.

  • version (str, optional) – Version of the service to kill. Defaults to None.

  • all (bool, optional) – Kill all services. Defaults to False.

  • validation (bool, optional) – Give confirmation to kill services at runtime. Skips prompt, so use with caution. Defaults to False.

Raises

Exit – If there are no services to kill matching the given description.

login(host: Optional[str] = <typer.models.OptionInfo object>, username: Optional[str] = <typer.models.OptionInfo object>, password: Optional[str] = <typer.models.OptionInfo object>, _token: Optional[str] = <typer.models.OptionInfo object>)

Log in to the specified host.

Parameters
  • host (str, optional) – Host address to log in to. Defaults to None in which case you will be prompted.

  • username (str, optional) – Username. Defaults to None in which case you will be prompted.

  • password (str, optional) – Password. Use with caution because input will be saved in terminal history. Defaults to None in which case you will be prompted.

  • _token (str, optional) – Log in to a manager using a token instead of username and password. Defaults to None.

Raises

Exit – If given invalid login credentials or host

logs(name: str = <typer.models.ArgumentInfo object>, version: Optional[str] = <typer.models.ArgumentInfo object>, tail: Optional[str] = <typer.models.OptionInfo object>, follow: Optional[bool] = <typer.models.OptionInfo object>, date: Optional[datetime.datetime] = <typer.models.OptionInfo object>)

Shows the logs for a service.

Parameters
  • name (str) – Name of the service. Defaults to None.

  • version (str, optional) – Version of the service. Defaults to None.

  • tail (int, optional) – Output specified number of lines at the end of logs. Default to 50

  • follow (bool, optional) – If the logs should be followed. Defaults to False.

  • date (datetime, optional) – Show logs since given datetime. Valid forrmats: [%Y-%m-%d|%Y-%m-%dT%H:%M:%S|%Y-%m-%d %H:%M:%S]. Default to None.

Raises

Exit – If the tail input has a wrong type.

ls(name: Optional[str] = <typer.models.ArgumentInfo object>, version: Optional[str] = <typer.models.ArgumentInfo object>)

List running services, filtered by name and version.

Parameters
  • name (str, optional) – List services with this name. Defaults to None.

  • version (str, optional) – List services of a certain name with this version. Defaults to None.

test(service_path: Optional[pathlib.Path] = <typer.models.ArgumentInfo object>)

Test a service before deployment.

Parameters

service_path (Path, optional) – Path to the directory of the service to test. Defaults to Path.cwd().

Raises

Exit – Exits with exit code 0 if all tests pass, otherwise 1-5

token(lifetime: Optional[int] = <typer.models.ArgumentInfo object>)

Generate a new authentication token.

Parameters

lifetime (Optional[int], optional) – Number of days the token should be valid.mvi Default to None which correpsonds to a long-lived token.