explaingit

notatallshaw/nab

Analysis updated 2026-05-18

13PythonAudience · developerComplexity · 3/5Setup · easy

TLDR

An experimental Python tool that resolves your project's dependencies and writes a pinned lockfile, without installing anything itself.

Mindmap

mindmap
  root((repo))
    What it does
      Resolves dependency tree
      Writes pinned lockfile
      Does not install packages
    Tech stack
      Python
      PubGrub algorithm
      pyproject toml
    Use cases
      Lock project dependencies
      Build on resolver library
      Reproducible installs
    Audience
      Python developers
      Tool maintainers
      Package ecosystem builders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Generate a pinned lockfile for a Python project's dependencies.

USE CASE 2

Get a stable, reproducible list of exact package versions to hand to an installer.

USE CASE 3

Build a custom packaging tool on top of the nab-resolver or nab-index libraries.

USE CASE 4

Lock down git dependencies to a specific commit for safer builds.

What is it built with?

PythonPubGrubpyproject.toml

How does it compare?

notatallshaw/nab1lystore/awaekactashui/sjtu-ppt-template-skill
Stars131313
LanguagePythonPythonPython
Setup difficultyeasymoderatemoderate
Complexity3/52/52/5
Audiencedevelopervibe coderresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Install via pipx or uv as a standalone tool, not as a project dependency.

In plain English

Nab is an experimental Python tool that solves a common headache in software development: figuring out exactly which version of every package a project needs, so it runs the same way for everyone. You give it your project's dependency list, declared in a pyproject.toml file, and it resolves the full tree of requirements, including all the packages that your direct dependencies themselves depend on, then writes a lockfile that pins every version exactly. Nab does not install packages itself, it just produces the lockfile, and you hand that to whichever installer you prefer. The resolver is based on an algorithm called PubGrub, designed to find a consistent set of package versions that satisfies all constraints at once and to produce helpful error messages when no such set exists. The project's goal is to reach resolver performance similar to uv, another popular Python package tool, while keeping its own implementation written in Python. Nab takes a security conscious approach by default. It tries to extract package metadata without executing any code. If that is not possible, it can build packages to read their metadata, but restricts this to only your own local packages by default, not remote ones. Git dependencies must point to a specific commit rather than a floating branch name, unless you turn that restriction off yourself. The repo also exposes three standalone libraries, nab-resolver, nab-python, and nab-index, that other tools can use to build on the same resolver or index access logic. All are marked experimental and their APIs may change before the project reaches its 0.1.0 release. Installation is meant to happen through a tool manager such as pipx or uv, rather than as a regular project dependency, which keeps it isolated from the packages it is resolving.

Copy-paste prompts

Prompt 1
Show me how to install nab with pipx and generate a pylock.toml for my project.
Prompt 2
Explain the difference between nab's build-local and build-remote policies and which one I should use.
Prompt 3
Walk me through how PubGrub resolves conflicting version constraints in this project.
Prompt 4
Help me pin the nab-resolver library at its current experimental version in my own tool.

Frequently asked questions

What is nab?

An experimental Python tool that resolves your project's dependencies and writes a pinned lockfile, without installing anything itself.

What language is nab written in?

Mainly Python. The stack also includes Python, PubGrub, pyproject.toml.

How hard is nab to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is nab for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.