docstr: Initialize command
  
  Parameters
  ----------
  name : str
      name for the project
  description : str
      description of the project
  force : bool
      Boolean to force initialization without prompts
  
  Returns
  -------
  datmo.core.entity.model.Model
docstr_tok: ["Initialize","command","Parameters","--","--","--","--","--","name",":","str","name","for","the","project","description",":","str","description","of","the","project","force",":","bool","Boolean","to","force","initialization","without","prompts","Returns","--","--","--","-","datmo.core.entity.model.Model"]
code: def init(self, name, description, force):
      """Initialize command
  
      Parameters
      ----------
      name : str
          name for the project
      description : str
          description of the project
      force : bool
          Boolean to force initialization without prompts
  
      Returns
      -------
      datmo.core.entity.model.Model
      """
      # Check if project already exists
      is_new_model = False
      if not self.project_controller.model:
          is_new_model = True
  
      if is_new_model:  # Initialize a new project
          self.cli_helper.echo(
              __(
                  "info",
                  "cli.project.init.create",
                  {"path": self.project_controller.home},
              )
          )
          if not name:
              _, default_name = os.path.split(
                  self.project_controller.home
              )
              if not force:
                  name = self.cli_helper.prompt(
                      __("prompt", "cli.project.init.name"),
                      default=default_name,
                  )
              else:
                  name = default_name
          if not description:
              if not force:
                  description = self.cli_helper.prompt(
                      __("prompt", "cli.project.init.description")
                  )
              else:
                  description = ""
          try:
              success = self.project_controller.init(name, description)
              if success:
                  self.cli_helper.echo(
                      __(
                          "info",
                          "cli.project.init.create.success",
                          {
                              "name": name,
                              "path": self.project_controller.home,
                          },
                      )
                  )
          except Exception:
              self.cli_helper.echo(
                  __(
                      "info",
                      "cli.project.init.create.failure",
                      {
                          "name": name,
                          "path": self.project_controller.home,
                      },
                  )
              )
              return None
      else:  # Update the current project
          self.cli_helper.echo(
              __(
                  "info",
                  "cli.project.init.update",
                  {
                      "name": self.project_controller.model.name,
                      "path": self.project_controller.home,
                  },
              )
          )
          # Prompt for the name and description and add default if not given
          if not name and not force:
              name = self.cli_helper.prompt(
                  __("prompt", "cli.project.init.name"),
                  default=self.project_controller.model.name,
              )
          elif force:
              name = self.project_controller.model.name
          if not description and not force:
              description = self.cli_helper.prompt(
                  __("prompt", "cli.project.init.description"),
                  default=self.project_controller.model.description,
              )
          elif force:
              description = self.project_controller.model.description
          # Update the project with the values given
          try:
              success = self.project_controller.init(name, description)
              if success:
                  self.cli_helper.echo(
                      __(
                          "info",
                          "cli.project.init.update.success",
                          {
                              "name": name,
                              "path": self.project_controller.home,
                          },
                      )
                  )
          except Exception:
              self.cli_helper.echo(
                  __(
                      "info",
                      "cli.project.init.update.failure",
                      {
                          "name": name,
                          "path": self.project_controller.home,
                      },
                  )
              )
              return None
  
      self.cli_helper.echo("")
  
      # Print out simple project meta data
      for k, v in self.project_controller.model.to_dictionary().items():
          if k != "config":
              self.cli_helper.echo(str(k) + ": " + str(v))
      # Ask question if the user would like to setup environment
      environment_setup = (
          self.cli_helper.prompt_bool(
              __("prompt", "cli.project.environment.setup")
          )
          if not force
          else False
      )
      if environment_setup:
          # TODO: remove business logic from here and create common helper
          # Setting up the environment definition file
          self.environment_controller = EnvironmentController()
          environment_types = (
              self.environment_controller.get_environment_types()
          )
          environment_type = self.cli_helper.prompt_available_options(
              environment_types, option_type="type"
          )
          available_environment_frameworks = (
              self.environment_controller.get_supported_frameworks(
                  environment_type
              )
          )
          environment_framework = (
              self.cli_helper.prompt_available_options(
                  available_environment_frameworks,
                  option_type="framework",
              )
          )
          available_environment_languages = (
              self.environment_controller.get_supported_languages(
                  environment_type, environment_framework
              )
          )
          environment_language = (
              self.cli_helper.prompt_available_options(
                  available_environment_languages,
                  option_type="language",
              )
          )
          options = {
              "environment_type": environment_type,
              "environment_framework": environment_framework,
              "environment_language": environment_language,
          }
          environment_obj = self.environment_controller.setup(
              options=options
          )
          self.cli_helper.echo(
              __(
                  "info",
                  "cli.environment.setup.success",
                  (environment_obj.name, environment_obj.id),
              )
          )
      else:
          self.cli_helper.echo(
              "there was no environment setup. you can get information"
              " here: https://datmo.readthedocs.io/en/latest/env-setup.html"
          )
  
      return self.project_controller.model
  
file_path: datmo/datmo/cli/command/project.py
imports: import os
  from datmo import __version__
  from datmo.core.util.i18n import get
  from datmo.core.util.json_store import JSONStore
  from datmo.core.util.remote_api import RemoteAPI
  from datmo.cli.driver.helper import Helper
  from datmo.cli.command.base import BaseCommand
  from datmo.core.controller.project import ProjectController
  from datmo.core.controller.environment.environment import EnvironmentController
  from datmo.dashboard.app import app
label_desc: Use image node_id 2 for calling the ProjectCommand obj's underlying member method code with example usage: obj.init(name, description, force) and returns: self, None, None