A simple CLI tool to easily create .gitignore and .prettierignore files for over 500 languages and frameworks.
- 🚀 Generate
.gitignoreand.prettierignorefiles with a single command - 📚 500+ languages and frameworks via gitignore.io
- 📋 Shell auto-completion support
Using uv (recommended):
uv tool install easyignoreUsing pipx:
pipx install easyignoreAlternatively, run without an install using uvx (no auto-complete):
uvx easyignoreCreate a .gitignore file for Python:
easyignore pythonCreate a .gitignore file for multiple languages separated by a space:
easyignore python node reactPrint the ignore file content to stdout without saving to a file:
easyignore python --printList all available languages and frameworks:
easyignore --listCreate a file with a different name (e.g., .prettierignore):
easyignore react --file .prettierignoreSpecify a file and/or a directory with:
easyignore python --file .prettierignore --directory .If the directory does not exist, it will be created.
If the file already exists, either append or overwrite it:
easyignore java --appendeasyignore go --overwriteIf you don't select an option and the file exists, you will be prompted to decide.
Instead of outputting to a file, you can print to stdout enabling piping to wherever you like:
easyignore python --printPrinting to stdout will disable printing to a file, regardless of what other options are entered.
One of the main advantages of easyignore is shell auto-completion, supported for bash, zsh, fish, and powershell, powered by typer auto-complete.
Automatically install the required scripts to your shell profile with:
easyignore --install-completionAlternatively, you can print the shell completion script:
easyignore --show-completion[!NOTE]
Auto-complete will only work when easyignore is called directly from the command line - uvx doesn't support autocomplete.
| Option | Description |
|---|---|
-d, --directory DIRECTORY |
Directory for ignore file. (default: current directory) |
-f, --file TEXT |
File name for ignore file. (default: .gitignore) |
-a, --append |
Append to existing ignore file. |
-o, --overwrite |
Overwrite existing ignore file. |
-p, --print |
Print ignore file to stdout instead of saving to file. |
-l, --list |
List available languages/frameworks for ignore file. |
-i, --install-completion |
Install shell completion for easyignore. |
-s, --show-completion |
Show shell completion for easyignore. |
-h, --help |
Show help message and exit. |
easyignore currently uses the gitignore.io API to fetch the latest ignore patterns for your selected languages and frameworks. However, easyignore is designed not to be locked into this decision - the specific APIs used to retrieve .gitignore may be expanded or swapped with no user functionality changes. This is particularly relevant since the gitignore.io template repository was recently archived and alternatives such as donotcommit may be preferred in the future.
The command line interface for easyignore is built with typer, with a modified shell completion solution that uses shellingham to identify the shell. The templates are retrieved using requests and printed to the console with Rich.