What is query?
The query command searches the CIAK database for a specific type of symbol. Unlike search (which searches across all types), query lets you target a single category such as functions, classes, variables, or files.
ciak query [OPTIONS] <TERM>
Behavior and options
| Option | Description |
|---|---|
<TERM> | Search term (required, positional) |
-t, --type <TYPE> | Symbol type to search: function, class, variable, file (default: function) |
-p, --project <PROJECT> | Project to search in |
-L, --language <LANG> | Filter results by language |
-l, --limit <N> | Maximum results to return (default: 20) |
--semantic | Enable semantic vector search (requires embeddings) |
--hybrid | Combine text and vector search |
--embedding-model <MODEL> | Specify embedding model for semantic search |
Examples
Example 1 — Search for functions
ciak query "authenticate"
Searches for functions matching "authenticate" (default type is function).
Example 2 — Search for classes in TypeScript
ciak query --type class --language typescript "Service"
Example 3 — Semantic search for variables
ciak query --type variable --semantic "database connection pool"
Example 4 — Hybrid search with a result limit
ciak query "parse" --hybrid --limit 5
Input and output example
Representative CLI output (truncated; exact formatting may vary by version):
Input
ciak query --type class --language typescript "Auth" --limit 3
Output
Query type: class
Search term: Auth
Results: 3
1. AuthService src/auth/service.ts:12
visibility: public
signature: export class AuthService { ... }
2. AuthController src/auth/controller.ts:8
visibility: public
signature: export class AuthController { ... }