Navigation Commands
find symbol
Section titled “find symbol”Locate the definition of a symbol anywhere in your project.
krait find symbol <name>Example:
$ krait find symbol createOrderfn createOrder src/orders/service.ts:42find refs
Section titled “find refs”Find all usages of a symbol across the codebase.
krait find refs <name>Example:
$ krait find refs createOrdersrc/orders/handler.ts:18src/orders/service.ts:42src/tests/orders.test.ts:15Note:
find refsscans all files in your project. On large codebases it may take 1-2s. Subsequent calls are faster.
list symbols
Section titled “list symbols”Get a semantic outline of a file — functions, classes, types.
krait list symbols <path>krait list symbols <path> --depth 2 # include methods/fieldsExample:
$ krait list symbols src/orders/service.tsclass OrderService [12] fn constructor [13] fn validateItems [28] fn createOrder [42] fn cancelOrder [67]read file
Section titled “read file”Read a file with line numbers.
krait read file <path>krait read file <path> --from 10 --to 50read symbol
Section titled “read symbol”Extract the body of a specific symbol.
krait read symbol <name>krait read symbol <name> --signature-only # declaration onlyExample:
$ krait read symbol createOrderasync function createOrder(input: CreateOrderInput): Promise<Order> { const items = await this.validateItems(input.items); // ...}Get type information and documentation for a symbol.
krait hover <symbol>Example:
$ krait hover OrderServiceclass OrderService extends BaseService<Order>Manages the full order lifecycle including payment, fulfillment, and cancellation.src/orders/service.ts:12