This is a minimalistic but robust terminal UI for Perplexica, which is a self-hosted take on Perplexity. It uses Ollama and SearXNG to achieve ChatGPT or Gemini-style 'deep research' in your homelab.
|
|
4 maanden geleden | |
|---|---|---|
| README.md | 4 maanden geleden | |
| perplexica-search-tui.py | 4 maanden geleden | |
| requirements.txt | 4 maanden geleden | |
| search.sh | 4 maanden geleden |
Beautiful terminal interface for the Perplexica API – AI-powered search in your terminal.
Clone the repository:
git clone <your-repo-url>
cd main
Set up a Python virtual environment:
python3 -m venv ~/venv/perplexica
source ~/venv/perplexica/bin/activate
Install dependencies:
pip install -r requirements.txt
Install to system PATH (optional but recommended):
# Move files to a permanent location
sudo mkdir -p /usr/local/bin/perplexica
sudo cp search.sh perplexica-search-tui.py /usr/local/bin/perplexica/
# Set execute permissions
sudo chmod +x /usr/local/bin/perplexica/search.sh
sudo chmod +x /usr/local/bin/perplexica/perplexica-search-tui.py
# Add to PATH (add this line to your shell profile like ~/.bashrc or ~/.zshrc)
export PATH="/usr/local/bin/perplexica:$PATH"
Configure your API endpoint:
perplexica-search-tui.py and set API_URL to your own Perplexica API endpoint.search.sh and set VENV_PATH to your Python virtual environment path if different from the default../search.sh
/mode to switch focus modes (web, academic, writing, etc.)./speed to change optimization mode (speed/balanced)./clear to clear history./help for help./exit to quit../search.sh --query "What is quantum computing?"
--mode MODE - Set focus mode (e.g., webSearch, academicSearch)--query QUERY - Run a direct query--speed MODE - Set optimization mode (speed/balanced)--version - Show versionQ: 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.
docker and docker-compose! Use other cloud hosts, or just locally-hosted Ollama!