Skip to main content

🔍 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.

Python 3.10+ Powered by Gemini License: MIT


✨ 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:

  1. Harvest current OS state (ports, git, processes)
  2. Analyze blast radius of the suggested fix
  3. Call Gemini 3.6 Flash for diagnosis
  4. Display a Rich TUI panel with the explanation
  5. 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.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for argus-term 0.1.1
File Size Uploaded Provenance
argus_term-0.1.1.tar.gz 23.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for argus-term 0.1.1
File Interpreter ABI Platform
argus_term-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 50.9 kB

Release files / argus_term-0.1.1.tar.gz

Download URL argus_term-0.1.1.tar.gz
Size 23.2 kB
Tags Source
SHA-256 checksum
How to use checksums
38d23463b94c62a0fe6b328177f8ee4de5bc76ae27b3f2f2f2d3280b71098a48
BLAKE2b-256 checksum
How to use checksums
1a97aaa8aafa46af74fd0c9ff3267e0eae545c0d8c732b1969e875bc3bd312d3
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.1-py3-none-any.whl

Download URL argus_term-0.1.1-py3-none-any.whl
Size 27.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7daa73d365aab6fc7c2e9b4b1539c7d958efbab9218f9f54cf45f92ea719ef0b
BLAKE2b-256 checksum
How to use checksums
52abc151d96c0784a4df2a6559d3415091577462aff63792835b5db0aa0578bd
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.1

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page