felon β Anonymous Offline Terminal Agent
A CLI tool that wraps your terminal with an offline AI that converts natural language to shell commands. Uses a local GGUF model. No cloud, no telemetry, no API keys.
Also known as: fsi (Ferrell Synthetic Intelligence) or nomad
Quick Start
# Install
pip install rich
git clone https://github.com/yourusername/felon-terminal
cd felon-terminal && pip install .
# Or download from HF
# wget https://huggingface.co/FerrellSyntheticIntelligence/fsi-felon/resolve/main/felon.tar.gz
# tar xzf felon.tar.gz && cd felon && pip install .
# Run
fsi
On first run, felon scans ~/ for git repos and builds a context map of your projects. Without a model, type $ <command> to run commands directly.
Usage
$ fsi
ββββββββββββββββββββββββββ
ββββ ββ βββ£β ββββββββββββ β
ββββ ββ βββ£β β βββββββββ β
ββββββββββββ ββββββββββ
nomad
anonymous Β· offline Β· learns
β found 14 project(s)
β you have 14 project(s)
β - felon: Python (9)
ββ β you ββββββββββββββββββββββββββββ
β find all large files β
ββββββββββββββββββββββββββββββββββββββ
ββ β nomad ββββββββββββββββββββββββββ
β $ find . -type f -size +100M β
β β exit 0 β
β ./data/big.tar.gz β
ββββββββββββββββββββββββββββββββββββββ
run this? [Y/n]:
Commands
| Input | Action |
|---|---|
find all large files |
AI generates a command, you approve |
$ git push |
Run command directly |
!! |
Re-run last command |
rescan |
Re-scan codebase |
scaninfo |
Show project knowledge |
feedback |
Rate last response |
export |
Export interaction history for fine-tuning |
clear |
Clear screen |
exit |
Quit |
Architecture
felon/
βββ cli.py # Rich TUI chat interface (Alaska dark theme)
βββ engine.py # LLM inference (llama.cpp server or local bindings)
βββ shell.py # Safe execution with timeout, danger detection
βββ scanner.py # Codebase scanner (auto-discovers projects)
βββ history.py # Interaction logger + training data export
βββ context.py # Session context (cwd, git, OS)
βββ config.py # ~/.felon/config.json
βββ train_terminal.py # LoRA fine-tune on collected usage data
How the Learning Works
- First run:
scanner.pyfinds all git repos in~/, fingerprints languages and dependencies - Every interaction: User input, generated command, approval status, output, and ratings are logged to
~/.felon/history.jsonl - Fine-tuning: Run
train_terminal.pyon exported history to create a personalized model that understands your workflows - Continual: Over time, the model adapts to your project patterns and command style
Configuration
~/.felon/config.json:
{
"mode": "none",
"model_path": "models/assassin-f16.gguf",
"server_url": "http://127.0.0.1:8080",
"temperature": 0.3,
"max_tokens": 128,
"confirm_command": true,
"timeout": 30
}
mode:"none"(direct commands only),"server"(llama.cpp HTTP),"local"(llama-cpp-python)confirm_command: Always ask before executing AI-generated commands
Model Setup
Option 1: Built-in local model
# Download FSI-FELON-168M GGUF
mkdir -p ~/.felon/models
wget -P ~/.felon/models https://huggingface.co/FerrellSyntheticIntelligence/FSI-FELON-168M/resolve/main/assassin-f16.gguf
# Set config
echo '{"mode": "local", "model_path": "~/.felon/models/assassin-f16.gguf"}' > ~/.felon/config.json
Option 2: llama.cpp server
# Start llama.cpp server with any GGUF
./llama-server -m assassin-f16.gguf --host 127.0.0.1 --port 8080
# In felon config
echo '{"mode": "server", "server_url": "http://127.0.0.1:8080"}' > ~/.felon/config.json
Terminal Training
To fine-tune the model on your usage patterns:
# Collect usage data by using the tool
# Then export and train
python felon/train_terminal.py \
--data ~/.felon/history.jsonl \
--model FerrellSyntheticIntelligence/FSI-FELON-168M \
--output ./my-personal-model \
--epochs 3 \
--gguf
Requires: torch, transformers, peft, trl, datasets, accelerate
Performance
| Mode | Startup | Response | Use Case |
|---|---|---|---|
| No model | Instant | β | Direct commands only |
| Server (llama.cpp) | 1-2s | ~50ms | Recommended for tablet |
| Local (llama-cpp-python) | 2-5s | ~50ms | Laptop/desktop |
Dependencies
- Runtime: Python 3.10+,
rich - AI (optional): llama.cpp server (for server mode) or
llama-cpp-python(for local mode) - Training (optional):
torch,transformers,peft,trl,datasets,accelerate
Related
- FSI-FELON-168M β The GGUF model
- Prometheus Distillation Pipeline β Training scripts and data
License
Apache 2.0
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support