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")

runtime.git.clone(
    url="https://github.com/octocat/Hello-World.git",
    path="/home/user/repo",
)
runtime.file.write("/home/user/repo/note.txt", "hello\n")
runtime.git.add("/home/user/repo", paths=["note.txt"])

r = runtime.git.commit(
    "/home/user/repo",
    "add note",
    author_name="Demo",
    author_email="demo@example.com",
)
print(r.success, r.stdout)

runtime.kill()

Parameters

ParameterTypeRequiredDescription
repository_pathstringYesPath to the repository root inside the runtime
messagestringYesCommit message
author_namestringNoAuthor name for the commit
author_emailstringNoAuthor email for the commit
allow_emptybooleanNoAllow a commit with no changes

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