SOLFIND
Web Lens
Portal home

Code intelligence - Built-in tools - Features - Docs - Kiro

https://kiro.dev/docs/tools/code-intelligence/ • 318 KB fetched
Open original page


Code intelligence - Built-in tools - Features - Docs - Kiro Loading image... Product * About Kiro * IDE * CLI * Web * Mobile * Crew * Pricing * Downloads For * Enterprise * Startups * Students Community * Overview * Ambassadors * Discord * Events * Powers * Shop * Showcase Resources * Docs * Blog * Changelog * FAQs * Report a bug * Suggest an idea * Billing support Social * * * * * * * English Site Terms License Responsible AI Policy Legal Privacy Policy Cookie Preferences English Loading image... * Apps * CLI * Web * Enterprise * Pricing * Docs * Community * Resources SIGN IN DOWNLOADS Loading image... Get Started Installation Authentication Your first project Models Overview Available models Reasoning effort Features How Kiro works Specs Steering Hooks MCP Permissions Custom agents Agent Skills Powers Cloud sessions Compaction Kiroignore Checkpoints and rewind Built-in tools Web tools Code intelligence Configuration scopes IDE 1.x What's new in 1.0 Setup & First Run Editor Chat Experimental Troubleshooting 0.x reference CLI What's new in 3.0 Setup & First Run Terminal UI Chat Voice mode Headless mode ACP Auto complete Experimental 2.x reference Crew Quick start Installation Running 24/7 Chat Agent Capabilities Features Interfaces Apps System & storage Configuration Security Troubleshooting Web Setup & First Run Identity Center Connect your repositories Working with the agent Autonomous mode Automations Memory Configuration Sync Sandbox Mobile - Preview Overview Commands and Reference CLI commands Slash commands Built-in tools Exit codes Settings Billing Overview Managing your subscription Upgrading your plan Downgrading your plan Cancelling your plan Purchasing add-on credits Managing your payments Managing usage notifications Managing your taxes Contacting billing support Deleting your account Related questions Enterprise Concepts Onboarding quickstart Connecting your identity provider Deployment options Subscribe your team Manage subscriptions Governance Monitor and track Settings Managed updates Billing IAM Supported regions Privacy and Security Overview Data protection Code references Compliance validation Infrastructure security IAM permissions Firewalls, proxies, and data perimeters VPC endpoints (AWS PrivateLink) Guides Overview Language support Learn by playing Migration Migrating from Q Developer Migrating from VSCode Upgrading from Q CLI * Docs * * Features * * Built-in tools * * Code intelligence Copy page View as Markdown Code intelligence Copy page View as Markdown Code intelligence provides two complementary layers of code understanding: * Tree-sitter (built-in) - Out-of-the-box code intelligence for 18 languages. Search symbols, get document outlines, and look up definitions without installing anything extra. * LSP integration (optional) - Enhanced precision with find references, go-to-definition, hover docs, rename refactoring, and diagnostics. Requires language server installation. All tree-sitter features below are cross-surface (IDE, CLI, Web, Mobile). LSP features require a language server and are available on IDE and CLI only. Capability Requires LSP Symbol search (fuzzy) — Document symbols — Pattern search (AST) — Pattern rewrite (AST) — Codebase overview — Find references ✓ Go to definition ✓ Rename symbol ✓ Get diagnostics ✓ Hover documentation ✓ Info LSP features (find references, go-to-definition, rename, diagnostics, hover) are available on IDE and CLI only. They require a language server installed for your language. Supported languages Bash, C, C++, C#, Elixir, Go, Java, JavaScript, Kotlin, Lua, PHP, Python, Ruby, Rust, Scala, Swift, TSX, TypeScript Symbol search Find functions, classes, and methods by name with fuzzy matching: > Find the UserRepository class Searching for symbols matching: "UserRepository" (using tool: code) ✓ Found 1 match Class UserRepository at src/repositories/user.repository.ts:15:1 Pattern search AST-based structural code search. Find code by structure, not just text. Metavariables Pattern Matches $VAR Single node (identifier, expression) $$$ Zero or more nodes (statements, parameters) Examples javascript // Find all console.log calls pattern : console . log ( $ ARG ) language : javascript // Find all async functions pattern : async function $ NAME ( $$$ PARAMS ) { $$$ } language : typescript // Find all .unwrap() calls pattern : $ E . unwrap ( ) language : rust Pattern rewrite Automated code transformations using AST patterns: javascript // Convert var to const pattern : var $ N = $ V replacement : const $ N = $ V language : javascript // Modernize hasOwnProperty pattern : $ O . hasOwnProperty ( $ P ) replacement : Object . hasOwn ( $ O , $ P ) language : javascript // Convert unwrap to expect pattern : $ E . unwrap ( ) replacement : $ E . expect ( "unexpected None" ) language : rust Codebase overview Get a high-level overview of a workspace or directory: IDE CLI The agent uses code intelligence automatically when exploring your project. Ask "give me an overview of this codebase" or "what does this project do?" Documentation generation Generate project documentation based on codebase analysis: IDE CLI Ask the agent: "Generate a README for this project" or "Create an AGENTS.md file." LSP integration With a language server installed, code intelligence gains additional precision: * Find references - locate all usages of a symbol * Go to definition - navigate to where a symbol is defined * Rename symbol - rename across the codebase * Get diagnostics - errors and warnings for a file * Hover documentation - type information at a position Info LSP features require language server installation. See language-specific guides: TypeScript/JavaScript , Python , Java . In the IDE, LSP-backed capabilities come from the language extensions you already have installed. On the CLI, enable them per workspace with /code init - see the setup reference below. Setting up LSP on the CLI LSP is optional and workspace-scoped The built-in tree-sitter features work out of the box with no initialization needed. You only need /code init for the enhanced LSP features. Code intelligence is configured per workspace, not globally - each project maintains its own LSP settings independently. How it works Kiro CLI spawns LSP server processes in the background that communicate via JSON-RPC over stdio. When you initialize a workspace, it detects languages from project markers (like package.json , Cargo.toml ) and file extensions, then starts the appropriate language servers. These servers continuously analyze your code and maintain an index of symbols, types, and references. When you make queries, Kiro translates your natural language into LSP protocol requests, sends them to the relevant server, and formats the responses back into readable output. Initialize LSP Run this slash command in your project root: /code init This creates .kiro/settings/lsp.json and starts language servers: ✓ Workspace initialization started Workspace: /path/to/your/project Detected Languages: ["python", "rust", "typescript"] Project Markers: ["Cargo.toml", "package.json"] Available LSPs: ○ clangd (cpp) - available ○ gopls (go) - not installed ◐ jdtls (java) - initializing... ✓ pyright (python) - initialized (687ms) ✓ rust-analyzer (rust) - initialized (488ms) ○ solargraph (ruby) - not installed ✓ typescript-language-server (typescript) - initialized (214ms) Status indicators: ✓ initialized and ready · ◐ currently initializing · ○ available (installed but not needed) · ○ not installed * Restart LSP servers: if language servers shut down or become unresponsive, use /code init -f . * Auto-initialization: after the first /code init , Kiro CLI automatically initializes code intelligence on startup when .kiro/settings/lsp.json exists in the workspace. * Disabling: delete .kiro/settings/lsp.json to disable. Re-enable anytime with /code init . Supported LSP servers Language Extensions Server Install command TypeScript/JavaScript .ts , .js , .tsx , .jsx typescript-language-server npm install -g typescript-language-server typescript Rust .rs rust-analyzer rustup component add rust-analyzer Python .py pyright pip install pyright Go .go gopls go install golang.org/x/tools/gopls@latest Java .java jdtls brew install jdtls (macOS) Ruby .rb solargraph gem install solargraph C/C++ .c , .cpp , .h , .hpp clangd brew install llvm (macOS) or apt install clangd (Linux) Kotlin .kt , .kts kotlin-language-server brew install kotlin-language-server Using language servers Query semantic code intelligence with natural language - search symbols, navigate definitions, find references, rename across files, get diagnostics, view documentation, and discover available APIs: > Find references of Person class Finding all references at: auth.ts:42:10 1. src/auth.ts:42:10 - export function authenticate(...) 2. src/handlers/login.ts:15:5 - authenticate(credentials) 3. src/handlers/api.ts:89:12 - await authenticate(token) > Dry run: rename the method "FetchUser" to "fetchUserData" Dry run: Would rename 12 occurrences in 5 files > What methods are available on the s3Client instance? Available completions: 1. putObject - Function: (params: PutObjectRequest) => Promise<PutObjectOutput> 2. getObject - Function: (params: GetObjectRequest) => Promise<GetObjectOutput> 3. deleteObject - Function: (params: DeleteObjectRequest) => Promise<DeleteObjectOutput> Custom language servers Add custom language servers by editing .kiro/settings/lsp.json : json { "languages" : { "mylang" : { "name" : "my-language-server" , "command" : "my-lsp-binary" , "args" : [ "--stdio" ] , "file_extensions" : [ "mylang" , "ml" ] , "file_patterns" : [ "Mylangfile" , "mylang.config.*" ] , "project_patterns" : [ "mylang.config" ] , "exclude_patterns" : [ "**/build/**" ] , "multi_workspace" : false , "initialization_options" : { "custom" : "options" } , "request_timeout_secs" : 60 } } } Fields: * name : Display name for the language server * command : Binary/command to execute * args : Command line arguments (usually ["--stdio"] ) * file_extensions : File extensions this server handles * file_patterns : Optional list of glob patterns matched against the full filename. Use this for language servers that target specific filenames without a standard extension, like Dockerfile , Dockerfile.* , or docker-compose*.yml . Exact matches win over globs, and more specific globs win over broader ones regardless of declaration order. * project_patterns : Files that indicate a project root (e.g., package.json ) * exclude_patterns : Glob patterns to exclude from analysis * multi_workspace : Set to true if the LSP supports multiple workspace folders (default: false) * initialization_options : LSP-specific configuration passed during initialization * request_timeout_secs : Timeout in seconds for LSP requests. Default is 60. After editing, restart Kiro CLI to load the new configuration. CLI commands Command Purpose /code init Initialize code intelligence in the current directory /code init -f Force re-initialization (restart all LSP servers) /code status Show workspace status and LSP server states /code overview [path] [--silent] Codebase structure overview /code summary Interactive documentation generation /code logs Display LSP logs for troubleshooting /code logs options: -l, --level <LEVEL> filter (ERROR, WARN, INFO, DEBUG, TRACE; default ERROR) · -n, --lines <N> number of lines (default 20) · -p, --path <PATH> export logs to a JSON file. Troubleshooting Issue Cause(s) Solution Code tool is not enabled for this agent Agent doesn't have the code tool in its tool list Add "code" to the agent's tools array, or use @builtin to include all built-in tools, or use @builtin/code Workspace is still initializing LSP servers are starting up Wait and try again. If servers crashed, use /code init -f to restart LSP initialization failed Check logs for details: /code logs -l ERROR No symbols found Language server is still indexing, file has syntax errors, or symbol name doesn't match Check the file for errors, try broader search terms No definition found Position doesn't point to a symbol Verify the row and column numbers point to a symbol name Not every language server supports every operation (some may not support rename or formatting), and large codebases can be slow to index initially. Permissions Symbol lookups and code analysis within your workspace run without prompting. Operations targeting files outside the workspace require approval. Next steps * Built-in tools overview - full tool catalog * Language support guides - per-language setup Page updated: August 4, 2026 Web tools Configuration scopes

Links found on this page

  1. About Kiro [direct]
  2. IDE [direct]
  3. CLI [direct]
  4. Web [direct]
  5. Mobile [direct]
  6. Crew [direct]
  7. Pricing [direct]
  8. Downloads [direct]
  9. Enterprise [direct]
  10. Startups [direct]
  11. Students [direct]
  12. Overview [direct]
  13. Ambassadors [direct]
  14. Discord [direct]
  15. Events [direct]
  16. Powers [direct]
  17. Shop [direct]
  18. Showcase [direct]
  19. Docs [direct]
  20. Blog [direct]
  21. Changelog [direct]
  22. FAQs [direct]
  23. Report a bug [direct]
  24. Suggest an idea [direct]
  25. Billing support [direct]
  26. Site Terms [direct]
  27. License [direct]
  28. Responsible AI Policy [direct]
  29. Legal [direct]
  30. Privacy Policy [direct]
  31. Cookie Preferences [direct]
  32. Loading image... [direct]
  33. SIGN IN [direct]
  34. Installation [direct]
  35. Authentication [direct]
  36. Your first project [direct]
  37. Overview [direct]
  38. Available models [direct]
  39. Reasoning effort [direct]
  40. How Kiro works [direct]
  41. Specs [direct]
  42. Steering [direct]
  43. Hooks [direct]
  44. MCP [direct]
  45. Permissions [direct]
  46. Custom agents [direct]
  47. Agent Skills [direct]
  48. Powers [direct]
  49. Cloud sessions [direct]
  50. Compaction [direct]
  51. Kiroignore [direct]
  52. Checkpoints and rewind [direct]
  53. Built-in tools [direct]
  54. Web tools [direct]
  55. Configuration scopes [direct]
  56. What's new in 1.0 [direct]
  57. Setup & First Run [direct]
  58. Editor [direct]
  59. Chat [direct]
  60. Experimental [direct]
  61. Troubleshooting [direct]
  62. 0.x reference [direct]
  63. What's new in 3.0 [direct]
  64. Setup & First Run [direct]
  65. Terminal UI [direct]
  66. Chat [direct]
  67. Voice mode [direct]
  68. Headless mode [direct]
  69. ACP [direct]
  70. Auto complete [direct]
  71. Experimental [direct]
  72. 2.x reference [direct]
  73. Quick start [direct]
  74. Installation [direct]
  75. Running 24/7 [direct]
  76. Chat [direct]
  77. Agent Capabilities [direct]
  78. Features [direct]
  79. Interfaces [direct]
  80. Apps [direct]