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

# Mount with just-bash

> In-process bash executor and filesystem adapter built on @archildata/native.

[just-bash](https://justbash.dev) is a terminal emulator from Vercel designed to provide agents with an in-process bash emulator with a limited set of tools.

We offer the ability to use Archil disks from `just-bash` for agent environments where you do not have the ability to mount (such as AWS Lambda), and do not want to use a sandbox. For all users of `just-bash`, we recommend moving to [Serverless execution](/compute/serverless-execution), which gives you a full Linux environment to run commands like bash, node, and python on your disk data.

Our `just-bash` integration is built by linking our Typescript package against our native Linux client. As a result, it's only available on `x86_64` and `aarch64` Linux machines.

## Usage

You use the Archil `just-bash` integration through the exported `ArchilFs` file system. In order to give your agent the ability to use the `archil` CLI to manage delegations, we recommend also adding `archil` as a custom command with `createArchilCommand`.

```typescript theme={null}
import { ArchilClient } from '@archildata/client';
import { ArchilFs, createArchilCommand } from "@archildata/just-bash";
import { Bash } from "just-bash";

const client = await ArchilClient.connect({
  region: 'aws-us-east-1',
  diskName: 'myaccount/agent-workspace',
});

const fs = await ArchilFs.create(client);
const bash = new Bash({
  fs,
  customCommands: [createArchilCommand(client, fs)],
});

const result = await bash.exec("ls -la /");
console.log(result.stdout);

await bash.exec('echo "hello world" > /greeting.txt');
const cat = await bash.exec("cat /greeting.txt");
console.log(cat.stdout); // "hello world"
```

## Delegations

Writes through `ArchilFs` and the bash executor go through Archil's [delegation system](/concepts/shared-disks). `writeFile` and `mkdir` handle delegations automatically when possible; for explicit control:

```typescript theme={null}
const inodeId = await fs.resolveInodeId("/mydir");
await client.checkout(inodeId);

await bash.exec('echo "hello" > /mydir/newfile.txt');

await client.checkin(inodeId);
```
