A light client for Nexus repository manager API
1.2K
This repository wraps this Nexus repository manager API instance.
To run the Nexus API client execute the following docker run command to get the client usage:
docker run --rm --interactive --tty cyd01/nexuscli
Set a NEXUS_URL environment variable with the URL of your Nexus instance.
export NEXUS_URL="http://nexus.example.com:8081/"
docker run --rm --interactive --tty --env NEXUS_URL cyd01/nexuscli status reachable
Remote instance is reachable
Note: reachable is the only API call that do not require authentication.
It is possible to authenticate with username and password. Just set NEXUS_AUTH_USER and NEXUS_AUTH_PASS environment variables
export NEXUS_AUTH_USER="admin"
export NEXUS_AUTH_PASS="admin123"
docker run --rm --interactive --tty --env NEXUS_URL --env NEXUS_AUTH_USER --env NEXUS_AUTH_PASS cyd01/nexuscli status check
Name Healthy Message Time Duration Timestamp
-------------------------- ------- --------------------------------------------------------------------------- ------------- -------- -----------------------------
AvailableCPU true The host system is allocating a maximum of 8 cores to the application. 1707921165926 0 2024-02-14T15:32:45.926+01:00
AzureBlobStore false 0 0
BlobStores false 0 0
CoordinateContentSelectors true No content selectors using coordinates found. 1707921165928 0 2024-02-14T15:32:45.928+01:00
DefaultAdminCredentials true 1707921165926 2 2024-02-14T15:32:45.926+01:00
DefaultRoleRealm true Default Role Realm not in use. 1707921165934 0 2024-02-14T15:32:45.934+01:00
FileBlobStoresPath true 1707921165934 6 2024-02-14T15:32:45.934+01:00
FileDescriptors true 1707921165928 0 2024-02-14T15:32:45.928+01:00
Licensing true 1707921165926 0 2024-02-14T15:32:45.926+01:00
LifecyclePhase true 1707921165926 0 2024-02-14T15:32:45.926+01:00
NuGetV2repositories true No NuGet version 2 repositories found. 1707921165880 0 2024-02-14T15:32:45.880+01:00
ReadOnlyDetector true 1707921165926 0 2024-02-14T15:32:45.926+01:00
RecentVersion true 1707921165923 0 2024-02-14T15:32:45.923+01:00
Scheduler true 1707921165923 38 2024-02-14T15:32:45.923+01:00
Scripting false Enabling and running scripts is not recommended as this bypasses securit... 1707921165926 0 2024-02-14T15:32:45.926+01:00
ThreadDeadlockDetector true 1707921165928 2 2024-02-14T15:32:45.928+01:00
Transactions true 1707921165928 0 2024-02-14T15:32:45.928+01:00
By default this Nexus API client prints results in a Docker-style well-formatted output.
There is a useful parameter option: -raw to print the original JSON response.
docker run --rm --interactive --tty --env NEXUS_URL --env NEXUS_AUTH_USER --env NEXUS_AUTH_PASS cyd01/nexuscli blobstore ls -raw
[
{
"softQuota": {
"type": "",
"limit": 0
},
"name": "default",
"type": "File",
"unavailable": false,
"blobCount": 294,
"totalSizeInBytes": 1692622134,
"availableSpaceInBytes": 74767597568
},
...
Content type
Image
Digest
sha256:d478eb9a6…
Size
19.1 MB
Last updated
3 months ago
docker pull cyd01/nexuscli