Interactive Terminal User Interface for GitIgnore template generation
Project description
igntui
๐ Website โข ๐ฆ PyPI โข ๐ Quick Start โข ๐ฌ Support
A powerful Terminal User Interface (TUI) and CLI for generating
.gitignorefiles from gitignore.io templates.
โจ Features
๐จ Interactive TUI Mode
- Smart Search - Fuzzy, exact, and regex search modes (F1/F2/F3)
- Multi-Template Selection - Select and combine multiple templates
- Live Preview - See generated
.gitignorecontent in real-time - Intuitive Navigation - Tab between panels, arrow keys, vim-style shortcuts
- Beautiful Interface - Animated splash screen with pyfiglet ASCII art
โก Performance
- Intelligent Caching - Local template caching for instant access
- Async Loading - Non-blocking template loading and generation
- Rate Limiting - Respects API limits automatically
๐พ Export & Save
- Save to File - Save generated
.gitignorewith custom paths - Export Templates - Export selected templates as JSON
- Overwrite Protection - Confirmation dialogs for existing files
๐ ๏ธ CLI Mode
- Quick Generation - Generate
.gitignorefrom command line - List Templates - Browse 571+ available templates
- Test Connection - Verify API connectivity
- Cache Management - Clear and manage local cache
๐ฆ Installation
Using pip (Standard)
pip install igntui
Using pipx (Isolated)
pipx installs the package in an isolated environment:
pipx install igntui
From source
git clone https://github.com/MKAbuMattar/igntui.git
cd igntui
pip install -e .
Windows Requirements
On Windows, you'll need the windows-curses package:
pip install windows-curses
๐ Quick Start
Launch TUI (Interactive Mode)
igntui
or
python -m igntui
CLI Commands
Generate .gitignore
# Single template
igntui generate python
# Multiple templates
igntui generate python node visualstudiocode
# Save to file (also writes .igntui.cfg.toml sidecar by default)
igntui generate python --output .gitignore
# Preview without writing
igntui generate python --output .gitignore --dry-run
# Skip writing the sidecar
igntui generate python --output .gitignore --no-sidecar
# Overwrite without prompt
igntui generate python --output .gitignore --force
List Available Templates
# List all templates
igntui list
# Filter by pattern
igntui list --filter python
# Show count only
igntui list --count
Test API Connection
igntui test
igntui test --timeout 5
Cache Management
igntui cache info # show cache stats
igntui cache stats # show usage statistics
igntui cache clear --force # clear all cached entries
Global Flags
igntui --no-cache list # bypass cache for the session
igntui --config /path/to/config.json # load alternate config
igntui --verbose <command> # verbose / debug output
igntui --version # print version + Python + OS
Project Sidecar (.igntui.cfg.toml)
When you save a .gitignore (via TUI or CLI), igntui writes a small TOML
sidecar next to it that pins the templates and search mode used. Re-running
igntui in the same directory auto-loads that selection so you can iterate
without re-picking templates. The sidecar is safe to commit so teammates
inherit the same starting state.
# .igntui.cfg.toml
schema_version = 1
generated_at = "2026-04-27T12:00:00Z"
igntui_version = "0.0.2"
[selection]
templates = ["python", "node", "macos"]
search_mode = "fuzzy"
[output]
path = ".gitignore"
preserve_user_edits = true
User-added rules outside the # >>> igntui >>> / # <<< igntui <<< markers
are preserved on every re-save.
Shell Completion
# bash
eval "$(igntui completion bash)"
# zsh โ install to a directory on $fpath
igntui completion zsh > ~/.zsh/completions/_igntui
# fish
igntui completion fish | source
๐ฎ TUI Usage
Keyboard Shortcuts
Navigation
Tab/Shift+Tabโ Navigate between panelsโ/โโ Move selection up/downPgUp/PgDnโ Page up/downHome/Endโ Jump to top/bottom/โ Focus the Search panelEsc(in Search) โ Exit search mode and return to Templates
Search Modes
F1โ Fuzzy search (default)F2โ Exact searchF3โ Regex search
Template Management
Space/Enterโ Select/deselect templateaโ Select all visible (filtered) templatesxโ Remove all visible templates from selectioncโ Clear entire selection
Actions
sโ Save.gitignore(writes.igntui.cfg.tomlsidecar; shows diff preview if file exists)eโ Export selected templates as JSONr/F5โ Refresh template list from APIh/?/F12โ Show help dialogiโ Show app infoq/Esc(outside Search) โ Quit application
Mouse Support
- Click a panel to focus it
- Click a row in Templates to select it (and toggle on the same click)
- Scroll wheel scrolls the panel under the cursor without changing focus
Panel Layout
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Search Panel โ Generated Content Panel โ
โ (Filter templates) โ (Preview .gitignore) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค โ
โ Available Templates โ โ
โ (571+ templates) โ โ
โ โ โ
โ โข Select with Space โ โ
โ โข Multi-select support โ โ
โ โข Smart search โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Selected Templates (Bottom Panel) โ
โ โข Shows your current selection โ
โ โข Remove with Space โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Status Bar โ
โ โข Keyboard shortcuts โข Current mode โข Status messages โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ฏ Use Cases
For Developers
# Python project
igntui generate python venv
# Node.js project
igntui generate node npm yarn
# Full-stack project
igntui generate python node react visualstudiocode
# Unity game development
igntui generate unity visualstudio windows
For Teams
# Export team's template selection
igntui # Select templates in TUI, press 'e' to export
# Share the JSON file with team
# Others can import and use the same templates
โ๏ธ Configuration
Configuration file location: ~/.igntui.cfg.toml
Default Configuration
{
"api": {
"base_url": "https://www.toptal.com/developers/gitignore/api",
"timeout": 10,
"cache_ttl": 3600,
"retry_attempts": 3
},
"ui": {
"theme": "default",
"mouse_support": true,
"animation_speed": 150
},
"behavior": {
"fuzzy_search_threshold": 0.6,
"max_recent_templates": 10
}
}
๐ Troubleshooting
Windows: "igntui is not recognized"
If you see 'igntui' is not recognized as an internal or external command, the Scripts directory is not in your PATH.
Quick Fix - Use Python Module:
python -m igntui
Permanent Fix - Add to PATH:
- Press
Win + Xand select "System" - Click "Advanced system settings" โ "Environment Variables"
- Under "User variables", select "Path" and click "Edit"
- Click "New" and add:
C:\Users\YOUR_USERNAME\AppData\Roaming\Python\Python3XX\Scripts - Click "OK" and restart your terminal
Or use PowerShell (as Administrator):
$currentPath = [Environment]::GetEnvironmentVariable("Path", "User")
$newPath = $currentPath + ";C:\Users\$env:USERNAME\AppData\Roaming\Python\Python313\Scripts"
[Environment]::SetEnvironmentVariable("Path", $newPath, "User")
Linux/macOS: Permission Denied
If you get permission errors:
# Use --user flag
pip install --user igntui
# Or add ~/.local/bin to PATH
export PATH="$HOME/.local/bin:$PATH"
ImportError: No module named 'curses'
On Windows, install windows-curses:
pip install windows-curses
API Connection Issues
If templates won't load:
- Check internet connection
- Test API:
igntui test - Clear cache:
igntui cache --clear - Try with verbose:
igntui --verbose
๐งช Development
Setup Development Environment
# Clone repository
git clone https://github.com/MKAbuMattar/igntui.git
cd igntui
# Install dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Format code
black src/igntui
isort src/igntui
# Type checking
mypy src/igntui
Running Tests
# All tests
pytest
# With coverage
pytest --cov=igntui
# Specific test file
pytest tests/test_api.py
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐จโ๐ป Author
Mohammad Abu Mattar
- GitHub: @MKAbuMattar
- Website: MKAbuMattar.com
- Email: info@mkabumattar.com
๐ Acknowledgments
- gitignore.io - Template source
- pyfiglet - ASCII art generation
- Python curses - Terminal UI framework
๐ Statistics
- 571+ Templates - Comprehensive template library
- Smart Caching - Reduces API calls by 90%
- 3 Search Modes - Fuzzy, exact, and regex
- Multi-select - Combine unlimited templates
- Cross-platform - Windows, macOS, Linux
๐ Links
- Repository: https://github.com/MKAbuMattar/igntui
- Issue Tracker: https://github.com/MKAbuMattar/igntui/issues
- PyPI Package: https://pypi.org/project/igntui/
- Documentation: https://github.com/MKAbuMattar/igntui/wiki (coming soon)
Give it a โญ if you like it!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file igntui-0.1.1.tar.gz.
File metadata
- Download URL: igntui-0.1.1.tar.gz
- Upload date:
- Size: 51.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa43a673bf6f7321cc17104b006ac42d7154ba1576265ed1a99aecc0be903e1e
|
|
| MD5 |
7c07a5e4ee6035e79dc622a3d6ce0255
|
|
| BLAKE2b-256 |
945a7beec653e1e4bc1b4e4477e42b1028797b06f748892e0b4c0df0ab2c1bf9
|
File details
Details for the file igntui-0.1.1-py3-none-any.whl.
File metadata
- Download URL: igntui-0.1.1-py3-none-any.whl
- Upload date:
- Size: 75.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47aa8be8c9cae4283ccbb71836c96643db793e5fa8d99b9f0a1330b761d62662
|
|
| MD5 |
d88c5f311cfc586da3580d3737d82ca7
|
|
| BLAKE2b-256 |
245f285f1e366b926948af74b5f3755519daf91b39dee1462b58b6e4e70459af
|