dir
List directory contents in column-aligned JSON format. Supports recursive depth, hidden files, symlink following, streaming, and result limiting.
Instructions
List directory contents in column-aligned format — alias for 'ls' producing structured JSON. Read-only, no side effects. Supports recursive depth, hidden files, symlink following, streaming (NDJSON), and result limiting. Returns per-entry metadata: type, size, permissions, modification time. Use for clean tabular directory listings. Prefer 'dir' over 'ls' when column-aligned output is desired; prefer 'ls' for default list format. Not for extended metadata — use 'vdir' for verbose output or 'stat' for single-file detail. See also 'ls', 'vdir', 'stat'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | File or directory to list. | . |
| limit | No | Maximum entries to emit. | |
| stream | No | Emit NDJSON one entry per line for large directories. | |
| max_depth | No | Maximum recursive depth. | |
| recursive | No | Recurse into directories. | |
| include_hidden | No | Include names starting with '.'. | |
| follow_symlinks | No | Follow symlinked directories. |