Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.gravixlayer.ai/llms.txt

Use this file to discover all available pages before exploring further.

from gravixlayer import GravixLayer

client = GravixLayer()
runtime = client.runtime.create(template="python-3.14-base-small")

r = runtime.git.clone(
    url="https://github.com/octocat/Hello-World.git",
    path="/home/user/repo",
    branch="master",
    depth=1,
)
print(r.success, r.exit_code)
print(r.stdout[:500] if r.stdout else r.stderr)

runtime.kill()
url must use http://, https://, ssh://, git://, or SCP-style SSH (for example git@github.com:org/repo.git). The file:// scheme is not allowed. For private HTTPS repositories, pass auth_token; the API uses it only for that clone.

Parameters

ParameterTypeRequiredDescription
urlstringYesRemote repository URL (allowed schemes only)
pathstringYesDirectory inside the runtime where the repo will be cloned
branchstringNoBranch to check out after clone
depthintegerNoShallow clone depth (git clone --depth)
auth_tokenstringNoToken for HTTPS authentication (private repos)

Response

FieldTypeDescription
successbooleanWhether the git command completed successfully
exit_codeintegerProcess exit code from git
stdoutstringStandard output from git
stderrstringStandard error from git
errorstringError message when the operation fails