# nsh を Homebrew, apk, MacPorts, Nix でインストール

nsh のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

## インストール

```sh
sudo av install brew:nsh
```

追加のインストールコマンド:

### macOS

- Homebrew (100%):

```sh
brew install nsh
```

  証拠: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install nsh
```

  証拠: MacPorts ports tree: shells/nsh/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add nsh
```

  証拠: Alpine Linux edge package indexes: nsh from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz

- Nix (92%):

```sh
nix profile install nixpkgs#nsh
```

  証拠: nixpkgs package indexes: pkgs/by-name/ns/nsh/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## パッケージ情報

- **パッケージキー:** brew:nsh
- **パッケージマネージャ:** Homebrew
- **パッケージマネージャページ:** <https://formulae.brew.sh/formula/nsh>
- **バージョン:** 0.4.2
- **ソース概要:** Fish-like, POSIX-compatible shell
- **ホームページ:** <https://github.com/nuta/nsh>
- **リポジトリ:** <https://github.com/nuta/nsh>
- **ライセンス:** CC0-1.0 OR MIT
- **ソースアーカイブ:** <https://github.com/nuta/nsh/archive/refs/tags/v0.4.2.tar.gz>
- **生成日時:** 2026-08-04T22:13:35+00:00

## 実行可能ファイル

- nsh (cli)
- nsh (エイリアス)

## ビルド依存関係

- rust

## インストール挙動

- post-install フック: 未定義
- Bottle: 利用可能 対象 arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura

## バージョンと鮮度

- ページ生成日: 2026-08-04
- マネージャ版: 0.4.2
- ローカルデータ: OK
- 上流リポジトリ: https://github.com/nuta/nsh
- 検出された最新: v0.4.2 (最新)
- 情報: No package-manager update timestamp was available.
## プロジェクトの歴史と使われ方

nsh is a Rust command-line shell that aims to combine fish-like interactive convenience with POSIX-compatible shell syntax and some Bash extensions. Its README lists tab completion, syntax highlighting, Bash completion support by invoking Bash internally, and zero-configuration interactive features.

### プロジェクトの歴史

The GitHub repository was created on October 5, 2018, and the crates.io package was created on December 19, 2018. A Rust users forum announcement from December 17, 2018 framed the motivation as wanting fish-like out-of-the-box features while keeping traditional shell syntax and Bash scripting features.

### 採用の歴史

nsh is an experimental/alpha shell rather than a mainstream login shell. The README explicitly asks for help to make it practical for daily use and notes missing Bash features and likely bugs. Still, it drew developer interest: the GitHub repository had about 963 stars when queried on 2026-07-01, crates.io reported 33,186 total downloads and 20 versions, and Homebrew, MacPorts, Nix, and Alpine package it.

### 使われ方

Package users try it as an interactive shell with `nsh`, often via `cargo install nsh` or `brew install nsh`, to get completions and highlighting without adopting fish's non-POSIX language. The realistic usage is experimentation or personal shell sessions, not relying on it as `/bin/sh` for production scripts.

### パッケージ好きにとっての重要性

nsh sits in the recurring shell-design niche: keep Bourne/POSIX familiarity, borrow fish's interactive ergonomics, and implement it in Rust. For package catalogs it is best described as an interesting alternative shell with modest packaging footprint and alpha-stage caveats.

### タイムライン

- 2018-10-05: GitHub repository created.
- 2018-12-17: author announced nsh on users.rust-lang.org.
- 2018-12-19: crates.io package created.
- 2021-07-21: crates.io metadata updated to version 0.4.2.
- 2023-02-11: GitHub repository pushed timestamp observed by API query.

### ソース

- <https://crates.io/crates/nsh>
- <https://formulae.brew.sh/api/formula/nsh.json>
- <https://github.com/macports/macports-ports/blob/master/shells/nsh/Portfile>
- <https://github.com/nuta/nsh>
- <https://users.rust-lang.org/t/nsh-a-command-line-shell-like-fish-but-aims-to-be-compatible-with-bash/23312>


## セキュリティノート

generalized runtime or code generation signal.

- **Geiger リスク:** yellow / 中
- generalized runtime or code generation signal

## ソースデータベース詳細

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** nsh
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## 他のパッケージマネージャ記録

- Nix - nsh: normalized package name match | nixpkgs package indexes: pkgs/by-name/ns/nsh/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - nsh - 0.4.2-r1: normalized package name match | Alpine Linux edge package indexes: nsh from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | A command-line shell like fish, but POSIX compatible | https://github.com/nuta/nsh
- apk - nsh-dbg - 0.4.2-r1: normalized package name match | Alpine Linux edge package indexes: nsh-dbg from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | A command-line shell like fish, but POSIX compatible (debug symbols) | https://github.com/nuta/nsh
- MacPorts - nsh: normalized package name match | MacPorts ports tree: shells/nsh/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 関連リンク

- [Source-control packages](https://pkg.so/ja/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://pkg.so/ja/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://pkg.so/ja/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Language runtime packages](https://pkg.so/ja/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [rust](https://pkg.so/ja/brew/rust/) - Build dependency declared by Homebrew.
- [nushell](https://pkg.so/ja/brew/nushell/) - Shares pkgdb curated category or tags: cli, rust, shell, system, terminal.
- [thefuck](https://pkg.so/ja/brew/thefuck/) - Shares pkgdb curated category or tags: cli, shell, system, terminal.
- [dash-shell](https://pkg.so/ja/brew/dash-shell/) - Shares pkgdb curated category or tags: cli, posix, shell, system.
- [brush](https://pkg.so/ja/brew/brush/) - Shares pkgdb curated category or tags: cli, rust, shell, system.
- [murex](https://pkg.so/ja/brew/murex/) - Shares pkgdb curated category or tags: cli, shell, system, terminal.
- [posh](https://pkg.so/ja/brew/posh/) - Shares pkgdb curated category or tags: cli, posix, shell, system.
- [bash](https://pkg.so/ja/brew/bash/) - Shares pkgdb curated category or tags: cli, shell, system.
- [elvish](https://pkg.so/ja/brew/elvish/) - Shares pkgdb curated category or tags: cli, shell, system.
- [ansiweather](https://pkg.so/ja/brew/ansiweather/) - Local package facts share a topical domain. Shared terms: cli, shell, system, terminal.
- [clifm](https://pkg.so/ja/brew/clifm/) - Local package facts share a topical domain. Shared terms: cli, shell, system, terminal.

## Combined YAML source

View the package source record on GitHub. [combined/nsh.yml](https://github.com/mxcl/pkgdb/blob/main/combined/nsh.yml)


## ソース

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
