Your terminal,
with an AI copilot.

nsh sits in your shell. Ask questions with ?, and it investigates, asks clarifying questions, runs safe intermediate steps, and verifies outcomes before finishing. Dangerous commands are always gated.

$
curl -fsSL https://nsh.tools/install.sh | bash
Native Windows PowerShell Installer
View on GitHub
pwsh — 120x30 esc when done

Features

{}

Context-Aware

nsh reads your scrollback, knows your project, and remembers history. It understands context without explanation.

>_

Autonomous Workflows

nsh chains investigation, execution, and verification. Safe intermediate steps continue automatically; dangerous commands always require explicit confirmation.

::

Multi-Provider

Works with OpenRouter, Anthropic, OpenAI, Gemini, or local models via Ollama. Bring your own key.

🔒

Secure by Default

Secrets are redacted locally. Dangerous commands require confirmation. Sensitive paths blocked.

Extensible

Custom skills, MCP tool servers, persistent memory, and project-local configuration.

Open Source

BSD 3-Clause licensed. All data local in SQLite. No telemetry. No vendor lock-in.

How It Works

01 Ask

Type ? followed by your natural language question right in your terminal.

02 Investigate

nsh analyzes your shell history, runs safe checks, reads relevant files, and asks you to disambiguate when names are ambiguous.

03 Execute & Verify

nsh executes safe intermediate steps, checks results, recovers from errors, and only finishes when the task is actually complete.

Works with your existing shell on macOS, Linux, FreeBSD, and Windows.

$ zsh
$ bash
$ fish
> pwsh

Quick Start

1
# Install nsh
curl -fsSL https://nsh.tools/install.sh | bash
2
# ~/.config/nsh/config.toml
[llm]
provider = "anthropic"
api_key = "sk-..."
3
# Start using it
$ ? set up a python virtualenv for this repo