name: find
about: Semantic file finder — finds files by meaning, not just name
clipboard: false
args:
- name: path
short: 'p'
input: string
default: .
help: 'Directory to search in (default: current)'
- name: query
short: 'q'
input: string
help: What to find — describe in natural language
actions:
- tag: tag_files
run: cmd
expect: list
action: find {path} -type f -exec grep -Iq . {} \; -print
- tag: tag_content
run: cmd
expect: string
action: |
cat << 'EOF'
[Task]
Check if the [Content] code/comments contain the technical [Query] word, function name, or meaning.
If YES — print ONLY the [File] path inside brackets: <{tag_files}>
If NO — print ONLY: <->
[Query]
{query}
[Content]
EOF
cat "{tag_files}"
cat << 'EOF'
[File]
{tag_files}
EOF
- tag: tag_matches
run: small
expect: list
action: '{tag_content}'
- tag: tag_filtered
run: value
expect: string
action: '{tag_matches|trim:<->|resolve}'
- tag: tag_find
run: value
expect: string
action: '{tag_filtered|uniq|trim|join}'