● LIVE
OpenAI releases GPT-5 APIIndia AI startup raises $120MBitcoin ETF hits record inflowsMeta Llama 4 benchmarks leakedOpenAI releases GPT-5 APIIndia AI startup raises $120MBitcoin ETF hits record inflowsMeta Llama 4 benchmarks leaked
📅 Sat, 21 Mar, 2026✈️ Telegram
AiFeed24

AI & Tech News

🔍
✈️ Follow
🏠Home🤖AI💻Tech🚀Startups₿Crypto🔒Security🇮🇳India☁️Cloud🔥Deals
✈️ News Channel🛒 Deals Channel
uignore — a .gitignore for AI coding tools
☁️Cloud & DevOps

uignore — a .gitignore for AI coding tools

Home/Cloud & DevOps/uignore — a .gitignore for AI coding tools

AI coding tools are incredibly useful. They can read your codebase, understand context across dozens of files, and make changes in seconds. They can also read your .env file. Your secrets/ directory. Not because they're malicious — but because nothing stops them by default. I built uignore to fix th

⚡Quick SummaryAI generating...
G

Geekfarmer

📅 Mar 21, 2026·⏱ 3 min read·Dev.to ↗
✈️ Telegram𝕏 TweetWhatsApp
📡

Original Source

Dev.to

https://dev.to/geekfarmer/uignore-a-gitignore-for-ai-coding-tools-3h7
Read Full ↗

Claude Code

AI coding tools are incredibly useful. They can read your codebase, understand context across dozens of files, and make changes in seconds.

They can also read your .env file. Your secrets/ directory.
Your SSH keys. Your AWS credentials.

Not because they're malicious — but because nothing stops them by default.

I built uignore to fix this.

What is uignore?

uignore gives you a single .uignore file — same syntax as .gitignore — that blocks file access across all supported AI tools simultaneously.

  gitignore
  # .uignore
  secrets/
  .env
  .env.*
  *.pem
  *.key

Add a path once. Claude Code, Gemini CLI, Cursor, and Windsurf all respect it automatically.

How it works

Each AI tool has a native hook system:


  ┌─────────────┬────────────────┬─────────────────┐
  │    Tool     │      Hook      │ Block mechanism │
  ├─────────────┼────────────────┼─────────────────┤
  │ Claude Code │ PreToolUse     │ exit code 2     │
  ├─────────────┼────────────────┼─────────────────┤
  │ Gemini CLI  │ BeforeTool     │ exit code 2     │
  ├─────────────┼────────────────┼─────────────────┤
  │ Cursor      │ beforeReadFile │ exit code 2     │
  ├─────────────┼────────────────┼─────────────────┤
  │ Windsurf    │ pre_read_code  │ exit code 2     │
  └─────────────┴────────────────┴─────────────────┘


uignore registers a hook with each tool. Before every file read or write, the hook resolves the target path against your .uignore rules.
If it matches — the operation is blocked. The file content never reaches the model.

Getting started

No global install required:

 npx @ottoai/uignore init     # creates a .uignore template
 npx @ottoai/uignore install  # registers hooks for all tools

Then commit to git:

  git add .uignore .claude/settings.json .gemini/settings.json \
          .cursor/hooks.json .windsurf/hooks.json
  git commit -m "chore: add uignore"

Your whole team now has the same protection automatically.
No per-developer setup required.

Syntax
uignore follows .gitignore conventions:

  # Block a directory
  secrets/

  # Block specific file types
  *.pem
  *.key

  # Block .env and all variants
  .env
  .env.*

  # Block everything except README
  *.md
  !README.md

Hierarchical .uignore files are supported — place one in any subdirectory for subtree-specific rules. A global ~/.uignore applies personal rules across every project.

CLI


  uignore check secrets/apikey.txt   # test if a file would be blocked
  uignore list                        # show all active rules
  uignore diff                        # show which tracked files are blocked
  uignore doctor                      # diagnose config problems
  uignore add *.pem                   # add a pattern
  uignore remove *.pem                # remove a pattern

Open source

MIT licensed. Contributions welcome.

  • GitHub: https://github.com/otto-open-labs/uignore
  • npm: https://npmjs.com/package/@ottoai/uignore

If you use an AI tool that isn't supported yet, PRs are open.

Tags:#cloud#dev.to

Found this useful? Share it!

✈️ Telegram𝕏 TweetWhatsApp

Read the Full Story

Continue reading on Dev.to

Visit Dev.to ↗

Related Stories

☁️
☁️Cloud & DevOps

Majority Element

about 2 hours ago

☁️
☁️Cloud & DevOps

Building a SQL Tokenizer and Formatter From Scratch — Supporting 6 Dialects

about 2 hours ago

☁️
☁️Cloud & DevOps

Markdown Knowledge Graph for Humans and Agents

about 2 hours ago

Moving Beyond Disk: How Redis Supercharges Your App Performance
☁️Cloud & DevOps

Moving Beyond Disk: How Redis Supercharges Your App Performance

about 2 hours ago

📡 Source Details

Dev.to

📅 Mar 21, 2026

🕐 about 2 hours ago

⏱ 3 min read

🗂 Cloud & DevOps

Read Original ↗

Web Hosting

🌐 Hostinger — 80% Off Hosting

Start your website for ₹69/mo. Free domain + SSL included.

Claim Deal →

📬 AiFeed24 Daily

Top 5 AI & tech stories every morning. Join 40,000+ readers.

✦ 40,218 subscribers · No spam, ever

Cloud Hosting

☁️ Vultr — $100 Free Credit

Deploy cloud servers in 25+ locations. From $2.50/mo. No contract.

Claim $100 Credit →
AiFeed24

India's AI-powered tech news hub. Daily coverage of AI, startups, crypto and emerging technology.

✈️🛒

Topics

Artificial IntelligenceStartups & VCCryptocurrencyCybersecurityCloud & DevOpsIndia Tech

Company

About AiFeed24Write For UsContact

Daily Digest

Top 5 AI stories every morning. 40,000+ readers.

No spam, ever.

© 2026 AiFeed24 Media.Affiliate Disclosure — We earn commission on qualifying purchases at no extra cost to you.
PrivacyTermsCookies