oxen.clone

clone

def clone(repo_id: str,
          path: Optional[str] = None,
          host: str = "hub.oxen.ai",
          branch: str = "main",
          protocol: 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’
  • protocol - str The protocol 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:

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