Overview
Chisel parses source code into semantic chunks—functions, classes, methods, types—preserving the structure and context that makes code meaningful. Feed these chunks to an embedder, store them in a vector database, and search code by what it does rather than what it says.
The Idea
Code search should understand code. Splitting files at arbitrary line boundaries destroys the very structure that gives code meaning. A function split in half is two meaningless fragments. A method without its class context is an orphan.
Chisel asks: what if we chunked code the way developers think about it?
The Implementation
Chisel provides:
- Language providers — Parsers for Go, TypeScript, JavaScript, Python, Rust, and Markdown
- Semantic extraction — Functions, methods, classes, interfaces, types, enums, modules
- Context preservation — Parent chain for nested definitions (method → class → module)
- Line mapping — Precise source locations for navigation and display
- Uniform interface — Same
Providercontract across all languages
What It Enables
Chisel is the chunking layer for code intelligence:
- Semantic search — Find code by meaning, not keywords
- Code retrieval — Fetch relevant context for LLM prompts
- Documentation generation — Extract structure for API docs
- Codebase understanding — Map relationships between components
Next Steps
- Quickstart — Get productive in minutes
- Concepts — Understand the core abstractions
- Architecture — Learn how chisel works internally