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.
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 eleven adapters: pi, qwen, qwen-p, claude, codex, agy, kiro, openai-compat, demo, needle, lfm. |
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. |
Ctrl+C / Esc |
Pause the agent mid-work with a choice: [t] steer, [s] stop, [Esc] keep going (30 s timeout = keep going). [s], then a further press, kills a harness that ignores it. |
nvsh doctor --apply |
Clear a hung agent turn. |
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
@targetgrammar 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.19.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nvsh-0.19.1.tar.gz | 2.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nvsh-0.19.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.8 MB
Release files / nvsh-0.19.1.tar.gz
| Download URL | nvsh-0.19.1.tar.gz |
|---|---|
| Size | 2.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e8605e1791d99754f6b0db4e3aa1d3733c4e79bd3a25d0c7cb7d1a5607bf87b6
|
|
BLAKE2b-256 checksum How to use checksums |
53ac69b220582c6b4e95d3aaa21c8a3d71a02846b8b61a131d4a6a0201a7b0e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","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.19.1-py3-none-any.whl
| Download URL | nvsh-0.19.1-py3-none-any.whl |
|---|---|
| Size | 490.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a1f30e747605e8416c8ea0105387ab9c1688af42c54bdae82c93fd3a5ae93cc2
|
|
BLAKE2b-256 checksum How to use checksums |
8a4e4389bbab5e887c5a0ce3e649177bdd6c6c0142ca327182dd3d0bb59d79e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","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}
|