Inedo
ProGet CLI (pgutil) 2.0 has Been Released!
pgutil is an open-source, cross-platform command line tool that provides a variety of commands to upload/download packages, manage feeds, audit package compliance, assess vulnerabilities, etc.
We released pgutil 1.0 alongside ProGet 2024 and over the past several months, we’ve been steadily adding new commands to the tool and a few new HTTP Endpoints to ProGet. And most importantly, we’ve been carefully documenting the commands along the way.
In this article, I’ll talk a little more about what pgutil is, our plans for the HTTP Endpoints (API), and our future plans for the tool.
What and Why pgutil?
Although we’ve been publishing open-source command line tools like pgscan and upack for quite a while, I never considered them to be a “core” feature of ProGet. They started as “free community tools” and we never put a lot of thought into their design or documentation. I suppose these tools were “okay enough”, but they were far from great.
pgutil represents a new approach and a new mindset: I consider it to be a core feature of ProGet, and I want to it be a great CLI. After lots of research into lots of different tools, I think the most important CLI features are documentation and intuitiveness.
When you run pgutil without any arguments, you’ll see a comprehensive list of “command sets”.
$> pgutil
.--. --. ..- - .. .-..
pgutil v2.0.0.0
.--. --. ..- - .. .-..
Description:
Perform operations against a ProGet server.
Usage:
pgutil [command] [options]
Commands:
sources Manages the list of sources located in the configuration file located at
C:\Users\Vasse\AppData\Roaming\pgutil\pgutil.config
health Displays health and status information
packages Works with packages on a ProGet server
vulns Audits packages and assesses vulnerabilities
builds Manages SCA builds and SBOM documents
licenses Manages license definitions and audits package licenses
apikeys Manages ProGet API keys
assets Works with a ProGet asset directory
settings Manages ProGet Settings
feeds Views and manages ProGet feeds
connectors Views and manages ProGet connectors
If you’ve used ProGet, then most of these will be familiar to you and you can intuitively “navigate” the commands. For example, pgutil packages will show you commands to work with packages:
$> pgutil packages
Description:
Works with packages on a ProGet server
Usage:
pgutil packages [command] [options]
Commands:
download Downloads a package file from ProGet
upload Uploads a package file to ProGet.
delete Deletes a package from ProGet
status Changes the status of a package on ProGet
repackage Repackages a package in ProGet to a package with a different version
promote Promotes a package from one feed to another
audit Analyzes a package for compliance issues
list Displays latest versions of packages in a feed
versions Displays all versions of packages in a feed
Even though the CLI commands are mostly aligned to UI actions, we still have real documentation for all of these commands. As I wrote in The New Inedo Docs, and Why We Built Yet Another CMS, we care a lot about documentation and want our users to get the help they need right away by simply searching.
And since you can’t Google a CLI, we have corresponding articles like Packages Commands in pgutil that show you how to use each command with examples. You’ll also see documentation on using ProGet’s API (HTTP Endpoints) to accomplish the same thing.
ProGet API & HTTP Endpoints
Behind the scenes, pgutil uses ProGet’s HTTP Endpoints (API). Most of these HTTP Endpoints are not new, and you may have used some of them in your own scripts or programs.
ProGet’s HTTP Endpoints were developed over the years around a particular feature, such as feed configuration or asset management. We’d often build them on request, and work closely with users to make them more usable. As such, they’re not really consistent and aren’t as easy to use as I’d like.
As of ProGet 2024, we’re going to take a new, pgutil-first approach to HTTP Endpoints. This means that, before developing a new API, we need to think of it as an intuitive pgutil command with clear documentation.
Roadmap & Contributing to pgutil
pgutil has a lot of commands today, but it’s not “feature complete”. I would still like to see more commands added, such as a pgutil upack to replace the upack CLI. We should also have commands for configuring access controls, and perhaps some improved audit arguments.
Overall, I’d love to get your feedback. We’re very open to developing and enhancing pgutil, and our preference is to work closely with users to do that.
You’re welcome to simply post a request to the Inedo Forums, but may also be able to show us exactly how you’d like a command to work by prototyping something in the pgutil GitHub repository.