A command-line interface for sending AI queries to sheep.byfranke.com, focused on Cyber Threat Intelligence (CTI) and general security questions.
AI queries from your terminal, fast and secure
Version 1.0 | byFranke 2026
About more: Sheep API
- Python 3.7 or higher
- pip package manager
# Run the interactive setup wizard (recommended)
curl -fsSL https://byfranke.com/ask-cli-install | bash# Or install manually
git clone https://github.com/byfranke/sheep-ask-cli
cd sheep-ask-cli
chmod +x sheep-ask-cli.py setup.py install.sh
bash install.sh
python3 setup.pyRun the interactive setup wizard to configure your encrypted token:
python3 setup.pyThe setup will:
- Ask for your API token
- Set a master password for encryption
- Store your token encrypted in
~/.sheep-ask-cli/config.ini - Require the master password only once per terminal session (cached in
/tmpwith mode0600, scoped to your shell's Session ID)
For single-use or testing, you can pass the token directly:
sheep-ask --token "your_api_token_here" "What is ransomware?"Or via environment variable:
export SHEEP_API_TOKEN="your_api_token_here"
sheep-ask "What is ransomware?"Security: Your token is always encrypted and password-protected when stored.
# Ask a question
sheep-ask "What is ransomware?"
# Multi-word question (no quotes needed)
sheep-ask What are the TTPs of APT29
# Explain a framework
sheep-ask "Explain the MITRE ATT&CK framework"# Save response to sheep_answers_YYYYMMDD_HHMMSS.md in the current directory
sheep-ask -o "What is a zero-day vulnerability?"# Use a markdown file as context before the question
sheep-ask -p report.md "Summarize the key findings"
sheep-ask --prompt incident.md "What are the IOCs mentioned?"# Pretty output (default) - panel with rendered markdown
sheep-ask "Explain phishing"
# Plain text for piping / automation
sheep-ask "Explain phishing" --format plain
# Raw JSON
sheep-ask "Explain phishing" --format json
# Rendered markdown (no panel)
sheep-ask "Explain phishing" --format markdown# Clear the cached decrypted token for the current terminal only
sheep-ask --logout# Show help
sheep-ask --help
# Show version
sheep-ask --version
# Re-run the setup wizard
sheep-ask --setup
# Check for updates from GitHub
sheep-ask --update-
API Token Error
Error: API token is requiredSolution: Run
python3 setup.pyor setSHEEP_API_TOKEN. -
Connection Error
Error: Failed to connect to API serverSolution: Check your internet connection and the API URL.
-
Request Too Large (HTTP 422)
Error: Request too large or invalid formatSolution: Use a shorter question or a smaller context file with
-p. -
Timeout Error
Error: Request timed outSolution: The query is taking longer than 60s. Try again or simplify the question.
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests
- Submit a pull request
- Never commit your API token to version control
- Store tokens securely using the setup wizard (encrypted) or
SHEEP_API_TOKEN - Use restrictive permissions for config files:
chmod 600 ~/.sheep-ask-cli/config.ini - Session token cache lives in
/tmp/sheep-ask-cli-sess-<uid>-<sid>with mode0600and is bound to your current shell's Session ID. Run--logoutto clear it early.
This tool is maintained through community support. Help keep it active: