> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tokenfactory.nebius.com/llms.txt
> Use this file to discover all available pages before exploring further.

# cd - Change session working directory

Change the working directory for subsequent commands in the current session.

## Examples

```bash theme={null}
contree cd /app
contree run -- ls           # runs in /app
contree cd /etc
contree cat os-release      # reads /etc/os-release
contree cd                  # print current working directory
```

## Help output

\$ contree cd --help<pre>`usage: contree cd [-h] [path]Change the working directory in the current session.Sets the session's cwd used by subsequent commands (run, ls, cat).Relative paths are resolved against the current cwd. Without anargument, prints the current working directory.The path is validated against the image filesystem via the inspect API.positional arguments:  path        Target directoryoptions:  -h, --help  show this help message and exitfor coding agents:  mutates local session cwd pointer  validates path exists in image via inspect APIagent note:  Before using this command in an automated workflow, read:    contree agent`</pre>

## Behavior

`cd` stores the path in the session state. Subsequent `run`, `ls`, `cat`,
and `cp` commands resolve relative paths against it.

`cd` without arguments prints the current working directory.

> [!NOTE]
>
> `cd` validates the target against the image filesystem via the
> inspect API and reports an error when the directory does not exist.
