Skip to main content

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 .gitignore files 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 .gitignore content 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 .gitignore with custom paths
  • Export Templates - Export selected templates as JSON
  • Overwrite Protection - Confirmation dialogs for existing files

๐Ÿ› ๏ธ CLI Mode

  • Quick Generation - Generate .gitignore from 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
igntui generate python --output .gitignore

List Available Templates

# List all templates
igntui list

# Search templates
igntui list --search python

# Show count only
igntui list --count

Test API Connection

igntui test

Cache Management

# Show cache info
igntui cache --info

# Clear cache
igntui cache --clear

Show Version

igntui --version
# Output: igntui/1.0.0 Python/3.13.0 Windows/11

๐ŸŽฎ TUI Usage

Keyboard Shortcuts

Navigation

  • Tab / Shift+Tab - Navigate between panels
  • โ†‘ / โ†“ - Move selection up/down
  • PgUp / PgDn - Page up/down
  • Home / End - Jump to top/bottom

Search Modes

  • F1 - Fuzzy search (default)
  • F2 - Exact search
  • F3 - Regex search

Template Management

  • Space - Select/deselect template
  • a - Select all templates
  • x - Clear all selections
  • Enter - Generate .gitignore content

Actions

  • s - Save generated .gitignore to file
  • e - Export selected templates as JSON
  • F5 - Refresh template list
  • h / ? - Show help dialog
  • i - Show app info
  • q / Esc - Quit application

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.json

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:

  1. Press Win + X and select "System"
  2. Click "Advanced system settings" โ†’ "Environment Variables"
  3. Under "User variables", select "Path" and click "Edit"
  4. Click "New" and add: C:\Users\YOUR_USERNAME\AppData\Roaming\Python\Python3XX\Scripts
  5. 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:

  1. Check internet connection
  2. Test API: igntui test
  3. Clear cache: igntui cache --clear
  4. 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.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ‘จโ€๐Ÿ’ป Author

Mohammad Abu Mattar

๐Ÿ™ Acknowledgments

๐Ÿ“Š 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


Made with โค๏ธ by Mohammad Abu Mattar
Give it a โญ if you like it!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

igntui-0.0.1.tar.gz (39.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

igntui-0.0.1-py3-none-any.whl (59.9 kB view details)

Uploaded Python 3

File details

Details for the file igntui-0.0.1.tar.gz.

File metadata

  • Download URL: igntui-0.0.1.tar.gz
  • Upload date:
  • Size: 39.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for igntui-0.0.1.tar.gz
Algorithm Hash digest
SHA256 4bc554084f7264ec8a6c8c4507fc44aa2887999c0bdbbb999a8a214f63a911e1
MD5 933e3dc957746abd129b6c8b01bfaea7
BLAKE2b-256 71e086e3646bc3db4f607eebdcb346b3fb1b3d365c011bddc8a784c59e5c0360

See more details on using hashes here.

File details

Details for the file igntui-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: igntui-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 59.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for igntui-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dfebe1f0ab42afa42d836bf8087cfe1e5d5037b2e2f58b50bf948b3fef363e15
MD5 58502d272f0e87123e49dbbf9161917f
BLAKE2b-256 169a399b128dcff1e4ee04fc729cec8ebef97193436b2c391e899ac965831dd4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page