#!/bin/bash # Demo script for selectui set -e echo "======================================" echo " selectui Demo" echo "======================================" echo "" echo "This demo will show you the key features of selectui" echo "" # Check if uv is available if ! command -v uv &> /dev/null; then echo "Error: uv is not installed" echo "Please install it from https://github.com/astral-sh/uv" exit 1 fi # Sync dependencies echo "Installing dependencies..." uv sync --quiet echo "✓ Dependencies installed" echo "" # Run basic tests echo "Running tests..." uv run python tests/test_basic.py echo "" # Interactive demo echo "======================================" echo " Interactive Demo" echo "======================================" echo "" echo "About to launch the interactive UI with sample job listings." echo "The UI will read JSON objects line-by-line (JSONL format)." echo "" echo "Things to try:" echo " 1. Type 'python' to filter items" echo " 2. Press 'f' to enable fuzzy search, then type 'pythn'" echo " 3. Press 'i' to enable case-sensitive search" echo " 4. Use arrow keys to navigate" echo " 5. Press '?' to see all keybindings" echo " 6. Press Enter to select an item (outputs JSON)" echo " 7. Press 'q' or Esc to quit" echo "" read -p "Press Enter to start the demo..." cat example.jsonl | uv run selectui > /tmp/output echo "" echo "======================================" echo " Demo Complete!" echo "======================================" echo "" echo "For more examples, see USAGE.md" echo "For full documentation, see README.md"