Usage#

peta reads package metadata from your local environment or from the PyPI JSON API and prints it with Rich formatting. Use --format with rich, text, json, or markdown on any command. --json remains an alias for --format json.

Commands#

The command and option reference is generated from the Typer application, so it always reflects the installed version of peta. A bare peta <package> is shorthand for peta info <package>.

peta#

                                                                                
 Usage: peta [OPTIONS] COMMAND [ARGS]...                                        
                                                                                
 Human-friendly Python package metadata viewer.                                 
                                                                                
โ•ญโ”€ Options โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ --version             -V              Show version and exit.                 โ”‚
โ”‚ --no-color                            Disable colored output.                โ”‚
โ”‚ --offline                             Use only cached data; make no          โ”‚
โ”‚                                       requests.                              โ”‚
โ”‚ --refresh                             Ignore cached data and refetch.        โ”‚
โ”‚ --cache-dir                   <path>  Directory for peta's response cache.   โ”‚
โ”‚ --install-completion                  Install completion for the current     โ”‚
โ”‚                                       shell.                                 โ”‚
โ”‚ --show-completion                     Show completion for the current shell, โ”‚
โ”‚                                       to copy it or customize the            โ”‚
โ”‚                                       installation.                          โ”‚
โ”‚ --help                -h              Show this message and exit.            โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ•ญโ”€ Commands โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ info       Show detailed package metadata.                                   โ”‚
โ”‚ compare    Compare two packages, or two releases of one, and explain what    โ”‚
โ”‚            changed.                                                          โ”‚
โ”‚ deps       Show a package's recursive dependency tree.                       โ”‚
โ”‚ files      List files installed by a local package.                          โ”‚
โ”‚ origin     Show how a local package was installed and whether its files      โ”‚
โ”‚            match.                                                            โ”‚
โ”‚ versions   Show published versions of a package from PyPI.                   โ”‚
โ”‚ artifacts  Show a release's distribution files, compatibility, and           โ”‚
โ”‚            provenance.                                                       โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

peta info#

                                                                                
 Usage: peta info [OPTIONS] {package}                                           
                                                                                
 Show detailed package metadata.                                                
                                                                                
โ•ญโ”€ Arguments โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ *    package      <str>  Package name (optionally name==version). [required] โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ•ญโ”€ Options โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ --json                                         Output as JSON.               โ”‚
โ”‚ --format            <rich|text|json|markdown>  Output format: rich, text,    โ”‚
โ”‚                                                json, or markdown.            โ”‚
โ”‚                                                [default: rich]               โ”‚
โ”‚ --local     -l                                 Force local lookup.           โ”‚
โ”‚ --remote    -r                                 Force PyPI lookup.            โ”‚
โ”‚ --no-osv                                       Skip the OSV vulnerability    โ”‚
โ”‚                                                lookup.                       โ”‚
โ”‚ --no-stats                                     Skip download/dependent count โ”‚
โ”‚                                                lookups.                      โ”‚
โ”‚ --python            <str>                      Target Python interpreter.    โ”‚
โ”‚ --path              <str>                      Metadata search path;         โ”‚
โ”‚                                                repeatable.                   โ”‚
โ”‚ --help      -h                                 Show this message and exit.   โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

peta compare#

                                                                                
 Usage: peta compare [OPTIONS] {a} {b}                                          
                                                                                
 Compare two packages, or two releases of one, and explain what changed.        
                                                                                
โ•ญโ”€ Arguments โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ *    a      <str>  First package, as name or name==version. [required]       โ”‚
โ”‚ *    b      <str>  Second package, as name or name==version. [required]      โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ•ญโ”€ Options โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ --json                                             Output as JSON.           โ”‚
โ”‚ --format                <rich|text|json|markdown>  Output format: rich,      โ”‚
โ”‚                                                    text, json, or markdown.  โ”‚
โ”‚                                                    [default: rich]           โ”‚
โ”‚ --local         -l                                 Force local lookup.       โ”‚
โ”‚ --remote        -r                                 Force PyPI lookup.        โ”‚
โ”‚ --no-osv                                           Skip the OSV              โ”‚
โ”‚                                                    vulnerability lookup.     โ”‚
โ”‚ --no-stats                                         Skip download/dependent   โ”‚
โ”‚                                                    count lookups.            โ”‚
โ”‚ --python                <str>                      Target Python             โ”‚
โ”‚                                                    interpreter.              โ”‚
โ”‚ --path                  <str>                      Metadata search path;     โ”‚
โ”‚                                                    repeatable.               โ”‚
โ”‚ --changes-only                                     Show only the grouped     โ”‚
โ”‚                                                    semantic changes.         โ”‚
โ”‚ --artifacts                                        Also compare release      โ”‚
โ”‚                                                    dates, artifacts, and     โ”‚
โ”‚                                                    provenance (PyPI).        โ”‚
โ”‚ --help          -h                                 Show this message and     โ”‚
โ”‚                                                    exit.                     โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

peta deps#

                                                                                
 Usage: peta deps [OPTIONS] {package}                                           
                                                                                
 Show a package's recursive dependency tree.                                    
                                                                                
โ•ญโ”€ Arguments โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ *    package      <str>  Package name. [required]                            โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ•ญโ”€ Options โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ --json                                             Output as JSON.           โ”‚
โ”‚ --format                  <rich|text|json|markdow  Output format: rich,      โ”‚
โ”‚                           n>                       text, json, or markdown.  โ”‚
โ”‚                                                    [default: rich]           โ”‚
โ”‚ --local           -l                               Force local lookup.       โ”‚
โ”‚ --remote          -r                               Force PyPI lookup.        โ”‚
โ”‚ --why                     <str>                    Show why TARGET is a      โ”‚
โ”‚                                                    dependency.               โ”‚
โ”‚ --depth                   <int range> [1<=x<=100]  Max recursion depth.      โ”‚
โ”‚                                                    [default: 10]             โ”‚
โ”‚ --python                  <str>                    Target Python             โ”‚
โ”‚                                                    interpreter.              โ”‚
โ”‚ --python-version          <str>                    Target Python version.    โ”‚
โ”‚ --platform                <str>                    Target marker platform.   โ”‚
โ”‚ --extra                   <str>                    Activate an optional      โ”‚
โ”‚                                                    extra.                    โ”‚
โ”‚ --path                    <str>                    Metadata search path;     โ”‚
โ”‚                                                    repeatable.               โ”‚
โ”‚ --help            -h                               Show this message and     โ”‚
โ”‚                                                    exit.                     โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

peta files#

                                                                                
 Usage: peta files [OPTIONS] {package}                                          
                                                                                
 List files installed by a local package.                                       
                                                                                
โ•ญโ”€ Arguments โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ *    package      <str>  Package name. [required]                            โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ•ญโ”€ Options โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ --json                                       Output as JSON.                 โ”‚
โ”‚ --format          <rich|text|json|markdown>  Output format: rich, text,      โ”‚
โ”‚                                              json, or markdown.              โ”‚
โ”‚                                              [default: rich]                 โ”‚
โ”‚ --python          <str>                      Target Python interpreter.      โ”‚
โ”‚ --path            <str>                      Metadata search path;           โ”‚
โ”‚                                              repeatable.                     โ”‚
โ”‚ --help    -h                                 Show this message and exit.     โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

peta origin#

                                                                                
 Usage: peta origin [OPTIONS] {package}                                         
                                                                                
 Show how a local package was installed and whether its files match.            
                                                                                
โ•ญโ”€ Arguments โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ *    package      <str>  Package name. [required]                            โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ•ญโ”€ Options โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ --json                                       Output as JSON.                 โ”‚
โ”‚ --format          <rich|text|json|markdown>  Output format: rich, text,      โ”‚
โ”‚                                              json, or markdown.              โ”‚
โ”‚                                              [default: rich]                 โ”‚
โ”‚ --python          <str>                      Target Python interpreter.      โ”‚
โ”‚ --path            <str>                      Metadata search path;           โ”‚
โ”‚                                              repeatable.                     โ”‚
โ”‚ --verify                                     Hash every installed file       โ”‚
โ”‚                                              against RECORD.                 โ”‚
โ”‚ --help    -h                                 Show this message and exit.     โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

peta versions#

                                                                                
 Usage: peta versions [OPTIONS] {package}                                       
                                                                                
 Show published versions of a package from PyPI.                                
                                                                                
โ•ญโ”€ Arguments โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ *    package      <str>  Package name. [required]                            โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ•ญโ”€ Options โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ --json                                       Output as JSON.                 โ”‚
โ”‚ --format          <rich|text|json|markdown>  Output format: rich, text,      โ”‚
โ”‚                                              json, or markdown.              โ”‚
โ”‚                                              [default: rich]                 โ”‚
โ”‚ --limit   -n      <int range> [x>=1]         Max versions to show.           โ”‚
โ”‚                                              [default: 20]                   โ”‚
โ”‚ --help    -h                                 Show this message and exit.     โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

peta artifacts#

                                                                                
 Usage: peta artifacts [OPTIONS] {package}                                      
                                                                                
 Show a release's distribution files, compatibility, and provenance.            
                                                                                
โ•ญโ”€ Arguments โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ *    package      <str>  Package name (optionally name==version). [required] โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
โ•ญโ”€ Options โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ --json                                           Output as JSON.             โ”‚
โ”‚ --format              <rich|text|json|markdown>  Output format: rich, text,  โ”‚
โ”‚                                                  json, or markdown.          โ”‚
โ”‚                                                  [default: rich]             โ”‚
โ”‚ --python              <str>                      Target Python version (e.g. โ”‚
โ”‚                                                  3.13).                      โ”‚
โ”‚ --files                                          List every distribution     โ”‚
โ”‚                                                  file.                       โ”‚
โ”‚ --provenance                                     Fetch PEP 740 provenance    โ”‚
โ”‚                                                  for publisher identity.     โ”‚
โ”‚ --help        -h                                 Show this message and exit. โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Color#

peta colors Rich output when stdout is a terminal. Disable it with the root --no-color flag or the NO_COLOR environment variable; both take precedence over TTY detection. Text, JSON, and Markdown output is always plain. See Configuration for the NO_COLOR variable.

Caching and offline use#

Successful responses are cached on disk, so repeat queries cost a local read rather than a request. Package metadata and version listings are kept for an hour, and download and dependent counts for a few. A name==version lookup is not kept longer, even though a published releaseโ€™s metadata is settled: the same PyPI response carries the packageโ€™s advisory list, and an advisory can be published against a release at any time. Where a source supplies a validator, peta revalidates a stale entry conditionally, so an unchanged answer costs a round trip but no body.

Entries are removed once they pass a retention bound, so the cache does not grow without limit. Only files peta itself wrote are ever deleted, which matters if --cache-dir points somewhere that already holds your own data.

Only 200 responses are stored. An error describes the moment, not the package, so caching one would turn a transient outage into a persistent wrong answer. Credentials never reach the cache: the Libraries.io API key travels in the query string and is stripped before a URL is hashed or recorded, and only an allowlist of response headers is kept.

Root flags control it:

Flag

Effect

--offline

Contact no source. Answers come from the cache, including entries past their TTL, which are reported as cached rather than withheld. A fatal lookup the cache cannot answer exits 2 with an offline_unavailable error naming the URL; an optional enrichment source that cannot be answered stays a non-fatal warning.

--refresh

Ignore stored entries and replace them with fresh responses. Cannot be combined with --offline, which would ask peta both to refetch everything and to make no requests.

--cache-dir

Where to keep the cache. Defaults to $PETA_CACHE_DIR, then $XDG_CACHE_HOME/peta, then ~/.cache/peta (%LOCALAPPDATA%\peta\Cache on Windows).

These are root options, so they come before the command โ€” peta --offline info requests. They also work with the package shorthand, as in peta --offline requests.

JSON output records where every sourceโ€™s data came from in each source recordโ€™s freshness field. See Output contract.

Concurrent lookups#

Requests that do not depend on each other are made at the same time: a packageโ€™s vulnerability, download-count and dependent-count lookups query unrelated services, and compare resolves both of its packages together. Measured against the live services, that takes roughly a quarter off info and a little under half off compare.

The number of requests in flight is bounded by the shared clientโ€™s connection limit, so a wider fan-out cannot open connections without limit. Output does not depend on completion order: results are always assembled in the order they were asked for, so a comparison renders the same way round every time, and two sources disagreeing about the same field are still resolved by which was consulted first.

Vulnerabilities#

peta info enriches its vulnerability list from OSV.dev by default, merging OSV results with any PyPI advisories and deduping entries that share an id or alias. This lookup is best-effort: failures leave the PyPI-only results in place, add a source-specific enrichment warning, and never change the exit code. Pass --no-osv to skip it entirely.

Download and dependent counts#

peta info also shows a packageโ€™s last-month download count from pypistats.org and its dependent count from libraries.io by default. Both lookups are best-effort: a failure omits the corresponding field, adds a source-specific enrichment warning, and never changes the exit code. The dependent count additionally requires a LIBRARIES_IO_API_KEY (see Configuration); without one it is omitted with no request made. Pass --no-stats to skip both lookups. JSON envelopes expose these failures as structured warnings and mark the overall result partial. See Output contract.

Dependency tree#

peta deps <package> prints the packageโ€™s full recursive declared metadata tree (not just its direct requirements), resolving each dependency the same way info does. Requirements whose environment marker is not satisfied (e.g. an extra that is not requested, or a python_version constraint that excludes the target selected by --python-version or --platform) are skipped. Without those options, markers use the running environment. A dependency that reappears on its own ancestor path is shown once more and marked (circular) rather than being expanded again. Recursion stops at --depth (default 10) levels; deeper dependencies are omitted.

The tree is a metadata view, not a full dependency resolution. A local selected release is used when it satisfies both the incoming requirement and the selected targetโ€™s compatibility constraints; otherwise peta selects the newest PyPI release that satisfies both. If no selected release satisfies a requirement, the node is marked conflicting and is not expanded. Nodes also record whether they are unresolved, circular, or depth_limited. A future resolver-backed mode would be a separate command mode. Dependencies gated behind an extra remain inactive unless requested through the repeatable --extra option, which activates matching root requirements. --why searches only the tree built at the current --depth, so raise --depth if a target is deeper than the default.

Pass --why <target> to show every chain of dependencies that pulls <target> into the tree, instead of the full tree, e.g. peta deps flask --why certifi. If <target> is not present anywhere in the tree, peta prints a message to stderr and exits with code 1.

Release artifacts#

peta artifacts <package> answers what a release actually ships before you depend on it: which wheels and source distributions exist, how large they are, their SHA-256 digests and upload times, whether any of them is installable on your target, whether any are yanked, and what publication evidence PyPI exposes. Without a version it inspects the newest release, preferring a final version over a prerelease; name==version inspects that release instead.

Compatibility is evaluated with packagingโ€™s own tag and specifier rules โ€” the same ones an installer applies โ€” not by matching substrings in filenames. A wheel fits when one of its platform tags is one the target accepts; anything that is not a wheel is decided by Requires-Python alone, which says a source distribution may be built, not that building it will succeed. --python 3.12 evaluates against that interpreter version on this machineโ€™s platform, so the question answered is โ€œcan I install this here under that Pythonโ€. Naming the version you are already running gives the same verdicts as omitting the flag; naming a different one evaluates that interpreterโ€™s tags, which is the point of the flag.

A verdict of unknown is deliberately distinct from no: it means peta could not read the evidence โ€” an unparsable Requires-Python, say โ€” not that the file was ruled out. peta reports โ€œno file is compatibleโ€ only when every file was actually ruled out, never when it simply could not tell.

A name==version that the index does not list exits 1 like any other missing target, reported as a missing release rather than a missing package, since the project can exist while that release does not. A version that is listed but ships no files is a real release with an empty file list, and exits 0.

Flag

Effect

--python <x.y>

Judge compatibility against this Python version instead of the running interpreter.

--files

List every distribution file, not just the summary. The Rich view shortens digests to a recognizable prefix; --format text and JSON carry them in full.

--provenance

Also fetch each fileโ€™s PEP 740 provenance document for its Trusted Publisher identity. Off by default because it costs one extra request per file that has one.

peta reports publication evidence; it does not verify it. A file with no provenance has not failed verification, and a Trusted Publisher identity is reported as PyPI supplied it, not as a checked cryptographic claim. A provenance lookup that fails is reported as a failure rather than silently read as an absence, and never fails the command.

Installation origin and integrity#

peta origin explains how a locally installed distribution got there and whether its files still match what the installer recorded:

peta origin requests
peta origin mypkg --python .venv/bin/python --verify

The origin comes from direct_url.json: a VCS checkout (with the requested revision and the commit it resolved to), an archive (with its hashes), or a local directory (and whether it is editable). A distribution with no direct_url.json is reported as a package-index install, which is what an index installation leaves โ€“ though an installer that never writes the file leaves the same thing. The INSTALLER and REQUESTED markers, the import names the distribution provides, and its entry points are shown too.

Every file RECORD lists is checked against the disk. Each gets exactly one state, and the states are deliberately kept apart:

  • verified โ€“ the hash was compared and matches;

  • mismatch โ€“ the size or the hash differs from the record;

  • missing โ€“ the file is gone;

  • not_recorded โ€“ RECORD holds no hash for it, which is normal for RECORD itself and for bytecode, and is not evidence of a change;

  • unverifiable โ€“ the file could not be checked: its hash uses an algorithm peta cannot compute, or the file exists but cannot be reached or read;

  • unchecked โ€“ a hash was recorded but --verify was not given;

  • out_of_bounds โ€“ the path resolves outside the selected environment.

Hashing reads every installed file, so it only runs with --verify. Sizes are always compared, because that costs one stat per file.

RECORD is untrusted input: a row can name any path, and a symlink can point anywhere. The metadata files themselves are only read when they are regular files of plausible size, and never through a symlink โ€“ with one exception: the core metadata (METADATA, PKG-INFO, or a single-file .egg-info), which names the package and nothing more, may be a symlink, since environments built as symlink trees (Nix, for one) link every file. It must still resolve to a regular file of plausible size, and only its Name and Version are read from it. A file is only read if its resolved path lies inside the directory holding the distributionโ€™s metadata, inside the installation scheme that directory belongs to, or inside the target interpreterโ€™s prefix. The scheme is recognized from the standard site-packages layouts โ€“ lib/pythonX.Y/site-packages (or lib64), Lib/site-packages, and the user sites โ€“ which is what admits console scripts, including those of a --user install. The prefix is known for the running interpreter and for a --python target, but not once --path is given. Anything else is reported out_of_bounds rather than read. A distribution found inside a zip on the search path is reported unverifiable file by file, since peta does not read archive members. A distribution without a RECORD falls back to a legacy installed-files.txt, which carries no hashes; with neither, integrity is reported as unavailable rather than guessed from SOURCES.txt.

--verify detects drift from what the installer recorded โ€“ an edited, truncated, or replaced file. It is not a tamper-proof integrity check: the RECORD it compares against lives beside the files it describes, and peta does not defend against the installation being modified while it is being read. See Threat Model.

Human output names a local origin by its final path component only, so a report can be shared without disclosing where a checkout lives; the JSON output keeps the full URL. Credentials an installer recorded in an origin URL are removed from both.

Resolution#

For info, deps, and compare, peta checks the local environment first and falls back to PyPI. Force a source with --local/-l or --remote/-r. A name==version argument is supported by info and compare and always queries PyPI (it cannot be combined with --local). files and origin are local-only; versions is PyPI-only, and artifacts accepts name==version against PyPI. compare resolves and enriches both packages the same way info does, including the --no-osv/--no-stats flags.

Comparing packages and releases#

peta compare explains what changed between two packages, or between two releases of the same project:

peta compare django==5.2 django==6.0 --changes-only
peta compare ruff uv --format markdown

The side-by-side table is followed by the semantic changes, grouped by what they are about: release, Python range, dependencies, extras, license, and vulnerabilities. --changes-only drops the table and omits every unchanged group. Each change is marked + (added), - (removed), or ~ (changed, with its before and after values).

Values are canonicalized before they are compared, so formatting never shows up as a change: project and extra names follow PEP 503 (Django and django are the same project), specifier sets compare as sets (>=1.0,<2 equals <2, >=1.0.0), markers compare in normalized form, and license expressions are canonicalized as SPDX. A dependency whose specifier, marker, or extras moved is reported as one structured change rather than as a different count. A move to or from a direct URL reference is always reported as its own change, since it changes where the dependency installs from. Extra-gated entries are tracked per extra, and a dependency listed once per marker branch is compared as a set of whole requirements. Extras are derived from the markers that gate dependencies, so an extra that gates nothing is not reported. Advisories are matched by id or any alias, so the same vulnerability published under a different id is not reported as fixed and reintroduced, and one advisory listed under several aliases on the same side counts once.

--artifacts also fetches each releaseโ€™s file listing from PyPI and compares the release date (the first upload), the available artifacts, wheel compatibility with the running interpreter, sizes, yanked state, and whether PEP 740 provenance is available. Files are paired by role โ€” a wheel for the same tags, or the source distribution โ€” because filenames embed the version. Two different releases necessarily ship different files with different digests and sizes, so those differences are expected: they are counted in a single line instead of listed, and JSON keeps them with "expected": true. Under an unchanged filename the same difference is not expected โ€” a file re-uploaded under a published name โ€” and is listed like any other change. With --python, compatibility is reported as unknown: marker values give the targetโ€™s version and platform but not its ABI, so its tags โ€” free-threaded, 32-bit, or not CPython at all โ€” cannot be rebuilt faithfully. A missing upload time, size, or digest, or a verdict peta could not read, is a gap in the evidence and never reported as a change; a release with any undated file has no known release date. A version PyPI does not list is an empty lookup, not a failure. The listing is optional evidence: a failed lookup never fails the command.

When one side has no evidence for a group โ€” its advisory lookup failed, or its file listing could not be retrieved โ€” the group is shown as unknown rather than diffed against nothing, which would read as โ€œeverything was removedโ€. --no-osv makes the vulnerabilities of an installed package unknown for the same reason, since OSV is its only advisory source; a package read from PyPI still carries PyPIโ€™s own advisories and is compared on those.

Exit codes#

Code

Meaning

0

Success.

1

Package not found, or deps --why found no path to the target.

2

Network or PyPI HTTP error; a lookup that --offline could not answer from the cache; or invalid arguments (an unparsable name==version, --local with a version specifier, --json combined with a non-JSON --format, --offline combined with --refresh, or a parser rejection such as an unknown option or out-of-range --depth).

Failures from optional OSV, pypistats, and Libraries.io enrichment sources are reported as warnings and retain exit code 0.

With JSON output, fatal errors use the same versioned envelope as successful results and appear in the errors array. The exit codes above are unchanged, so scripts should inspect both the process status and the envelope.