oxen.clone

clone

def clone(repo_id: str,
          path: Optional[str] = None,
          host: str = "hub.oxen.ai",
          branch: str = "main",
          scheme: str = "https",
          shallow=False,
          all=False)

Clone a repository

Arguments:

  • repo_id - str Name of the repository in the format ‘namespace/repo_name’. For example ‘ox/chatbot’
  • path - Optional[str] The path to clone the repo to. Defaults to the name of the repository.
  • host - str The host to connect to. Defaults to ‘hub.oxen.ai’
  • branch - str The branch name id to clone. Defaults to ‘main’
  • scheme - str The scheme to use. Defaults to ‘https’
  • shallow - bool Whether to do a shallow clone or not. Default: False
  • all - bool Whether to clone the full commit history or not. Default: False

Returns:

Repo A Repo object that can be used to interact with the cloned repo.