https://github.com/eureka-cpu/ns
A unified interface for nix shell.
https://github.com/eureka-cpu/ns
devshell flakes nix nix-command nix-shell
Last synced: about 1 month ago
JSON representation
A unified interface for nix shell.
- Host: GitHub
- URL: https://github.com/eureka-cpu/ns
- Owner: eureka-cpu
- License: mit
- Created: 2026-01-09T19:54:04.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2026-02-07T07:36:51.000Z (about 2 months ago)
- Last Synced: 2026-02-07T17:37:39.776Z (about 2 months ago)
- Topics: devshell, flakes, nix, nix-command, nix-shell
- Language: Rust
- Homepage:
- Size: 25.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ns
An intuitive nix shell interface that unifies the `nix shell`, `nix develop` and `nix-shell` commands.
Rather than exposing rigid per-command options, `ns` infers intent from the structure of the expression
itself, selecting an appropriate strategy based on the system's capabilities and available entrypoints.
The entire interface can be summarized by the following excerpt of the manpage:
```
ns [OPTION]… [SOURCE]… [TARGET_DIR]
```
>
> Each SOURCE is positional and may be one of:
>
> URI#ATTR select a devshell or package from a flake
> URI#{DRV1,DRV2} compose multiple packages from a flake
> DIR#ATTR select from a local flake
> DIR use the default devshell in a directory
>
> If the final argument is a plain directory path, ns will switch to that
> directory before entering the subshell.
>
> If a single SOURCE is provided and it is a directory, ns switches into
> it by default unless a TARGET_DIR is explicitly given.
>
Try it from anywhere:
```sh
# requires flakes and nix-command experimental features
nix run github:eureka-cpu/ns -- #
```
Add or remove it from your user profile:
```sh
nix profile install github:eureka-cpu/ns
nix profile remove ns
```
## Contributing
> [!Important]
> Additional options and flags are intentionally limited to avoid cluttering the interface.
> It is the opinion of the maintainers of this package that such options are better off as
> part of a `flake.nix` devshell, `shell.nix`, or system configuration, where such options
> are homogenous with the design of `ns.` Please take this into consideration and explore
> other options before opening issues or pull requests.
Fork the repository on GitHub, then:
```sh
git clone git@github.com:USERNAME/ns.git
nix profile install github:eureka-cpu/ns
ns ns
```
Open an issue and submit a pull request with closing keywords.