Skip to content

woile/npt

Repository files navigation

NPT

Nix Package Tool

A (humble) successor to linux's apt, which makes life easier when using nix 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 in the way you'd use apt or brew.

It is a work in progress, but feel free to play with it.

Requirements

Or just use the nix installer

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 <package>

Installation

nix profile install 'github:woile/npt#npt'

Usage

Nix Package Tool

Usage: npt [OPTIONS] <COMMAND>

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
nix flake update
  1. Create a git commit

About

Nix Package Tool. A (humble) successor to linux's apt, which makes life easier when using nix as a package manager.

Topics

Resources

License

Stars

Watchers

Forks