# list — List Keys in the Vault

**Script name:** `list`

**Script location:** [`scripts/list.ts`](../../../scripts/list.ts)

**Invoke:**
```bash
npx --yes tsx .opencode/skills/templating-vault/scripts/list.ts \
  [--prefix PREFIX] [--recursive] [--config PATH] [--store-dir SPEC...]
```

**CRITICAL:** Always invoke the script using bash and the format noted above.

## Synopsis

```
list.ts [--prefix PREFIX] [--recursive] [--config PATH] [--store-dir SPEC...]
```

Lists keys that have values (keys with `value` files). Only value-bearing keys
appear — namespace-only directories are excluded. Without `--prefix`, lists from
the root. Without `--recursive`, lists only immediate children.

## Arguments

| Flag | Type | Default | Description |
|------|------|---------|-------------|
| `--prefix PREFIX` | string | `""` (root) | Key prefix to list under |
| `--recursive` | flag | false | Include all descendants, not just immediate children |

## Output (stdout)

```json
{
  "prefix": "global.credentials",
  "recursive": true,
  "keys": ["global.credentials.forgejo_pat", "global.credentials.forgejo_username"],
  "count": 2
}
```

## Exit Codes

| Code | Meaning |
|------|---------|
| 0 | Success |
| 1 | Fatal error |
