# damnever/pigar

:coffee: A tool to generate requirements.txt for Python project, and more than that. (IT IS NOT A PACKAGE MANAGEMENT TOOL)

Repository: https://github.com/damnever/pigar
Canonical: https://ross.abutalabs.com/products/pigar
Homepage: https://damnever.github.io/pigar/
Language: Python
License: BSD-3-Clause
License Family: permissive
Topics: pip, requirements, python, pypi, denpendenies, importerror, distribution-search
Last push: 2026-07-24T20:40:10+00:00

## Health v2 (maintenance only)
Score: 71/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 94, release rhythm 24, longevity 100
- inputs: {"age_days": 3990, "days_push": 40, "days_rel": 297, "gap_med": 326, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1794, forks 89 (observed 2026-08-28T04:05:37.283058+00:00)

## What it is
pigar is a Python CLI tool that automatically generates requirements.txt files by analyzing import statements in a project's source code, including Jupyter notebooks and dynamic imports. It can also search PyPI for distributions by top-level import name and check requirements for outdated versions.

## Use cases
- generate requirements.txt from python project imports
- find which pypi package provides an import name like bs4
- check if requirements.txt dependencies are outdated
- generate requirements for jupyter notebooks
- create separate requirements files for python 2 and 3
- resolve ImportError by mapping module name to package

## When to choose
- you need to bootstrap a requirements.txt for an existing codebase with no dependency file
- you want to trace imports (including dynamic ones and notebooks) to their distributions
- you need to look up the package behind an unfamiliar import name

## When to avoid
- you need full dependency management with lockfiles - use pipenv, uv, or poetry instead
- you need transitive dependency resolution rather than direct import scanning
- your project relies heavily on packages not installed locally and not on PyPI

## Facets
- artifact type: cli-tool
- maturity: active
- function: developer-tools, package-manager, parser, search-engine
- domain: developer-tools
- platform: python, cli, cross-platform
- tags: requirements-txt, dependency-analysis, pypi, import-scanning, jupyter-notebook, command-line, python, automation

## Member repositories
- damnever/pigar (main) score 71

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:37.283058+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:22:53.610152+00:00, confidence not recorded.
  - readme: https://github.com/damnever/pigar (fetched 2026-08-28T04:05:37.283058+00:00, sha 0c22d19f2cb7)
  - homepage: https://damnever.github.io/pigar/ (fetched 2026-08-29T11:01:45.287138+00:00, sha b7dff3033b60)
  - registry_pypi: https://pypi.org/pypi/pigar/json (fetched 2026-08-29T11:01:45.295969+00:00, sha 2df1f7f9a81f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
