Skip to main content

nvsh

You already have an agent CLI — claude, codex, qwen, kiro, agy or a local Nemotron. nvsh puts it behind your bash prompt on NVIDIA hardware: commands run exactly as they do today, and when one fails, the agent you already trust diagnoses it and proposes a fix.

Works like a shell. Helps when things break. Fixes when you let it.

nvsh diagnosing a failed command on a DGX Spark

Recorded on a DGX Spark with the scripted demo adapter — the diagnosis text is a committed fixture, the hook, daemon, panel and approval are real; the same session on a Jetson AGX Thor and an AGX Orin.

Install

uv tool install nvsh        # or: pipx install nvsh
nvsh setup

nvsh setup inserts one marked block into your .bashrc (with a timestamped backup) that appends a function to bash's PROMPT_COMMAND. It never wraps bash and never becomes your login shell.

Set up

Command What it does
nvsh setup Probes PATH for installed harnesses. One hit becomes the default; several hits prompt you once.
nvsh setup --agent claude Picks Claude Code explicitly, no prompt.
nvsh setup --agent codex Picks Codex explicitly, no prompt.
nvsh agent list All nine adapters: pi, qwen, qwen-p, claude, codex, agy, kiro, openai-compat, demo.
nvsh agent use <name> Change the default afterwards.
nvsh uninstall Remove the rc block, hook files, sockets, logs and daemon.
NVSH_DISABLE=1, nvsh off / nvsh on Kill switches for the current shell.

Work with it

A failing command opens an inline diagnosis panel. Nothing runs without your approval — nvsh proposes, you accept, edit or reject.

Command What it does
Ctrl+G, /ask Call the agent on demand at the prompt.
/fix, /doctor More slash commands at the prompt.
@claude ..., @codex ... Send one request to a specific harness.
nvsh doctor Health checks: platform, agent reachable, hook, capture, daemon.
nvsh context --show Print exactly the bytes that would be sent.

Exit codes that aren't errors — Ctrl-C (130), SIGPIPE (141), grep finding nothing — never trigger it, and automatic calls are rate-limited.

Safety first

Nothing leaves the machine except to the agent you trust. On a successful command nvsh makes no network call at all. On a qualifying failure a redacted, bounded context slice — the command line, its exit status, at most 64 KB of its output, and the detected platform block — goes only to the agent you chose, and nowhere else.

With claude or codex, that agent is a third-party hosted service: your failure context leaves your network. With pi/Nemotron or openai-compat pointed at localhost or your LAN, it does not.

Redaction runs first, before anything leaves the process: HF_TOKEN=, --api-key, Authorization: headers and .env-style assignments are scrubbed from the context. nvsh context --show prints the post-redaction bytes so you can check before you trust it. nvsh never edits a harness's own settings or trust files — it passes launch flags and protocol-level policy, and reports what it finds.

What nvsh never does

  • Run an agent-suggested command without your confirmation.
  • Add latency or a network call to a successful command.
  • Wrap or replace bash — it hooks into the bash you already run.
  • Replace jetson-cli / dgx-spark-cli; it calls them when installed.

Not yet: macOS and zsh are untested — #11.

What lands where

Path What
$HOME/.bashrc One marked rc block, with a timestamped backup.
$XDG_DATA_HOME/nvsh/shell/ Rendered hook files.
$XDG_CONFIG_HOME/nvsh/config.toml Backend, aliases, default target.
$XDG_RUNTIME_DIR/nvsh Daemon socket and logs.
Audit log Every proposal and every decision you made on it.

More:

  • architecture — hook over wrapper, and the parked login-shell mode.
  • platforms — where each detected device value comes from.
  • shell integration and daemon — the @target grammar and the warm session.
  • CLAUDE.md — contributor conventions.
  • demos — how the recordings above were made, and the re-record loop.

License

Apache 2.0 — see LICENSE.

Release files for nvsh 0.12.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 nvsh 0.12.1
File Size Uploaded
nvsh-0.12.1.tar.gz 1.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for nvsh 0.12.1
File Interpreter ABI Platform
nvsh-0.12.1-py3-none-any.whl Python 3 none any Details

Total release size: 1.4 MB

Release files / nvsh-0.12.1.tar.gz

Download URL nvsh-0.12.1.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
52e6605afca848ec50e88c61634c920db378bc901bfa4d1a17026b86d8de25db
BLAKE2b-256 checksum
How to use checksums
30e0f9cca91569df41e37e64148edf22259317ec35b8a64aedc67d126e8b6d3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / nvsh-0.12.1-py3-none-any.whl

Download URL nvsh-0.12.1-py3-none-any.whl
Size 292.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f2b0420be551fdd4f32e7912d65a949834d059f6d43c14d097ca3c350673bb5
BLAKE2b-256 checksum
How to use checksums
82fc1769c731ebb2ac23a39d3c903e908f4f4a2ea40a142ce9f8f01be996a13e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.13 {"installer":{"name":"uv","version":"0.12.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.19.1

2 release files

0.18.0

2 release files

0.17.0

2 release files

0.16.1

2 release files

0.16.0

2 release files

0.15.0

2 release files

0.14.3

2 release files

0.14.2

2 release files

0.14.1

2 release files

0.14.0

2 release files

0.13.1

2 release files

0.13.0

2 release files

This release

0.12.1 This release

2 release files

0.12.0

2 release files

0.11.1

2 release files

0.11.0

2 release files

0.10.1

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

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