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

# Exec: reaching into a box

> One verb, two forms — a shell line or an exact argv

`dabs exec` is the single reach-in verb. The `--` separator picks the form.

<Info>Screens verified by `tests/test_exec.py`.</Info>

## Shell form (no `--`)

Tokens are joined into one `sh -c` line **inside the box** — pipes, globs, and
`&&` work:

```bash theme={null}
dabs exec sh-________ 'cd /work && echo *'
```

```text theme={null}
dabs.yaml  data
```

## Exact-argv form (`--`)

Everything after `--` is an exact argv, no shell involved — nothing expands:

```bash theme={null}
dabs exec sh-________ -- echo '*'
```

```text theme={null}
*
```

Use it when arguments must arrive untouched (paths with spaces, `$` you don't
want expanded, program flags that look like dabs flags).

## Knowing you're in a box

dabs sets `DABS_NAME` inside every box to the box's instance name, so a
program can detect it is sandboxed:

```bash theme={null}
dabs exec sh-________ 'echo I am $DABS_NAME'
```

```text theme={null}
I am shell-____________
```

## Handles and errors

Any unambiguous prefix of a node id (or instance name) resolves, git-style. A
name that matches nothing is a clean error:

```text theme={null}
dabs: no box matches "nothere" (see dabs ls)
```

A name matching **more than one** box is refused too — dabs never guesses
which box you meant. Disambiguate with more characters, from `dabs ls`.
