# 🔮 Perplexica Search TUI Beautiful terminal interface for Perplexica API – AI-powered search in your terminal. ## Installation 1. **Clone the repository:** ```sh git clone cd main ``` 2. **Set up a Python virtual environment:** ```sh python3 -m venv ~/venv/perplexica source ~/venv/perplexica/bin/activate ``` 3. **Install dependencies:** ```sh pip install -r requirements.txt ``` 4. **Configure your API endpoint:** - Edit `perplexica-search-tui.py` and set `API_URL` to your own Perplexica API endpoint. - Edit `search.sh` and set `VENV_PATH` to your Python virtual environment path if different from the default. ## Usage ### Interactive Mode ```sh ./search.sh ``` - Use `/mode` to switch focus modes (web, academic, writing, etc.). - Use `/speed` to change optimization mode (speed/balanced). - Use `/clear` to clear history. - Use `/help` for help. - Use `/exit` to quit. ### Direct Query (Non-interactive) ```sh ./search.sh --query "What is quantum computing?" ``` ### Command-line Options - `--mode MODE` - Set focus mode (e.g., webSearch, academicSearch) - `--query QUERY` - Run a direct query - `--speed MODE` - Set optimization mode (speed/balanced) - `--version` - Show version ## FAQ **Q: How do I set my API endpoint?** A: Edit `perplexica-search-tui.py` and set `API_URL` to your Perplexica API server. **Q: How do I set my Python virtual environment path?** A: Edit `search.sh` and set `VENV_PATH` to the path where your venv is located. **Q: I get 'Python interpreter not found' errors.** A: Make sure your virtual environment exists and `VENV_PATH` is correct. **Q: How do I pass system instructions?** A: In interactive mode, use `|` to separate your query and instructions, e.g. `translate this to French | write in formal tone` **Q: What Python version is required?** A: Python 3.8 or newer. **Q: How do I install dependencies?** A: Run `pip install -r requirements.txt` inside your virtual environment. **Q: How do I exit?** A: Use `/exit` in interactive mode or press `Ctrl+C`. --- For more details, see comments in the scripts. If you encounter issues, check your API endpoint and venv configuration.