Cyx
LLM-powered terminal tool for security command lookup. Supports Perplexity, Groq, and Ollama.
Features
- Command-first output with code blocks
- Learn mode for detailed explanations
- Smart cache with ONNX semantic search
- Local LLM support via Ollama
- Source attribution and links
Quick Start
# Clone and build
# Setup (first time - interactive wizard)
# Use
Installation
Prerequisites
- Rust 1.70 or higher
- API key from Perplexity or Groq
Build from Source
# Optional: install to PATH
Using the Makefile
Initial Configuration
Run the interactive setup wizard:
This creates ~/.config/cyx/config.toml with your API key (stored with 600 permissions).
Usage
One-Shot Queries
# Quick command lookup
# Learn mode with detailed explanations
CLI Options
-l, --learn Educational mode with detailed breakdowns
-q, --quiet Minimal output (response only, no formatting)
-v, --verbose Detailed progress information
--no-tty Disable TTY features for scripting
Configuration
Config file: ~/.config/cyx/config.toml
Output Examples
Normal Mode
╭─── RESPONSE ──────────────────────────────────────────────
│ ```bash
│ nmap -sS <target>
│ ```
│ TCP SYN stealth scan - doesn't complete handshake. Requires root.
╰──────────────────────────────────────────────────────────
[*] SOURCES
───────────────────────────────────────
Provider: Perplexity (sonar-pro)
Search: Yes (performed web search)
Links:
- nmap documentation: https://nmap.org/book/synscan.html
- TCP protocol (RFC 793): https://www.ietf.org/rfc/rfc793.txt
Learn Mode
Provides detailed explanations with flag breakdowns, protocol details, and alternatives.
Quiet Mode
Technical Details
Security
- API keys stored with 600 permissions in
~/.config/cyx/config.toml - Read-only operation - provides commands but never executes them
- Timeout protection - all API calls timeout after 120 seconds
- Local-first - all sensitive data remains on your machine
System Prompts
Normal mode prioritizes executable commands with brief explanations. Learn mode provides detailed educational content with examples and alternatives.
Disclaimer
For authorized security testing, educational purposes, and defensive research only.
This tool is designed for:
- Professional penetration testers with written authorization
- Security students in controlled lab environments
- Capture The Flag (CTF) competitions
- Defensive security and threat analysis
Always obtain explicit permission before testing systems you don't own.
License
MIT License - See LICENSE for details.