Reimaginate.CLI.Microsoft.ServiceBus.Tools
1.0.0-rc.66
dotnet add package Reimaginate.CLI.Microsoft.ServiceBus.Tools --version 1.0.0-rc.66
NuGet\Install-Package Reimaginate.CLI.Microsoft.ServiceBus.Tools -Version 1.0.0-rc.66
<PackageReference Include="Reimaginate.CLI.Microsoft.ServiceBus.Tools" Version="1.0.0-rc.66" />
<PackageVersion Include="Reimaginate.CLI.Microsoft.ServiceBus.Tools" Version="1.0.0-rc.66" />
<PackageReference Include="Reimaginate.CLI.Microsoft.ServiceBus.Tools" />
paket add Reimaginate.CLI.Microsoft.ServiceBus.Tools --version 1.0.0-rc.66
#r "nuget: Reimaginate.CLI.Microsoft.ServiceBus.Tools, 1.0.0-rc.66"
#:package Reimaginate.CLI.Microsoft.ServiceBus.Tools@1.0.0-rc.66
#addin nuget:?package=Reimaginate.CLI.Microsoft.ServiceBus.Tools&version=1.0.0-rc.66&prerelease
#tool nuget:?package=Reimaginate.CLI.Microsoft.ServiceBus.Tools&version=1.0.0-rc.66&prerelease
Reimaginate CLI
Reimaginate CLI provides composable .NET command modules for building an internal CLI host. Each package contributes command registrations and command implementations for a specific tool area, so applications can install only the modules they need.
The packages are designed to be consumed by a host application that wires Microsoft.Extensions.Hosting, dependency injection, System.CommandLine, and one or more Reimaginate CLI command modules.
Packages
| Package | Purpose |
|---|---|
Reimaginate.CLI.Base |
Core command abstractions, shared verbs, stash helpers, token preprocessing, and root command helpers. |
Reimaginate.CLI.Microsoft.ACS.Tools |
Azure Container Apps commands for listing, exporting, copying, deploying, stopping, scaling, and updating apps and jobs. |
Reimaginate.CLI.Microsoft.AZCost.Tools |
Azure cost list and export commands. |
Reimaginate.CLI.Microsoft.CRM.Tools |
Dynamics 365 and Dataverse commands for list, export, compare, copy, activate, deactivate, and user role/team operations. |
Reimaginate.CLI.Microsoft.ServiceBus.Tools |
Azure Service Bus commands for listing queues, resubmitting dead-letter messages, and copying namespace or queue topology. |
Installation
Install the base package and the command modules your host needs:
dotnet add package Reimaginate.CLI.Base
dotnet add package Reimaginate.CLI.Microsoft.ACS.Tools
dotnet add package Reimaginate.CLI.Microsoft.AZCost.Tools
dotnet add package Reimaginate.CLI.Microsoft.CRM.Tools
dotnet add package Reimaginate.CLI.Microsoft.ServiceBus.Tools
Command modules reference Reimaginate.CLI.Base, so installing a module also brings in the shared CLI foundation.
Quick Start
The host owns application startup and chooses which command modules to expose:
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Reimaginate.CLI.Base.Config;
using Reimaginate.CLI.Base.Helpers;
using Reimaginate.CLI.Microsoft.ACS.Tools.Config;
using Reimaginate.CLI.Microsoft.AZCost.Tools.Config;
using Reimaginate.CLI.Microsoft.CRM.Tools.Config;
using Reimaginate.CLI.Microsoft.ServiceBus.Tools.Config;
using Reimaginate.Mediator;
using System.CommandLine;
var builder = Host.CreateDefaultBuilder(args)
.ConfigureAppConfiguration((hostingContext, configuration) =>
{
configuration.Sources.Clear();
configuration.AddEnvironmentVariables();
})
.ConfigureServices((hostContext, services) =>
{
services.AddSingleton<IMediator, AppMediator>();
AppMediator.RegisterHandlers(services);
services.AddMicrosoftAcsCliCommands(hostContext.Configuration);
services.AddMicrosofAzCostCliCommands(hostContext.Configuration);
services.AddMicrosoftCrmCliCommands(hostContext.Configuration);
services.AddMicrosoftServiceBusCliCommands(hostContext.Configuration);
})
.ConfigureLogging(logging => logging.ClearProviders());
using var app = builder.Build();
await app.StartAsync();
var rootCommand = new RootCommand();
rootCommand.AddBaseCommands(app.Services);
rootCommand.AddMicrosoftAcsTools(app.Services);
rootCommand.AddMicrosoftAzCostTools(app.Services);
rootCommand.AddMicrosoftCrmTools(app.Services);
rootCommand.AddMicrosoftServiceBusTools(app.Services);
var processedArgs = await ArgumentsPreprocessor.ReplaceTokens(args);
var exitCode = await rootCommand.Trim().Parse(processedArgs).InvokeAsync();
await app.StopAsync();
return exitCode;
AppMediator is the application's mediator implementation. The test host in this repository uses the generated mediator pattern from Reimaginate Mediator; applications can use the same approach or provide another IMediator implementation that can dispatch the registered CLI requests.
Dynamic Tool Packages
Hosts can also load command modules from NuGet at runtime by using the dynamic tool runtime in Reimaginate.CLI.Base. A package can expose an ICliToolModule implementation to register its services and commands, or the runtime can fall back to scanning the package assembly for existing TopLevelCommand, SubCommand<>, and IHandler<TRequest,TResponse> types.
The base package adds these commands:
tools install <package-id> --version <version> --source <source> --yes
tools update <package-id> --version <version> --source <source> --prerelease --yes
tools list
tools remove <package-id> --yes
tools restore
Dynamic installs and updates are explicit trust decisions. tools install and tools update warn that the package will execute local .NET code on future CLI runs, and installs pin the resolved package version in the local manifest under the user's Reimaginate CLI app data folder. Newly installed or updated commands are loaded on the next process run.
Hosts can bundle dynamic tools by shipping .nupkg files in an app-relative bundled-tools directory. Bundled tools are loaded before user-installed tools, are not written to the user manifest, and cannot be removed with tools remove. tools list shows whether each tool came from the application bundle or the user's local tool manifest.
The test host wires the dynamic runtime as a proof host: it loads bundled and installed modules before building dependency injection, uses the reflection-based mediator from Reimaginate.CLI.Base, and adds dynamic root commands after the service provider is built.
See Dynamic and Bundled CLI Tools for host and operator guidance, and Dynamic Tool Package Authoring for package authoring guidance.
Sample Hosts
Reference host projects are available under samples:
| Sample | Demonstrates |
|---|---|
Reimaginate.CLI.Samples.CompiledHost |
A compiled-in host that directly references first-party tool projects. |
Reimaginate.CLI.Samples.DynamicUserToolsHost |
A base host that supports user-installed dynamic tools without bundled packages. |
Reimaginate.CLI.Samples.DynamicBundledToolsHost |
A dynamic host that loads app-bundled .nupkg tools before user-installed tools. |
Command Areas
First-party tools use an Azure CLI-style command surface: <tool> <resource-group> <command>. This release is a hard cutover from the older verb-first shape, so paths such as acs list jobs, d365 export users, and service-bus copy queues are no longer registered.
| Area | Top-level command | Capabilities |
|---|---|---|
| Base | stash and shared verbs |
Store reusable values, preprocess command tokens, and provide shared command scaffolding. |
| Azure Container Apps | acs |
List apps/jobs, export app/job definitions, copy resources with patches, deploy jobs, stop executions, scale apps/jobs, and update apps/jobs. |
| Azure Cost | azcost |
List and export Azure cost data for a subscription and date range. |
| Dynamics 365 / Dataverse | d365 |
List metadata, export data and definitions, compare/copy user permissions, and activate/deactivate workflows. |
| Azure Service Bus | service-bus |
List queues, resubmit dead-letter messages, copy namespaces, and copy queues between namespaces. |
Use the generated command help from your host application for the complete command and option reference. See Azure Container Apps CLI Commands for ACS app scale examples and scale rule file shape.
Authentication and Configuration
- Descriptor-backed tools expose a guided
setupcommand that creates/selects a shared profile and stores non-secret target settings. For example:acs setup,d365 setup,service-bus setup --profile dev --subscription <subscription-id> --yes, andaz-cost setup. - Azure Container Apps and Azure Cost commands use Azure SDK clients with
DefaultAzureCredential. Configure credentials through the standard Azure Identity mechanisms for your runtime environment. - Dynamics 365 and Dataverse commands accept a direct connection string with
--conn, or a Key Vault secret with--kvand--secret.--kvcan also be a fully qualified Key Vault secret URI. When neither is provided, pass--url <dataverse-environment-url>to authenticate with non-interactiveDefaultAzureCredentialusing existing Azure Identity sign-ins such asaz login, Visual Studio, Azure PowerShell, Azure Developer CLI, managed identity, or environment credentials. For local user login, rund365 login --url <dataverse-environment-url>once; later--urlcommands silently reuse the cached Dataverse user token. - Service Bus list and dead-letter commands accept a Service Bus connection string with
--conn. - Service Bus copy commands use Azure Resource Manager with
DefaultAzureCredential. Configure credentials through Azure Identity mechanisms such asaz login, Visual Studio, Azure PowerShell, Azure Developer CLI, managed identity, or environment credentials.service-bus namespaces copyduplicates safe namespace settings and topology without messages;service-bus queues copycopies queue definitions and queue authorization rules into an existing target namespace. - The base
stashcommands can store reusable values locally for token preprocessing.
Publishing
NuGet package planning, validation, and publishing are handled by tools/release-packages.ps1.
See the NuGet release automation guide for dry runs, package validation, release tags, and GitHub Actions publishing.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- Azure.Messaging.ServiceBus (>= 7.20.1)
- Azure.ResourceManager.ServiceBus (>= 1.1.0)
- Microsoft.Extensions.Configuration (>= 10.0.8)
- Microsoft.Extensions.DependencyInjection (>= 10.0.8)
- Microsoft.Extensions.Hosting (>= 10.0.8)
- Reimaginate.CLI.Base (>= 1.0.0-rc.66)
- Reimaginate.Mediator.Abstractions (>= 1.3.0-rc.8)
- Reimaginate.Mediator.SourceGenerator (>= 1.3.0-rc.8)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-rc.66 | 0 | 6/12/2026 |
| 1.0.0-rc.65 | 0 | 6/12/2026 |
| 1.0.0-rc.63 | 0 | 6/12/2026 |
| 1.0.0-rc.62 | 41 | 6/9/2026 |
| 1.0.0-rc.61 | 40 | 6/9/2026 |
| 1.0.0-rc.60 | 38 | 6/9/2026 |
| 1.0.0-rc.59 | 42 | 6/9/2026 |
| 1.0.0-rc.58 | 42 | 6/9/2026 |
| 1.0.0-rc.57 | 37 | 6/9/2026 |
| 1.0.0-rc.56 | 42 | 6/9/2026 |
| 1.0.0-rc.55 | 47 | 6/8/2026 |
| 1.0.0-rc.54 | 55 | 6/7/2026 |
| 1.0.0-rc.53 | 53 | 6/7/2026 |
| 1.0.0-rc.52 | 46 | 6/6/2026 |
| 1.0.0-rc.51 | 59 | 6/6/2026 |
| 1.0.0-rc.50 | 53 | 6/6/2026 |
| 1.0.0-rc.48 | 52 | 6/5/2026 |
| 1.0.0-rc.47 | 51 | 6/5/2026 |
| 1.0.0-rc.46 | 59 | 6/4/2026 |
| 1.0.0-rc.45 | 51 | 6/4/2026 |