nvsh
An agent-first shell for NVIDIA Jetson, DGX Spark and RTX Spark. It runs your commands like a normal shell. When a command fails, it hands the error and device context to an agent (shell → agent), which diagnoses the problem and proposes a fix.
Works like a shell. Helps when things break. Fixes when you let it.
Status: early scaffold. The agent-first CLI baseline (below) works. The shell itself is not built yet. The design is tracked in #1 (build brief) and #2 (interactive self-healing shell).
Goal
nvsh is meant to be usable as your default login shell (chsh) on
Jetson and DGX Spark machines:
- A shell first. A thin PTY layer around your real
bash, so parsing, job control, completion, aliases and rc files work as they always have. A command that succeeds gets no added latency and no model call. - An agent second. The agent is called only on a real failure (non-zero
exit, traceback, CUDA OOM, container or service failure, missing binary)
or when you ask for it (
nvsh ask,Ctrl+G). Exit codes that aren't errors, such as Ctrl-C, SIGPIPE, orgrepfinding nothing, don't trigger it, and automatic calls are rate-limited. - Propose, don't run. You get a diagnosis and a proposed fix, then accept, edit or reject it. Nothing the agent suggests runs without your confirmation. After an approved fix, nvsh can retry the command and check that it worked.
- NVIDIA-aware. Platform detection (JetPack/L4T, DGX OS/GB10, RTX),
CUDA / TensorRT / driver versions, unified memory,
nvpmodeland the container runtime are attached to each diagnosis. - Offline by default, pluggable. The agent backend sits behind an adapter: a local model on the same box first (Nemotron initially), with the Culture mesh or a hosted API as options.
- Private by default. Secrets are redacted before anything leaves the
process, and
--show-contextshows exactly what would be sent. - Safe as a login shell.
scp,rsync,ssh host cmdand other non-interactive sessions pass straight through to the real shell. If nvsh itself fails, it falls back to that shell instead of locking you out.
nvsh is not a new POSIX shell. It is not an autonomous agent that runs
commands by itself, and it doesn't replace jetson-cli / dgx-spark-cli
(it calls them when they are installed).
Quickstart (development)
uv sync
uv run pytest -n auto # run the test suite
uv run nvsh whoami # identity from culture.yaml
uv run nvsh doctor # health checks
uv run nvsh learn # self-teaching prompt (add --json)
uv run teken cli doctor . --strict # the agent-first rubric gate CI runs
CLI
| Verb | What it does |
|---|---|
whoami |
Report this agent's nick, version, backend, and model from culture.yaml. |
learn |
Print a structured self-teaching prompt. |
explain <path> |
Markdown docs for any noun/verb path. |
overview |
Read-only descriptive snapshot of the agent. |
doctor |
Health checks (today: agent-identity invariants; planned: platform + agent backend reachability). |
cli overview |
Describe the CLI surface itself. |
Every command supports --json. Results go to stdout, and errors and
diagnostics go to stderr; the two are never mixed. Exit codes: 0 success,
1 user error, 2 environment error, 3+ reserved.
The shell verbs, including the interactive shell, run, ask,
init bash|zsh, install/uninstall as login shell, and known-good state, will
be added as the milestones in #1 and #2 land.
Repository layout
nvsh is an AgentCulture mesh agent built from the culture-agent-template:
culture.yamlholds the mesh identity (suffix: nvsh,backend: claude).- One prompt file per agent harness, with no shared base:
CLAUDE.mdfor Claude Code,AGENTS.override.md+.pi/SYSTEM.mdfor Pi/associate,AGENTS.colleague.mdfor colleague, andQWEN.mdfor Qwen Code. There is deliberately noAGENTS.md. Seedocs/harness-selection.mdanddocs/automation-contract.md. .claude/skills/holds the guildmaster skill kit, vendored cite-don't-import. Seedocs/skill-sources.md.- CI covers pytest, lint, secret scanning, the agent-first rubric gate, a per-harness smoke check, and PyPI Trusted Publishing.
Every PR bumps the version. See CLAUDE.md for the full
contributor conventions.
License
Apache 2.0 — see LICENSE.
Release files for nvsh 0.9.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.9.1.tar.gz | 240.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nvsh-0.9.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 264.4 kB
Release files / nvsh-0.9.1.tar.gz
| Download URL | nvsh-0.9.1.tar.gz |
|---|---|
| Size | 240.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
76ae4cbfa4caa7f4531ea0b663479bb4e5249495cfae06d5e71c6e304ad028d9
|
|
BLAKE2b-256 checksum How to use checksums |
3681cd959f2e224e4b4adf93f7d53805bbf42bc4d9c42d5cf9471336db661e10
|
| 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.9.1-py3-none-any.whl
| Download URL | nvsh-0.9.1-py3-none-any.whl |
|---|---|
| Size | 24.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8a4083d33f79d3304d31a134dffd3a81d8351773cb6ca0a3203f322760f7226a
|
|
BLAKE2b-256 checksum How to use checksums |
95c85ceb5eef2edbe1116aa2331b1386a5f103c05967f4c427ffb9f917574e56
|
| 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}
|