A CLI tool for managing Sonatype Nexus3 via its REST API
Project description
nexus3-tool
A command-line tool for managing Sonatype Nexus3 via its REST API, following a familiar docker-style command pattern.
⚠️ This package is in early development (v0.1.0). Commands are scaffolded but not yet fully implemented. Watch this space!
Installation
pip install nexus3-tool
Usage
nexus3-tool [OPTIONS] COMMAND [ARGS]...
Options:
--version Show the version and exit.
--help Show this message and exit.
Commands:
login Authenticate with a Nexus3 instance.
prune-docker-repo Prune old tags from a Nexus3 Docker repository.
Login
Authenticate with your Nexus3 instance. Credentials will be stored in ~/.nexus-credentials for use by subsequent commands.
nexus3-tool login https://nexus.example.com
Prune Docker Repository
Remove old image tags from a hosted Docker repository, keeping only the most recent.
# Keep the 5 most recent tags (default)
nexus3-tool prune-docker-repo my-app
# Keep the 10 most recent tags
nexus3-tool prune-docker-repo my-app --keep-last=10
Planned Features
nexus3-tool login <url>— Authenticate and store credentials in~/.nexus-credentialsnexus3-tool prune-docker-repo <image> --keep-last=<n>— Prune old Docker image tags
Development
Clone the repository and install in editable mode:
git clone https://github.com/tkdpython/nexus3-tool.git
cd nexus3-tool
pip install -e ".[dev]"
Publishing a Release
Releases are published to PyPI automatically via GitHub Actions when a version tag is pushed:
git tag v0.1.0
git push origin v0.1.0
The workflow uses PyPI Trusted Publishers (OIDC) — no API token secrets required.
You must configure a Trusted Publisher on PyPI for this repository first. See the setup guide below.
PyPI Trusted Publisher Setup
- Log in to pypi.org and navigate to your project (or create it via the first manual publish).
- Go to Manage → Publishing and add a new Trusted Publisher:
- Owner:
tkdpython - Repository:
nexus3-tool - Workflow filename:
publish.yml - Environment name:
release
- Owner:
- On GitHub, create a Environment named
releaseunder Settings → Environments (optional but recommended for approval gates).
License
MIT © tkdpython
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nexus3_tool-0.1.0.tar.gz.
File metadata
- Download URL: nexus3_tool-0.1.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cce30d22ac5c5eb815f2848f2d06a918ff837de1ac32cee00f4eba117526fe94
|
|
| MD5 |
c73996ec7cb080dd5e4a19f74c6596cc
|
|
| BLAKE2b-256 |
d8a7eb4914a242ff094eab8443c54debd4cf976ebbbe2150f28703c476e5be8f
|
Provenance
The following attestation bundles were made for nexus3_tool-0.1.0.tar.gz:
Publisher:
publish.yml on tkdpython/nexus3-tool
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nexus3_tool-0.1.0.tar.gz -
Subject digest:
cce30d22ac5c5eb815f2848f2d06a918ff837de1ac32cee00f4eba117526fe94 - Sigstore transparency entry: 1048076287
- Sigstore integration time:
-
Permalink:
tkdpython/nexus3-tool@7a513ea3d8fa928ecb26bd57dc3028dfc7015a2e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/tkdpython
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7a513ea3d8fa928ecb26bd57dc3028dfc7015a2e -
Trigger Event:
push
-
Statement type:
File details
Details for the file nexus3_tool-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nexus3_tool-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e7aeb2c9e62349b33ddabfbba6a5a2f9a14853e5b1b475034b8fc6868f0d3f9
|
|
| MD5 |
303a09a39460b1875dcd853bed796403
|
|
| BLAKE2b-256 |
68fd7de9486464817b3639fdb7544c4d659c1b608e64fdf320cf5a31b59145c8
|
Provenance
The following attestation bundles were made for nexus3_tool-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on tkdpython/nexus3-tool
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nexus3_tool-0.1.0-py3-none-any.whl -
Subject digest:
1e7aeb2c9e62349b33ddabfbba6a5a2f9a14853e5b1b475034b8fc6868f0d3f9 - Sigstore transparency entry: 1048076374
- Sigstore integration time:
-
Permalink:
tkdpython/nexus3-tool@7a513ea3d8fa928ecb26bd57dc3028dfc7015a2e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/tkdpython
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7a513ea3d8fa928ecb26bd57dc3028dfc7015a2e -
Trigger Event:
push
-
Statement type: