Skip to main content

Overview

Find files with intelligent filtering and gitignore support. Produces compact tree-style output instead of verbose line-by-line results.

Syntax

Options

Supports both RTK-specific and native find syntax:
string
Glob pattern to match (e.g., *.rs, test_*.py)
string
default:"."
Directory to search in
string
Native find: match filename pattern
string
Native find: file type (f=file, d=directory)
number
Native find: maximum search depth

Examples

Find by Pattern

Output:

Find with Native Syntax

Limit Depth

Features

  • Gitignore-aware: Automatically skips files in .gitignore
  • Grouped output: Files organized by directory
  • Truncation: Large result sets show summary with file count
  • Dual syntax: Supports both simple glob patterns and native find flags

Token Savings

Average token reduction: 80% For large projects with 1000+ matches, shows first 50 files + count summary instead of full list.

Implementation

Source: src/find_cmd.rs Uses ignore crate for gitignore support and intelligent file traversal.