Novita client as the main entry point. In JavaScript and TypeScript, start with novita.template.new(). In Python, the same builder is available through novita.template.new() as well.
Private registry
To build from an image hosted in a private or cloud registry, pass credentials when selecting the base image. For a generic registry usefromImage / from_image with a username and password; dedicated helpers exist for AWS ECR, Google Container Registry, Oracle Cloud (OCI), and Huawei Cloud SWR.
Run command
runCmd / run_cmd runs a shell command during the build. It accepts a single command string or an array/list of commands (joined with &&), and an optional user to run as.
Copy files
copy includes local files or directories in the image. src may be a single path or a list of paths; dest is the destination in the template. Options control ownership, permissions, and upload behavior.
Set envs
setEnvs / set_envs sets environment variables from a key/value mapping.
Important: Environment variables defined with
setEnvs / set_envs are available only during the template build, not at sandbox runtime.Package setup (pip, npm, bun, apt)
Dedicated helpers wrap common package managers. Each accepts a single package name or a list; when packages are omitted, the language helpers install from the current project (pip install . or package.json).
Git clone
gitClone / git_clone clones a repository into the image. Only the URL is required; an optional destination path and clone options are supported.
Note:
gitClone / git_clone has no dedicated auth parameters. For a private repository, embed credentials/token in the URL or set them up via a prior runCmd / setEnvs step.