Help us shape the future of Go! Take the 2026 Go Developer Survey

ignit

command module
v1.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2026 License: GPL-3.0 Imports: 12 Imported by: 0

README

Ignit

CI Go Reference Release

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.

Documentation

Overview

Command ignit is a CLI app that quickly generates .gitignore files.

The root package is wiring only: flag handling, the picker/download program flow, and writing the merged .gitignore. The picker lives in internal/picker, the template fetching/merging in internal/gitignore, the list generator in internal/envlist, and the embedded environment snapshot in internal/envs.

Directories

Path Synopsis
internal
envlist
Package envlist fetches and renders the gitignore.io environment list used to regenerate the embedded snapshot in internal/envs.
Package envlist fetches and renders the gitignore.io environment list used to regenerate the embedded snapshot in internal/envs.
envs
Package envs holds the static environment list snapshot embedded in the binary.
Package envs holds the static environment list snapshot embedded in the binary.
gitignore
Package gitignore downloads gitignore.io templates and merges them client-side, so section order and headers are controlled locally instead of by the API.
Package gitignore downloads gitignore.io templates and merges them client-side, so section order and headers are controlled locally instead of by the API.
picker
Package picker provides a fuzzy-filtering select list built with Bubble Tea: a filter input, highlighted matches, a cursor, a scrollable 10-row window, and space-bar multi-select.
Package picker provides a fuzzy-filtering select list built with Bubble Tea: a filter input, highlighted matches, a cursor, a scrollable 10-row window, and space-bar multi-select.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL