https://github.com/woile/npt
Nix Package Tool. A (humble) successor to linux's apt, which makes life easier when using nix as a package manager.
https://github.com/woile/npt
apt brew flake nix package-manager pacman
Last synced: about 2 months ago
JSON representation
Nix Package Tool. A (humble) successor to linux's apt, which makes life easier when using nix as a package manager.
- Host: GitHub
- URL: https://github.com/woile/npt
- Owner: woile
- License: lgpl-2.1
- Created: 2023-01-08T17:03:30.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-12T17:53:57.000Z (almost 2 years ago)
- Last Synced: 2025-03-16T16:11:44.157Z (about 2 months ago)
- Topics: apt, brew, flake, nix, package-manager, pacman
- Language: Rust
- Homepage:
- Size: 52.7 KB
- Stars: 27
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# NPT
> Nix Package Tool
A (humble) successor to linux's `apt`, which makes life easier when using [nix](https://nixos.org/) as a package manager.
This is a tool I'm using in my nix journey, it's supposed to ease the transition from other
package managers to nix.The idea is to use [nix profiles](https://nixos.org/manual/nix/stable/package-management/profiles.html) in the way you'd use `apt` or `brew`.
It is a work in progress, but feel free to play with it.
## Requirements
- Install [nix the package manager](https://nixos.org/download.html)
- [Enable flakes](https://nixos.wiki/wiki/Flakes#Enable_flakes)Or just use the [nix installer](https://github.com/DeterminateSystems/nix-installer)
```sh
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
```## Goals
- Help the transition from traditional package managers (`apt`, `brew`, `pacman`, etc) to nix
- Good and intuitive UX
- Learn nix while using, this can display the commands executed `npt --teacher install `## Installation
```sh
nix profile install 'github:woile/npt#npt'
```## Usage
```$ npt --help
Nix Package ToolUsage: npt [OPTIONS]
Commands:
install Install packages for the profile, if no repository provided, it defaults to nixpkgs [aliases: i]
list List installed packages [aliases: ls]
upgrade Update all or specific packages [aliases: u]
search Find a package in the registry, if no repository provided, it defaults to nixpkgs [aliases: s]
remove Remove one or more packages [aliases: rm]
help Print this message or the help of the given subcommand(s)Options:
-t, --teacher
-h, --help Print help information
-V, --version Print version information
```## TODO
- [ ] How to make search accept a repo only?
- [ ] How to make search accept a regex?
- [ ] Accept a package or expression in the List command
- [ ] Implement `update` command
- [ ] provide compiled tar's to speed up flakes## Contributing
1. Make changes
2. Create a git commit
3. Run```sh
nix flake update
```4. Create a git commit