#gitignore #tui #terminal

app autogitignore

A TUI for searching, previewing, and generating .gitignore files from gitignore.io templates

3 releases

Uses new Rust 2024

0.1.3 Feb 12, 2026
0.1.2 Feb 6, 2026
0.1.1 Feb 5, 2026

#390 in Command line utilities

MIT license

250KB
1K SLoC

Rust 1K SLoC // 0.0% comments Shell 73 SLoC PowerShell 57 SLoC

autogitignore

Search, preview, and generate .gitignore files from gitignore.io (Toptal) with a fast, focused TUI.

autogitignore TUI screenshot

Highlights

  • Fuzzy search across templates
  • Highlighted or combined preview modes
  • Multi-template selection
  • Offline cache after first sync
  • Safe write with .gitignore.bak backup
  • Optional output directory support

Quick Start

Run in the current folder:

autogitignore

Write into a different folder:

autogitignore --dir /path/to/project

Run from source:

cargo run -- --dir /path/to/project

Install

From crates.io

cargo install autogitignore

From GitHub Releases (prebuilt binaries)

macOS/Linux (latest):

curl -fsSL https://raw.githubusercontent.com/Bilal-AKAG/autogitignore/main/scripts/install.sh | sh

macOS/Linux (specific version, example v0.1.2):

curl -fsSL https://raw.githubusercontent.com/Bilal-AKAG/autogitignore/main/scripts/install.sh | sh -s -- v0.1.2

Windows PowerShell (latest):

iwr https://raw.githubusercontent.com/Bilal-AKAG/autogitignore/main/scripts/install.ps1 -UseBasicParsing | iex

Windows PowerShell (specific version):

& ([scriptblock]::Create((iwr https://raw.githubusercontent.com/Bilal-AKAG/autogitignore/main/scripts/install.ps1 -UseBasicParsing).Content)) -Version v0.1.2

By default, scripts install to $HOME/.local/bin (%USERPROFILE%\\.local\\bin on Windows). Set BINDIR to change it.

Then:

autogitignore

Configuration

CLI options:

  • -d, --dir <path>: Write the .gitignore file into a specific directory (defaults to the current working directory).

Cache behavior:

  • Templates are cached locally after the first sync.
  • The cache location is determined by your OS using the directories crate (app cache directory).

Controls

Key Action
i or / Enter search mode
Esc Exit search or close modal
Space Toggle selection
P Toggle preview mode (Highlighted/Combined)
Alt+J / Alt+K Scroll preview
Ctrl+S Save
Enter Save and quit
Q Quit

Project Layout

  • src/api.rs API client and cache
  • src/app.rs App state and business logic
  • src/ui.rs Ratatui rendering
  • src/gitignore.rs File writing logic
  • src/main.rs Event loop and input handling

Notes

  • The cache is stored using directories in the user cache directory.
  • Linux builds using native-tls may require OpenSSL.

License

MIT

Dependencies

~14–32MB
~431K SLoC