SOLFIND
Web Lens
Portal home

Kiroignore - Features - Docs - Kiro

https://kiro.dev/docs/kiroignore/ • 227 KB fetched
Open original page


Kiroignore - 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 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 * * Kiroignore Copy page View as Markdown Kiroignore Copy page View as Markdown The .kiroignore file prevents Kiro from reading specific files in your workspace. Using familiar gitignore syntax, you define patterns for files that should remain private - credentials, secrets, or content you prefer to keep out of agent context. Where supported, ignore patterns apply across the agent's tools - blocked files stay blocked regardless of which tool tries to read them. Before returning file or text search results, Kiro checks each result against your read permissions and ignore rules. Paths and matching content from ignored or unreadable files do not appear in search results. Check the table below for surface availability. Capability IDE CLI Web Mobile Workspace .kiroignore ✓ V3 search — — Global ignore file ( ~/.kiro/settings/kiroignore ) ✓ — — — The IDE enforces .kiroignore across supported agent tools. In CLI V3, support is limited to filtering content-search and filename-search results. Web support is not available yet. Why use .kiroignore? * Security - Prevent Kiro from accessing files containing credentials, API keys, or other sensitive data * Privacy - Exclude confidential information from AI interactions * Compliance - Ensure Kiro doesn't access files that shouldn't be shared with external services * Focus - Keep Kiro's context relevant by excluding large files or build artifacts Setting up workspace ignore To exclude files in a specific project, create a .kiroignore file in your project root (or any subdirectory) and add patterns for files you want to exclude: bash # Secrets and credentials .env .env.* ! .env.example *.pem *.key # Private directories secrets/ private/ Kiro skips any files matching your patterns. IDE CLI The IDE reads ignore filenames from the Agent Ignore Files setting. Open Settings ( Cmd+, on Mac or Ctrl+, on Windows/Linux), search for Agent Ignore Files (setting: kiroAgent.agentIgnoreFiles ), and add .kiroignore to the array. The kiroAgent.agentIgnoreFiles setting accepts an array of filenames: * Use multiple ignore file types simultaneously: [".gitignore", ".kiroignore"] * Set to [] to disable workspace-level ignore files Tip Start with credentials and secrets - these are the highest priority files to protect. You can always expand your patterns as your project evolves. Subdirectory ignore files Like .gitignore , you can place .kiroignore files in subdirectories to override or extend patterns from parent directories. Patterns in subdirectory ignore files take precedence for files within that subdirectory. Global ignore files Kiro automatically honors global ignore files if they exist - no configuration needed: * ~/.kiro/settings/kiroignore - Your global Kiro ignore patterns * Git's global ignore file (configured via core.excludesfile in your git config) - only applied in git repositories Use global ignore files for patterns you want applied across all your projects. Pattern syntax .kiroignore uses standard gitignore syntax: Pattern Effect file.txt Ignore specific file *.log Ignore by extension folder/ Ignore directory **/temp Ignore in any subdirectory !keep.txt Don't ignore (negation) Info You cannot re-include a file if a parent directory is excluded. For example, if you ignore secrets/ , adding !secrets/public.txt won't work. To include specific files from a directory, use more specific patterns instead of excluding the entire directory. Examples Protecting API keys and secrets bash # Environment files with credentials .env .env.local .env.production # Keep the template accessible ! .env.example # Certificate and key files *.pem *.key *.p12 credentials/ Excluding build artifacts and data files bash # Build outputs dist/ build/ .next/ # Data files *.sql *.dump data/exports/ Team compliance setup bash # Customer data directories customer-data/ pii/ # Audit and compliance docs compliance/internal/ audit-reports/ Info Use .kiroignore when you need different rules for agent access vs. version control, or to block files that are tracked in git but shouldn't be read by Kiro. Best practices * Use comments to document why files are ignored - helpful for team members * Test patterns by asking Kiro to read an ignored file - it will indicate access is blocked * Review patterns periodically as your project structure evolves * Coordinate with your team on global patterns for consistent behavior across workspaces Page updated: August 21, 2026 Compaction Checkpoints and rewind

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. Checkpoints and rewind [direct]
  52. Built-in tools [direct]
  53. Configuration scopes [direct]
  54. What's new in 1.0 [direct]
  55. Setup & First Run [direct]
  56. Editor [direct]
  57. Chat [direct]
  58. Experimental [direct]
  59. Troubleshooting [direct]
  60. 0.x reference [direct]
  61. What's new in 3.0 [direct]
  62. Setup & First Run [direct]
  63. Terminal UI [direct]
  64. Chat [direct]
  65. Voice mode [direct]
  66. Headless mode [direct]
  67. ACP [direct]
  68. Auto complete [direct]
  69. Experimental [direct]
  70. 2.x reference [direct]
  71. Quick start [direct]
  72. Installation [direct]
  73. Running 24/7 [direct]
  74. Chat [direct]
  75. Agent Capabilities [direct]
  76. Features [direct]
  77. Interfaces [direct]
  78. Apps [direct]
  79. System & storage [direct]
  80. Configuration [direct]