🔍 ArgusTerm
An OS-aware AI terminal copilot. ArgusTerm watches your shell for failed commands, harvests OS state, captures compiler stderr silently, analyzes blast radius, and uses Gemini 3.6 Flash to iteratively suggest and apply fixes.
✨ Key Features
| Feature | Description |
|---|---|
| 🩺 OS State Harvesting | Inspects active ports, top processes, git status, and directory context |
| 💥 Blast-Radius Analysis | Categorizes command danger (LOW → CRITICAL) before execution |
| 🧠 Iterative Auto-Retry | Diagnoses errors, applies fixes (sed, pip), and automatically reruns the original command until it passes |
| 📸 Diagnostic Re-run | Silently recaptures stderr for deterministic tools (g++, python) to give AI full context |
| 🎨 Rich TUI | Beautiful terminal panels, tables, and interactive prompts |
| 🪝 Bulletproof Hooks | Generates an isolated python runner script to bypass shell environment pollution |
🚀 Quickstart
1. Install
pip install argus-term
2. Set API Key
export GEMINI_API_KEY="your-key-here"
Get a key at https://aistudio.google.com/app/apikey.
3. Install Shell Hook
argus install-hook
source ~/.zshrc # or ~/.bashrc
4. Run a Health Check
argus doctor
🛠️ Commands
argus fix "<command>" <exit_code>
Manually diagnose a failed command:
argus fix "git pussh origin main" 1
This will:
- Harvest current OS state (ports, git, processes)
- Analyze blast radius of the suggested fix
- Call Gemini 3.6 Flash for diagnosis
- Display a Rich TUI panel with the explanation
- Prompt you to execute the fix immediately
argus doctor
Verify all dependencies and configuration:
argus doctor
argus install-hook
Append the shell hook to your rc file:
argus install-hook # Auto-detects shell
argus install-hook --shell bash
argus install-hook --shell zsh
🪝 How Shell Hooks Work
After argus install-hook, your shell calls argus fix automatically after every failed command (exit code ≠ 0). The hook is non-blocking — it only fires when there's an error, and runs in the foreground for interactive diagnosis.
Zsh Hook (.zshrc)
# ArgusTerm hook — auto-appended
source ~/.config/argus/argus.zsh
Bash Hook (.bashrc)
# ArgusTerm hook — auto-appended
source ~/.config/argus/argus.bash
📐 Architecture
Shell Failure
│
▼
argus fix "<cmd>" <exit_code>
│
├──► OSHarvester.gather_context() ← ports, git, processes, files
│
├──► BlastRadiusAnalyzer.analyze() ← danger level + affected resources
│
├──► Diagnostic Re-run ← captures stderr silently
│
└──► ModelRouter.diagnose()
│
├── Tier 1: Rule Filter ← typos, missing sudo (instant)
└── Tier 2: Gemini 3.6 Flash ← structured JSON diagnosis + iterative retry loop
⚙️ Configuration
| Environment Variable | Purpose | Default |
|---|---|---|
GEMINI_API_KEY |
Gemini API key (required) | — |
ARGUS_MODEL |
Override Gemini model | gemini-3.6-flash |
ARGUS_MAX_FILES |
Max files to list in context | 30 |
ARGUS_SKIP_GEMINI |
Skip cloud calls (rule-only mode) | false |
📄 License
MIT © ArgusTerm Contributors
Metadata
Release files for argus-term 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| argus_term-0.1.3.tar.gz | 24.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| argus_term-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 53.2 kB
Release files / argus_term-0.1.3.tar.gz
| Download URL | argus_term-0.1.3.tar.gz |
|---|---|
| Size | 24.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2f2cc93d3ddde6035c02bc84839c1318062581bd60f70fae938c6af23fe7d824
|
|
BLAKE2b-256 checksum How to use checksums |
3e1bfe51e9539be12c82fa01482677301b02cc5a5063fe2a039db742987a3685
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / argus_term-0.1.3-py3-none-any.whl
| Download URL | argus_term-0.1.3-py3-none-any.whl |
|---|---|
| Size | 28.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9e783c4b19457a1dc85583c2d3431505b7a0642bce7dc4052ab3938cbdcf3a9b
|
|
BLAKE2b-256 checksum How to use checksums |
c6bf50fabe41d54dd979b8d817ff106f1a0647729e471bde036eae546247bba9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Security for argus-term 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.