Appearance
User and Working Directory
Configure the default user and working directory for templates. By default, the user is user and the working directory is /home/user.
Usage
javascript
import { Template } from '@e2b/code-interpreter'
const template = Template()
.fromBaseImage()
.setUser('myuser')
.setWorkdir('/app')Persistence
The user and working directory set in the template are persisted to all sandboxes created from that template. This means these configurations set during template building remain consistent across all sandbox instances.
SDK Version Requirements
Requires SDK version 2.3.0 or later.