ls
List directory contents as structured JSON with per-entry metadata for programmatic inspection. Supports recursion, hidden files, symlinks, and NDJSON streaming for large directories.
Instructions
List directory contents as structured JSON with per-entry metadata (type, size, permissions, modification time). Read-only, no side effects. Supports recursive depth, hidden file inclusion, symlink following, result limiting, and NDJSON streaming for large directories. Use for programmatic directory inspection. Not for column-aligned output — use 'dir'. Not for verbose metadata — use 'vdir'. Not for single-file detail — use 'stat'. See also 'dir', 'vdir', 'stat'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| follow_symlinks | No | Follow symlinked directories. | |
| include_hidden | No | Include names starting with '.'. | |
| limit | No | Maximum entries to emit. | |
| max_depth | No | Maximum recursive depth. | |
| path | No | File or directory to list. | . |
| recursive | No | Recurse into directories. | |
| stream | No | Emit NDJSON one entry per line for large directories. |