.codanna/settings.toml — embedding model, indexed paths, language resolvers, logging, and guidance templates.
Directory Structure
.codannaignore
Codanna respects.gitignore and adds its own .codannaignore:
Semantic Search
Local Models
Remote Embedding Backend
Use an OpenAI-compatible HTTP server instead of local models:
See Semantic Search for provider examples and migration details.
Changing Models
Switching between local models or between local and remote requires re-indexing:Indexed Paths
Language Configuration
Project resolution reads build configuration files to determine source roots and module paths. This enables:- Correct module path generation (e.g.,
org.example.servicefor Java,Corefor Swift) - Path alias resolution (e.g.,
@app/*in TypeScript) - Cross-package relationship tracking
.codanna/index/resolvers/. The cache rebuilds during codanna index when config file contents change (SHA-based invalidation).
See Project Resolvers for configuration details for all 8 supported languages.
TypeScript
tsconfig.json to resolve path aliases like @app/* and baseUrl settings.
Function wrappers
Many TypeScript codebases define functions through higher-order wrappers:const View = memo(() => {}), const Input = forwardRef((props, ref) => {}), const load = wrap("load")(function* () {}). By default the parser records these bindings as constants because the value is a call expression, so they carry no call graph. Declare the wrapper callee names to register such bindings as functions and index the wrapped body:
- A declared name matches a member expression’s full dotted text (
Effect.genmatchesEffect.gen(...)only) or its final property name (memomatches bothmemo(...)andReact.memo(...)). Curried chains (Effect.fn("name")(fn)) resolve through the innermost callee. - Calls inside the wrapped body attribute to the binding, so
find_callers,get_calls, andanalyze_impactcover wrapper-defined functions. - The list is empty by default; indexing behavior is unchanged until you declare names.
- After editing the list, run
codanna index --force— changing parser options changes what the index contains, and the emission gate does not detect configuration edits.
codanna index with an error naming this key.
Java
pom.xml or Gradle build.gradle to detect source roots (src/main/java, src/test/java). Generates module paths like org.springframework.samples.petclinic.owner.
Swift
Package.swift to detect source roots. Uses SPM conventions (Sources/, Tests/) or custom path: specifications. Generates module paths like Networking, Cache, General.
Logging
View Configuration
Next Steps
Project Resolvers
Configuration for Go, Python, Kotlin, PHP, C#, and more.
Debugging
Troubleshoot indexing and search issues.