Generate and manage ignore files — .gitignore, .dockerignore, and 19 more — from a built-in library of 220 templates, plus your own.
neglect is a terminal app for anyone who is tired of copying .gitignore files from gists. Point it at a project and it figures out what's in there — a Cargo.toml means Rust, a Dockerfile means Docker — then suggests the right ignore content for the right project and merges it in without touching anything you already wrote.
detected stack .gitignore - Git templates diff preview
┌───────────────────┐ ┌──────────────────────────┐ ┌────────────────────┐
│ ✓ Rust │ │ ✓ Rust │ │ ### Rust ### │
│ Node → │ │ Node │ │ + target/ │
│ Docker → │ │ ...166 more │ │ + **/*.rs.bk │
└───────────────────┘ └──────────────────────────┘ └────────────────────┘
- Detects your stack.
neglectscans the current directory and recognizes the languages, frameworks, and tools you use — 220 built-in templates, including 166 for.gitignorealone. - Just suggests. Detected templates come pre-selected, but you decide what actually gets written.
- Writes many kinds of ignore files. 21 ignore-file types are built in —
.gitignore,.dockerignore,.npmignore,.hgignore,.helmignore, and more — and each type lists only its own relevant templates, so switching type never shows you irrelevant content. - Merges safely. New rules are appended to your existing file, duplicates are skipped, and each template can be tagged with a
### Name ###header so you always know where a rule came from.
Run neglect with no arguments to open the TUI. It has three panes:
| Pane | What it shows |
|---|---|
| detected stack | The languages and tools found in the current directory. Press Enter on one to jump to the ignore file it suggests. |
| templates | The templates for the active ignore-file type. Type to filter, Space to toggle. |
| diff preview | Exactly what would be written — new lines in green, existing lines muted — before you commit. |
The workflow is: type to search → space to select → Enter to write. A → marker in the stack pane means that stack recommends a different ignore file — Enter jumps you straight to it.
The footer at the bottom of the screen always shows the keys that do something right now, so you never have to memorize this table:
| Key | Action |
|---|---|
| type | Filter the template list as you type |
space |
Toggle a template on/off |
enter |
Write the selected templates (or apply on the diff pane) |
shift+h / shift+l (or ← →) |
Switch panes |
shift+j / shift+k (or ↑ ↓) |
Move the selection / scroll |
tab |
Toggle the ignore-file types list |
shift+s |
Isolate the selected templates (press again to show all) |
shift+n / shift+e / shift+d |
New / edit / delete a template or type |
shift+r |
Rescan the directory |
shift+t |
Switch theme |
shift+y |
Copy the diff preview to the clipboard |
/ |
Search the focused pane |
? |
Help |
esc |
Go back / cancel |
ctrl+c |
Quit |
cd my-rust-project
neglect # opens the TUI — Rust is already detectedThe Rust template is already toggled on. Toggle anything else with Space, glance at the diff preview to confirm, and press Enter to write .gitignore.
If the project also has a Dockerfile, the stack pane marks it with →. Press Enter there and neglect jumps to .dockerignore with the Docker templates suggested — no need to hunt through menus.
Everything the TUI does is also available as commands:
neglect # open the interactive TUI
neglect detect # print the stack detected in this directory
neglect list # list templates for .gitignore
neglect list --type docker # list templates for another ignore-file type
neglect diff Rust Go # preview what 'add' would write
neglect add Rust Go # merge those templates into .gitignore (asks first)
neglect add Rust --type docker # merge into .dockerignore insteadUseful flags:
| Flag | Effect |
|---|---|
--type <name> |
Pick the ignore file to operate on (git, docker, bkp, … or a custom filename) |
--dry-run |
Preview the merge without writing anything |
--yes |
Skip the confirmation prompt |
--fetch |
Download a missing template from the github/gitignore registry |
Run neglect --help for the full reference.
shift+n creates a new template, shift+e opens it in a small built-in editor, and shift+d deletes it. Editing a built-in template copies it into your own library first, so your version overrides the stock one without losing the original.
neglect template new MyStack # scaffold a template
neglect template edit MyStack # open it in $EDITOR
neglect add MyStack # use it
neglect export MyStack # share it as a directory
neglect import ./MyStack # install a shared templateYour templates live in ~/.config/neglect/neglections/<Name>/ — a
template.ignore file with the ignore content, plus an optional metadata.json. Add detection rules and the template appears automatically whenever the matching files are around:
{
"category": "language",
"detect": ["Cargo.toml"],
"detect_suffixes": [".rs"]
}Now a project containing Cargo.toml or .rs files gets your template suggested on startup, just like the built-in ones.
neglect keeps its settings in one JSON file:
| OS | Location |
|---|---|
| Linux | ~/.config/neglect/config.json |
| macOS | ~/Library/Application Support/neglect/config.json |
| Windows | %APPDATA%/neglect/config.json |
You can set the default theme, flip how type labels are displayed (.gitignore - Git vs Git - .gitignore), turn the ### Name ### headers on or off, and add your own ignore-file types.
Prebuilt binaries are attached to each release. To build from source:
zig build -Doptimize=ReleaseFast # the binary lands in zig-out/bin/neglectneglect needs Zig 0.16.0 or later.
neglect is early-stage software. The core loop (detect → suggest → generate) works end to end on Linux, with macOS and Windows builds provided by CI. Expect rough edges: parts of the program may not work entirely as expected, and behavior can change between releases. See CHANGELOG.md for what's been implemented so far.
This software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.
neglect appends ignore rules to your existing files without overwriting them, but you should still review the diff preview before applying anything and keep backups of anything you care about.
neglect was inspired by gitnibble, a Rust-based ignore-file generator. It is an independent implementation: the general idea — and the gaps in the original, like handling only .gitignore — shaped the design of neglect, which is written from scratch in Zig and extends the concept with multiple ignore-file types, per-type template sets, and user-created custom templates.
neglect is released under the MIT License.