list-cwd-files command recursively lists all files in the specified directory with options to filter results using glob patterns.
Usage
Flags
Directory to list files from
Only include files matching these glob patterns
Exclude files matching these glob patterns
Only display the count of matching files
Display help for the list-cwd-files command
Examples
List all files in current directory
Filter TypeScript files
.ts extension).
Exclude test files
Multiple include patterns
.ts and .tsx files.
Multiple exclude patterns
Count matching files
List files in specific directory
src directory.
Complex filtering example
How it works
Thelist-cwd-files command:
- Recursively scans - Walks through all subdirectories from the specified path
- Applies filters - Matches files against include/exclude glob patterns
- Lists results - Outputs matching file paths or count
Use cases
- File discovery - Find all source files in a directory
- Quick audits - Count files by type or pattern
- Script input - Generate file lists for other tools
- Codebase exploration - Understand project structure
- Pre-analysis - Identify files before running other rev-dep commands
Related commands
lines-of-code- Count effective lines of codeentry-points- Discover project entry pointsfiles- List dependency tree for an entry point
