seek¶
seek is the interactive search entrypoint for file lists, text matches, file previews, AST symbols, and semantic-style symbol search.
Usage¶
Arguments¶
| Argument | Description |
|---|---|
PATH_OR_SEARCH_TERM |
Directory or file to search, or the search term when no matching path exists. Defaults to the current directory. |
SEARCH_TERM |
Initial query to seed the search UI. |
Mode selection¶
The current implementation resolves modes in this order:
--install-req--semantic--ast--file- default text search
That means seek path query --file --ast will still take the AST path, and --install-req exits before running a search.
Options¶
| Option | Short | Description |
|---|---|---|
--ast |
-a |
Run AST or tree-sitter symbol search |
--semantic |
-s |
Run the semantic-symbol helper workflow |
--extension TEXT |
-E |
Filter file discovery by extension such as .py |
--file |
-f |
File search mode |
--dotfiles |
-d |
Toggle the dotfile-inclusive file-search path |
--rga |
-A |
Swap rg for rga in text-search mode |
--edit |
-e |
Open the selected result in Helix |
--install-req |
-i |
Install expected helper tools and exit |
--max-files INTEGER |
-m |
Maximum files for --semantic; default is 50, and 0 disables the limit |
Current behavior by mode¶
Text search¶
The default mode loads a platform-specific helper script and runs an fzf + rg preview flow.
--rgarewrites that script to useripgrep-allSEARCH_TERMseeds the initial query- when the first argument resolves to a directory, StackOps changes to that directory before launching the search
File search¶
--file runs a file picker based on fzf.
- without
--edit, it previews the file withbat - with
--edit, it adds a second line picker and opens the selected line in Helix - by default, the candidate source is
fd --type file - with
--dotfiles, StackOps does not prepend thefdcandidate source and leaves candidate generation tofzf
Single-file flow¶
If the first argument resolves to a file, seek skips directory search and opens a line-oriented preview for that file instead.
When standard input is piped in and the first argument is a directory, seek captures stdin into a temporary file and opens the same single-file flow against that temp file.
AST search¶
--ast collects repository symbols, shows them with preview, and prints the selected symbol as JSON including:
- type
- name
- path
- file path
- start line
- end line
- docstring
--semantic¶
--semantic runs the semantic helper workflow:
- prompts for a query if
SEARCH_TERMis empty - limits the search set with
--extensionwhen provided - warns and exits when more than
--max-filesfiles would be searched - treats
--max-files 0as unlimited - uses preview selection for the returned results
Dependencies¶
seek --install-req currently installs these helpers:
fzftvbatfdrgrgasemtools
Examples¶
# Default text search in the current directory
seek
# Seed the search with an initial query
seek . "TODO"
# File search with preview
seek src --file
# File search and open the chosen line in Helix
seek src --file --edit
# AST symbol search
seek src --ast
# Semantic helper search
seek src parser --semantic --extension .py
seek src parser --semantic --extension .py --max-files 200
# ripgrep-all text search
seek docs invoice --rga