Transfer Files
Use runta cp or SDK file helpers to copy files between your local machine and
a runtime.
Start a runtime:
runta run --name <runtime_display_name> --cpus 1 --memory 512from runta import Runta
runta = Runta()runtime = runta.runtimes.create("<runtime_display_name>", vcpus=1, memory_mib=512)import { Runta } from "@runta/runta-sdk";
const runta = new Runta();const runtime = await runta.runtimes.create("<runtime_display_name>", { vcpus: 1, memoryMiB: 512,});Copy a file from the runtime to your local machine:
runta cp <runtime_display_name>:/.nvm/README.md ./nvm-README.mdcat nvm-README.mdawait runtime.files.download("/.nvm/README.md", "./nvm-README.md");Copy a local file into the runtime:
echo "hello world" > hello.txtrunta cp hello.txt <runtime_display_name>:/runta exec <runtime_display_name> cat /hello.txtawait runtime.files.upload("./hello.txt", "/hello.txt");
const text = await runtime.files.readText("/hello.txt");console.log(text);