llmignore

Like .gitignore, but it tells AI tools what not to read. Keep secrets, dependencies and build output out of your AI context.

llmignore scanning a repo for exposed secrets and showing stats

Install

# run it, no install
npx llmignore-cli init

# or
cargo install llmignore-cli
curl -fsSL https://raw.githubusercontent.com/horiastanxd/llmignore/main/install.sh | sh

The package is llmignore-cli; the installed command is llmignore.

Why

Stop leaking secrets

.env, *.pem, id_rsa, .npmrc - gone from AI context by default.

Smaller, cheaper context

Skip node_modules, dist, lockfiles, binaries. Less noise, lower cost.

One file, every tool

sync mirrors .llmignore to .cursorignore, .aiexclude, .geminiignore and more.

Native speed

Built on ripgrep's engine. Tens of thousands of files in milliseconds.

Quick start

llmignore init     # write a .llmignore with strong defaults
llmignore scan     # any secrets currently exposed to AI? (exit 1 if yes)
llmignore sync     # mirror it into .cursorignore, .aiexclude, ...
llmignore          # summary: what AI sees vs what it skips