Natural language assistant for the Linux shell
Project description
Argo
Terminal assistant that translates natural language requests into Linux commands.
What it is
Argo is a CLI tool that:
- interprets natural language requests (Italian, English, etc.)
- generates appropriate shell commands via LLM (Ollama)
- classifies commands by risk level (🟢 read-only, 🟡 write, 🔴 destructive)
- allows preview, edit, explain and execution time estimation before running
- learns from your choices and improves suggestions over time
Installation
# Quick install script
./install.sh
# or without sudo (installs to ~/.local)
./install.sh --user
# Manual
pip install -e .
# or run from source without installing
./run.sh --version
Requirements
- Python 3.10+
- Ollama running
ollama serve— start the serverollama pull llama3.2— download a model
Basic usage
# Interactive mode (REPL)
argo
# Single query
argo find files larger than 1gb
argo find files modified today
argo search for "error" in logs
After generation you'll see a list of commands: use arrow keys to select, Enter to run. Keys: p preview, e edit, t estimate, x explain, q exit.
Examples
Single commands
# Preview (what the command would do)
argo preview "rm *.log"
# Step-by-step explanation
argo explain "grep -r error logs/"
# Execution time estimate
argo estimate ls -la
argo estimate find . -name "*.log"
Learning and memory
# Save a preferred command
argo learn grep -r error logs/
# List learned commands
argo memory
# Remove one
argo forget 1
# Optimize knowledge (deduplicate, learn from history)
argo optimize
argo optimize --dry-run
Configuration
argo config set llm.model llama3.2
argo config set language.output it
argo config get language.output
argo config list
# Verify environment
argo check
argo check --fix # create missing config files
Custom risk rules
argo risk add command mytool danger
argo risk add pattern "curl.*\|.*sh" critical
argo risk protect /etc
argo risk list
argo risk remove command mytool
Auto-execute
argo -y find .log files # auto if read-only
argo -y2 copy files to backup/ # auto if read-only or write
argo -y3 any command # use with caution!
Session options
argo --lang it # session in Italian
argo --auto # same as -y for REPL
argo --no-color # disable colors
Remote LLM (OpenAI, OpenRouter, etc.)
Argo can use remote APIs instead of local Ollama. API keys are read from environment variables (never stored in config).
OpenAI / compatible APIs:
# Set your API key (never commit this!)
export OPENAI_API_KEY="sk-..."
# Enable remote in config
argo config set llm.remote.enabled true
argo config set llm.remote.model gpt-4
OpenRouter (access to many models with one key):
export OPENAI_API_KEY="sk-or-..."
argo config set llm.remote.enabled true
argo config set llm.remote.base_url "https://openrouter.ai/api/v1"
argo config set llm.remote.model "anthropic/claude-3-haiku"
Custom env var name:
export MY_API_KEY="sk-..."
argo config set llm.remote.api_key_env MY_API_KEY
If remote fails or the openai package is missing, Argo falls back to local Ollama.
Configuration
Files in ~/.config/argo/:
config.json— LLM, language, colorsknowledge.json— learned commandshistory.json— choice historyrisk-rules.json— custom risk rulesperf.json— performance estimate cache
License
MIT — see LICENSE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file argo_shell_assistant-0.1.0.tar.gz.
File metadata
- Download URL: argo_shell_assistant-0.1.0.tar.gz
- Upload date:
- Size: 29.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9161c90149b9654e48e5b461e89f6532c8474acb83ee0c70a906fe73d1219a4e
|
|
| MD5 |
89037e43d77e61897bcd3c67e6bd03d7
|
|
| BLAKE2b-256 |
f29b5f1d845a0453a291bad2f2aefea5c50350e6706685752c0ffc296f7f21dc
|
File details
Details for the file argo_shell_assistant-0.1.0-py3-none-any.whl.
File metadata
- Download URL: argo_shell_assistant-0.1.0-py3-none-any.whl
- Upload date:
- Size: 38.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42f69269af3783b30d085b681af79e49562477a213b583bd1df11e19c43eeb8f
|
|
| MD5 |
cb959551d42485aada66f6bcf637605f
|
|
| BLAKE2b-256 |
97ee9a9bfe2a91c75740b6aca1953ac2efa35f90a46dd585ad9d14defc763e75
|