Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

pun list-files

List the files a command selects after paths and exclusions.

pun list-files prints one path per line, sorted and relative to the project root.

pun list-files
pun list-files --command analyse
pun list-files -0 app | xargs -0 wc -l
pun list-files --format json

File selection

Selection Paths Exclusions
Default [files] paths, otherwise the project root [files] exclude
--command format Shared paths Format exclusions, Pint finder rules, and Blade unless enabled
--command lint Shared paths Lint exclusions, Blade, and default excluded directories
--command analyse [analyse] paths, otherwise shared paths Analyse exclusions, Blade, and default excluded directories

Command exclusions include [files] exclude. The default excluded directories are bootstrap/cache, build, node_modules, and storage.

Path arguments replace the configured paths. Outside format, exclusions still apply to files you name. vendor/ is never listed, though analysis reads it for symbols.

For example, with this config the default selection includes app and tests, and the analyse selection includes only app:

[files]
paths = ["app", "tests"]
exclude = ["storage/**"]

[analyse]
exclude = ["tests/**"]

Options

Flag Meaning
--command format|lint|analyse Select a command’s file set.
-0, --zero-terminate End each path with a NUL byte, for xargs -0.
--format json Print a JSON array.
--config <path> Read another pun.toml.

Under a coding agent, the summary line goes to stderr, so stdout stays safe to pipe.

Last updated on

Was this page helpful?