An AI-powered persistent CLI agent with built-in pentest, recon, and system tools.
Supports Ollama · LM Studio · OpenAI · Gemini · Anthropic — switch models and routes on the fly.
pip install navy-ai
Install with your preferred AI provider:
pip install "navy-ai[ollama]" # local models via Ollama
pip install "navy-ai[openai]" # GPT-4o, o3, o4-mini — also required for LM Studio
pip install "navy-ai[gemini]" # Gemini 1.5 / 2.0
pip install "navy-ai[anthropic]" # Claude Sonnet / Opus / Haiku
pip install "navy-ai[all]" # every provider at once
navy
⚓ ~ ❯ what ports are open on 10.0.0.1?
⚓ ~ ❯ summarise the files in this folder
⚓ ~ ❯ am i running the latest kernel?
navy "what is the name of this computer"
navy "how long has this machine been running"
navy --model gpt-4o "scan ports on 10.0.0.1"
navy --yes "what processes are using the most CPU"
| Flag | Description |
|---|---|
--model <name|alias> | Override the model (name or alias from models.json) |
--ctx <int> | Context window size (default: 32768) |
--yes / -y | Skip all confirmation prompts |
| Command | Description |
|---|---|
model <alias> | Switch model mid-session |
/models | List all model aliases |
/route [url] | Show or change the local AI server URL (Ollama or LM Studio) |
/route ollama <url> | Change the Ollama server URL |
/route lms <url> | Change the LM Studio server URL |
continue | Give the agent +10 more turns to finish a long task |
/save [name] | Save the current session |
/load <name> | Load a saved session |
/sessions | List saved sessions |
/export [file] | Export transcript as Markdown |
/reset | Clear conversation memory |
exit / quit | Exit Navy |
On first run Navy auto-creates ~/.config/navy/models.json. Edit it to set your default model and API keys.
models.json{
"default": "qwen2.5:14b",
"providers": {
"openai": { "api_key": "" },
"gemini": { "api_key": "" },
"anthropic": { "api_key": "" },
"ollama": { "host": "http://127.0.0.1:11434" },
"lmstudio": { "host": "http://localhost:1234/v1" }
},
"presets": {
"kimi": "kimi-k2.5:cloud",
"gpt4o": "gpt-4o",
"flash": "gemini-2.0-flash",
"sonnet": "claude-sonnet-4-5",
"qwen14": "qwen2.5:14b",
"lms": "lms:local-model"
}
}
API keys can also be set via environment variables:
export OPENAI_API_KEY=sk-...
export GEMINI_API_KEY=AIza...
export ANTHROPIC_API_KEY=sk-ant-...
config.json — timeouts and tool limits{
"server": {
"command_timeout": 120,
"max_command_timeout": 1800
},
"cli": {
"max_turns": 15,
"max_response_tokens": 4096
}
}
Tip: For long-running commands like
nmap -p-, the AI automatically requests a longer timeout. The cap ismax_command_timeout(default 30 min).
Install Ollama, pull a model, and run navy:
ollama pull qwen2.5:14b
navy
Change the server address if Ollama runs on a remote machine:
/route ollama http://192.168.1.10:11434
pip install "navy-ai[openai]"lms: prefix to select the model:navy --model lms:meta-llama-3.1-8b-instruct
Or switch mid-session:
model lms:qwen2.5-7b-instruct
Change the LM Studio server address:
/route lms http://192.168.1.10:1234/v1
The model name after
lms:must match what LM Studio reports — checkGET http://localhost:1234/v1/modelsor the LM Studio UI.
| Tool | Description |
|---|---|
execute_command | Run shell commands with per-command timeout control |
read_file / write_file | Local file read/write |
search_files | Find files by name or content |
fetch_url | Fetch and parse web pages |
search_web | DuckDuckGo search |
scan_ports | TCP port scanner (supports ranges: 1-65535) |
http_probe | HTTP status + response headers |
check_security_headers | Security header grading (A–F) |
ssl_check | TLS certificate validity, expiry, ciphers |
dns_lookup | DNS resolution |
whois_lookup | Domain registrar, expiry, nameservers |
subdomain_scan | DNS-based subdomain enumeration |
get_system_specs | GPU / RAM / CPU information |
get_security_logs | Windows Security & Defender events |
Navy follows a structured recon workflow when given a target:
scan_ports → http_probe → ssl_check → subdomain_scan → whois_lookup
Important: Only use pentest tools against targets you are authorized to test.
MIT © Zrnge
No reviews yet. Be the first to rate this tool.
Sign in to leave a review.