Skip to content
rubiinPublic

About

Cli app to quicky add gitignore files to your current environment

Topics

Resources

Code of conduct

Contributing

Stars

15 stars

Watchers

1 watching

Forks

Repository files navigation

Ignit

CI Go Reference Release License: GPL-3.0

A CLI app to quickly generate .gitignore files for your projects.

Pick your environment from a searchable list and ignit writes a ready-made .gitignore in your current directory. Select several environments (space to toggle) and ignit downloads each template individually and merges them into a single .gitignore — with section order and headers controlled locally.

Features

  • Instant startup — the environment list is embedded in the binary, so the picker works fully offline. The network is only used when actually writing the .gitignore.
  • Fuzzy search — start typing to filter the list.
  • Multi-select — toggle as many environments as you want; ignit fetches templates concurrently (bounded pool) and merges them client-side, keeping sections in your selection order under a single ignit header.
  • Smart merge — identical ignore patterns shared across templates are emitted only once (first occurrence wins); comments and section headers are always kept.
  • Offline-friendly downloads — fetched templates are cached on disk (per-user cache dir) with a 24h freshness window: repeated runs with the same selection skip the network entirely, and if the API is unreachable a stale cached template is used instead of failing. Transient network failures are retried automatically, and fetches time out so a hung connection can't stall the download. The download screen marks each template as downloaded or from cache as it completes.
  • Shell completions — completion scripts for bash, zsh, fish, and powershell are generated by the app itself (ignit completion <shell>).
  • Always fresh — the embedded list can be regenerated from toptal/gitignore.io with a single command.

Installation

go install github.com/rubiin/ignit@latest

Arch Linux

Install the stable package from the AUR:

yay -S ignit-bin

Or build manually from the AUR by downloading the PKGBUILD, then running:

makepkg -si

Fire up your terminal, type ignit, and you get a nice select interface from which you can choose what you want in your gitignore.

Options

Flag Description
--clear-cache Delete the on-disk template cache and exit
--no-cache Bypass the template cache: always fetch from the network (still refreshes the cache)
--update-list Re-fetch the template list from gitignore.io and regenerate the embedded list
--help, -h Show help
--version, -v Print the version

Shell completions

ignit generates completion scripts for bash, zsh, fish, and powershell:

# bash — add to ~/.bashrc
source <(ignit completion bash)

# zsh — write to a directory on your fpath before compinit runs
ignit completion zsh > "${fpath[1]}/_ignit"

# fish
ignit completion fish > ~/.config/fish/completions/ignit.fish

# powershell
ignit completion powershell > ignit.ps1

Keyboard shortcuts: ↑/↓ to move, type to filter, space to toggle an entry, enter to select, ctrl+c to quit.

Building from source

A justfile is included:

just build   # build the binary
just test    # run tests
just lint    # golangci-lint

Project layout

main.go              entry point: flags, program flow, .gitignore write
internal/picker/     fuzzy-filtering Bubble Tea select list with multi-select
internal/gitignore/  template fetching (disk cache, bounded-concurrency) and merging
internal/envlist/    fetches and regenerates the environment list
internal/envs/       embedded environment snapshot (generated)

License

GPL-3.0

Made with ❤️ for opensource.

About

Cli app to quicky add gitignore files to your current environment

Topics

Resources

Code of conduct

Contributing

Stars

15 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages