Skip to content

Commit

Permalink
README, cli: more renames
Browse files Browse the repository at this point in the history
Signed-off-by: William Woodruff <william@trailofbits.com>
  • Loading branch information
woodruffw committed Jun 28, 2024
1 parent 24fd4f1 commit 9870055
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ python -m pip install pypi-attestation-models
## Usage as a command line tool

````bash
python -m pypi_attestation_models --help
usage: pypi-attestation-models [-h] [-v] [-V] COMMAND ...
python -m pypi_attestations --help
usage: pypi-attestation [-h] [-v] [-V] COMMAND ...

Sign, inspect or verify PEP 740 attestations

Expand All @@ -30,7 +30,7 @@ positional arguments:

options:
-h, --help show this help message and exit
-v, --verbose run with additional debug logging; supply multiple times to
-v, --verbose run with additional debug logging; supply multiple times to
increase verbosity (default: 0)
-V, --version show program's version number and exit
````
Expand All @@ -40,29 +40,29 @@ options:
```bash
# Generate a whl file
make package
python -m pypi_attestation_models sign dist/pypi_attestation_models-*.whl
python -m pypi_attestations sign dist/pypi_attestations-*.whl
```
_Note_: This will open a browser window to authenticate with the Sigstore
_Note_: This will open a browser window to authenticate with the Sigstore
OAuth flow.
### Inspecting a PEP 740 Attestation
```bash
python -m pypi_attestation_models inspect dist/pypi_attestation_models-*.whl.publish.attestation
python -m pypi_attestations inspect dist/pypi_attestations-*.whl.publish.attestation
```
_Warning_: Inspecting does not mean verifying. It only prints the structure of
_Warning_: Inspecting does not mean verifying. It only prints the structure of
the attestation.
### Verifying a PEP 740 Attestation
```bash
python -m pypi_attestation_models verify --staging \
python -m pypi_attestations verify --staging \
--identity william@yossarian.net \
test/assets/rfc8785-0.1.2-py3-none-any.whl
```
The attestation present in the test has been generated using the staging
environment of Sigstore and signed by William.
The attestation present in the test has been generated using the staging
environment of Sigstore and signed by William.
## Usage as a library
Expand All @@ -76,7 +76,7 @@ Use these APIs to create a PEP 740-compliant `Attestation` object by signing a P
```python
from pathlib import Path
from pypi_attestation_models import Attestation
from pypi_attestations import Attestation
from sigstore.oidc import Issuer
from sigstore.sign import SigningContext
from sigstore.verify import Verifier, policy
Expand Down Expand Up @@ -106,7 +106,7 @@ by signing a distribution file.
```python
from pathlib import Path
from pypi_attestation_models import Attestation
from pypi_attestations import Attestation
from sigstore.models import Bundle
# Sigstore Bundle -> PEP 740 Attestation object
Expand Down
2 changes: 1 addition & 1 deletion src/pypi_attestations/_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def _parser() -> argparse.ArgumentParser:
)

parser = argparse.ArgumentParser(
prog="pypi-attestations",
prog="python -m pypi_attestations",
description="Sign, inspect or verify PEP 740 attestations",
parents=[parent_parser],
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
Expand Down

0 comments on commit 9870055

Please sign in to comment.