qi command reference
qi searches a SourceMinder index: identifiers and symbol metadata,
not arbitrary text. General shape:
qi PATTERN [PATTERN...] [OPTIONS].
Type these into the terminal on the home page —
the browser demo picks its database with the Project menu, so
--db-file is never needed there.
Quick start
qi user | find symbol (exact match, case-insensitive) |
qi user% -i func var | only functions/variables, names starting with user |
qi '*user*' -x noise -C 3 | contains user; skip comments/strings; 3 lines of context |
qi getUserById --def -e | show the full definition |
qi % -f query-index.c --toc | show a file's structure |
Patterns
Patterns are case-insensitive and exact by default.
Wildcards: % or * match any characters,
_ or . match one character
(* needs shell quoting outside the browser).
Prefer prefix patterns like get* for speed.
To search for something that starts with a dash, escape it:
qi '\--help'.
Match
-i, --include-context TYPE... | only these context types |
-x, --exclude-context TYPE... | exclude context types |
-x noise | shorthand: exclude comments and strings |
--and [RANGE] | require all patterns on the same or nearby lines |
Filter
-f, --file PATTERN... | filter files: database.c, .py, shared/, shared/*.c |
-p, --parent PATTERN | filter by parent symbol (finds member access) |
-s, --scope PATTERN | filter by scope (public, private, protected; Rust: pub, pub(crate)) |
-ns, --namespace PATTERN | filter by namespace |
-m, --modifier PATTERN | filter by modifier (static, const, inline, …) |
-c, --clue PATTERN | show clue column (context hints) |
-t, --type PATTERN | filter by type annotation |
-d, --definition [0|1] | show D column; -d 0 usages, -d 1 definitions |
--parent-type PATTERN... | filter by parent's declared type (resolves parent to its definition) |
--def | definitions only |
--usage | usages only |
--lines LINE|START-END | filter by line or range |
-w, --within SYMBOL... | search inside definitions |
-l, --limit NUM | limit matches |
-lpf, --limit-per-file NUM | limit matches per file |
Display
-e, --expand | show full definitions |
-C, --context NUM | lines before and after |
-A, --after-context NUM | lines after |
-B, --before-context NUM | lines before |
--files | list matching files only |
--toc | file table of contents; use with -f |
--columns COL... | choose columns: line sym ctx par scope ns mod clue type d |
-v, --verbose | all columns |
--full | full column names |
--raw | source only; useful with -e/-A/-B |
-q, --quiet | drop banner/footer chrome; keep header + rows |
--debug | show the generated SQL |
Context types
Use full or abbreviated forms with -i/-x, case-insensitive
(-i func, -i function, and -i FUNC are the same).
| Full | Short | Meaning |
argument | arg | function parameters |
call | | function/method calls |
case | | enum values/cases |
class | | class definitions |
comment | com | words from comments |
enum | | enum type definitions |
exception | exc | exception classes |
export | exp | export statements |
filename | file | filename without extension |
function | func | function/method definitions |
goto | | goto statements (C) |
import | imp | import/include statements |
interface | iface | interface definitions |
label | | labels (for goto in C) |
lambda | lam | lambda/arrow functions |
macro | | preprocessor macros |
namespace | ns | namespace/package declarations |
property | prop | class/struct fields |
string | str | words from string literals |
trait | | trait definitions (PHP) |
type | | type definitions (struct, enum, …) |
variable | var | variables and constants |
CLI-only options
These apply when running qi locally, not in the browser demo:
--db-file PATH | database path (the demo's Project menu does this) |
~/.smconfig | config file, [qi] section; CLI flags override it |
Tip for AI coding agents: --def -e --raw prints a definition as
plain source, ready to use as an edit anchor.
← back to the terminal