install

An installer command that chooses a compatible package version for GPU libraries such as PyTorch, TensorFlow, and JAX.

In plain words
What is it for?
Detecting your NVIDIA driver, finding the CUDA version it supports, and printing a matching pip install command.
Why use it?
It prevents CUDA version mismatches, which can otherwise produce confusing installation or runtime errors.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/mitulgarg/env-doctor/install
Clone the repo
git clone --depth 1 https://github.com/mitulgarg/env-doctor
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 494 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00494
Opus 5 $0.00000 $0.00247
Sonnet 5 $0.00000 $0.00099
Haiku 4.5 $0.00000 $0.00049

Measured 3d ago against content hash 94f66ae1e290, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

install scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/commands/install.md · 90 lines

How it starts

The opening of the file, as written. The whole thing — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.

install

Get the safe install command for GPU libraries that matches your driver.

Usage

env-doctor install <library>

Supported Libraries

  • torch / pytorch - PyTorch with correct CUDA wheels
  • tensorflow - TensorFlow with GPU support
  • jax - JAX with CUDA support

How It Works

  1. Detects your NVIDIA driver version
  2. Determines the maximum CUDA version your driver supports
  3. Looks up the correct wheel URL for that CUDA version
  4. Outputs the exact pip install command

Example

env-doctor install torch

Output:

🔍 Detecting your GPU environment...

🎮 GPU Driver: 535.146.02
   └─ Max CUDA: 12.2

⬇️ Run this command to install the SAFE version:
---------------------------------------------------
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121
---------------------------------------------------

💡 This installs PyTorch built for CUDA 12.1, which is compatible
   with your driver (supports up to CUDA 12.2).

Why This Matters

The default pip install torch gives you the latest wheel, which might be built for CUDA 12.4. If your driver only supports CUDA 11.8, you'll get cryptic errors like:

RuntimeError: CUDA error: no kernel image is available for execution on the device

Env-Doctor prevents this by prescribing the correct version for your hardware.

Common Scenarios

Older Driver

$ env-doctor install torch

🎮 GPU Driver: 470.82.01
   └─ Max CUDA: 11.4

⬇️ Run this command to install the SAFE version:
---------------------------------------------------
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu113
---------------------------------------------------

No GPU Detected

$ env-doctor install torch

⚠️  No NVIDIA GPU detected

⬇️ Installing CPU-only version:
---------------------------------------------------
pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
---------------------------------------------------

Read the full file on GitHub · 90 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 90 lines · 0 tokens per session scan A 94f66ae1e290

Subscribe to this mod's changes

install is a command published in the GitHub repository mitulgarg/env-doctor (172 stars, last pushed 4d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 494 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.