Reimaginate.CLI.Microsoft.ServiceBus.Tools 1.0.0-rc.66

This is a prerelease version of Reimaginate.CLI.Microsoft.ServiceBus.Tools.
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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Reimaginate.CLI.Microsoft.ServiceBus.Tools" Version="1.0.0-rc.66" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Reimaginate.CLI.Microsoft.ServiceBus.Tools" Version="1.0.0-rc.66" />
                    
Directory.Packages.props
<PackageReference Include="Reimaginate.CLI.Microsoft.ServiceBus.Tools" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
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"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Reimaginate.CLI.Microsoft.ServiceBus.Tools@1.0.0-rc.66
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Reimaginate.CLI.Microsoft.ServiceBus.Tools&version=1.0.0-rc.66&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Reimaginate.CLI.Microsoft.ServiceBus.Tools&version=1.0.0-rc.66&prerelease
                    
Install as a Cake Tool

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 setup command 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, and az-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 --kv and --secret. --kv can also be a fully qualified Key Vault secret URI. When neither is provided, pass --url <dataverse-environment-url> to authenticate with non-interactive DefaultAzureCredential using existing Azure Identity sign-ins such as az login, Visual Studio, Azure PowerShell, Azure Developer CLI, managed identity, or environment credentials. For local user login, run d365 login --url <dataverse-environment-url> once; later --url commands 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 as az login, Visual Studio, Azure PowerShell, Azure Developer CLI, managed identity, or environment credentials. service-bus namespaces copy duplicates safe namespace settings and topology without messages; service-bus queues copy copies queue definitions and queue authorization rules into an existing target namespace.
  • The base stash commands 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
Loading failed