Quick Start
Navigate Your Code
Section titled “Navigate Your Code”cd your-project
krait find symbol MyStruct # locate definitionkrait list symbols src/lib.rs # semantic outlinekrait read symbol MyStruct # extract full bodyUnderstand APIs
Section titled “Understand APIs”krait hover MyStruct # type info + docskrait check # LSP diagnosticsEdit Semantically
Section titled “Edit Semantically”# Replace a symbol body via stdincat new_impl.rs | krait edit replace MyStruct
# Insert code around a symbolecho 'fn helper() {}' | krait edit insert-after MyStruct
# Cross-file renamekrait rename OldName NewNameFix and Format
Section titled “Fix and Format”krait fix # apply LSP quick fixeskrait format src/lib.rs # run LSP formatterAgent Workflow Example
Section titled “Agent Workflow Example”Here’s a typical agent workflow for fixing a bug:
krait find symbol PaymentProcessor # 1. Locate logickrait read symbol PaymentProcessor # 2. Read the bodykrait find refs PaymentProcessor # 3. Check impactkrait check src/payments.ts # 4. Identify errorscat fix.ts | krait edit replace PaymentProcessor # 5. Apply fixkrait check src/payments.ts # 6. Verify