Skip to main content

🔍 ArgusTerm

An OS-aware AI terminal copilot. ArgusTerm watches your shell for failed commands, harvests OS state, analyzes blast radius, and uses Gemini 2.5 Flash to suggest fixes — all before you can blink.

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
🧠 Two-Tier Diagnosis Instant rule-based fixes for typos, cloud-escalated Gemini for complex errors
🎨 Rich TUI Beautiful terminal panels, tables, and interactive prompts
🪝 Shell Hooks Non-blocking Zsh/Bash hooks that trigger automatically on failure

🚀 Quickstart

1. Install

git clone https://github.com/argus-term/argus-term
cd argus-term
pip install -e .

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 2.5 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
     │
     └──► ModelRouter.diagnose()
              │
              ├── Tier 1: Rule Filter      ← typos, missing sudo (instant)
              └── Tier 2: Gemini 2.5 Flash ← structured JSON diagnosis

⚙️ Configuration

Environment Variable Purpose Default
GEMINI_API_KEY Gemini API key (required) —
ARGUS_MODEL Override Gemini model gemini-2.5-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.0

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.0
File Size Uploaded Provenance
argus_term-0.1.0.tar.gz 23.1 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 50.6 kB

Release files / argus_term-0.1.0.tar.gz

Download URL argus_term-0.1.0.tar.gz
Size 23.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6f0ddd7e0cf62869f627ec6d01fc2dfe8950e5e2fc0862df81627f8d4c329b6e
BLAKE2b-256 checksum
How to use checksums
50b7ec1704fe3d58b977a7f3683c6678a8024dce9e24ed799a30e2e7f37eaaf1
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.0-py3-none-any.whl

Download URL argus_term-0.1.0-py3-none-any.whl
Size 27.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
31676a1f5b5119be970259bda65d8727e7746bbf905cb06f2212c7d7760d4fd8
BLAKE2b-256 checksum
How to use checksums
478fe9ea755dad4ab2df8ea051471a4d03c71c336b193cccfb9c0508fd009538
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.0

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