Provider packages for NextIteration.SpectreConsole.Auth — the generic credential-storage and Spectre.Console command layer for .NET CLI tools.
Each package here ships the concrete types for one third-party service: its ICredential, IToken, IAuthenticationService, the ICredentialCollector that drives the interactive accounts add prompt, and an ICredentialSummaryProvider that renders safe display fields for accounts list. Drop a package in, call one DI extension, and the accounts branch of your CLI picks it up.
| Package | Service | Status |
|---|---|---|
NextIteration.SpectreConsole.Auth.Providers.SoftwareOne |
SoftwareOne Marketplace API | Ready |
NextIteration.SpectreConsole.Auth.Providers.Adobe |
Adobe VIP Marketplace API (OAuth2 via Adobe IMS) | Ready |
NextIteration.SpectreConsole.Auth.Providers.Airtable |
Airtable API (Personal Access Token) | Ready |
Each project has its own README with install instructions, the prompts the collector runs, the fields it stores, and the authentication model (refresh vs. pass-through) — see src/.
The core package (NextIteration.SpectreConsole.Auth) gives you:
- An encrypted credential store on disk, DPAPI on Windows, macOS Keychain, or Linux libsecret.
- A Spectre.Console
accountsbranch withadd | list | select | deletesubcommands. - Extensibility points:
ICredentialCollector,ICredentialSummaryProvider,IAuthenticationService<TCredential, TToken>.
A provider package plugs into those extensibility points for one specific service. You can register as many providers as you want in the same CLI — the accounts add prompt lets the user pick one at runtime.
using NextIteration.SpectreConsole.Auth;
using NextIteration.SpectreConsole.Auth.Providers.Adobe;
using NextIteration.SpectreConsole.Auth.Providers.Airtable;
using NextIteration.SpectreConsole.Auth.Providers.SoftwareOne;
services.AddCredentialStore(opts =>
{
opts.CredentialsDirectory = Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
".my-cli", "credentials");
});
// Adobe's auth service hits Adobe IMS, so it needs IHttpClientFactory.
// The other two are pass-through and don't require it — but registering
// it once is harmless.
services.AddHttpClient();
// One line per provider you want to support:
services.AddAdobeAuthProvider();
services.AddAirtableAuthProvider();
services.AddSoftwareOneAuthProvider();
// And register the accounts branch against your Spectre.Console configurator:
// config.AddAccountsBranch();From a consumer:
my-cli accounts add # provider prompt shows every registered provider
my-cli accounts list # masked display fields from each ICredentialSummaryProvider
my-cli accounts select <id>
my-cli accounts delete <id>
/
├── src/ ← provider packages, one folder per provider
├── tests/ ← xUnit test projects (one per provider)
└── NextIteration.SpectreConsole.Auth.Providers.slnx
The canonical recipe is one of the existing provider projects under src/. In short:
- New class library targeting the same framework as the core package.
PackageReferencetoNextIteration.SpectreConsole.Authat the current minor.- Types:
XxxCredential : ICredential,XxxToken : IToken,XxxAuthenticationService : IAuthenticationService<XxxCredential, XxxToken>,XxxCredentialCollector : ICredentialCollector,XxxCredentialSummaryProvider : ICredentialSummaryProvider. - A DI extension
AddXxxAuthProvider(this IServiceCollection)that registers all of the above. - A per-provider README that documents the prompts, stored fields, and authentication model.
- Tests covering credential round-trip, token projection, and summary-provider display fields.
Each provider releases independently via a per-package git tag (adobe-v*, airtable-v*, softwareone-v*). CI picks up the tag, builds, tests, and pushes just that package to nuget.org. See RELEASING.md for the full flow.
See CHANGELOG.md for release notes.
MIT © Stuart Meeks