dotnet-rex 0.0.0-alpha.0

This is a prerelease version of dotnet-rex.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet tool install --global dotnet-rex --version 0.0.0-alpha.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local dotnet-rex --version 0.0.0-alpha.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=dotnet-rex&version=0.0.0-alpha.0&prerelease
                    
nuke :add-package dotnet-rex --version 0.0.0-alpha.0
                    

dotnet-rex

This is a cli tool that can run projects or files that leverage Hyprx.Rex.Console.

DotNet 10 or higher must be installed locally to use rex.

The cli tool has help support with --help flag.

Rexfile

The rex cli will look in the current working directory and look for a file called "rexfile" with no extension. This file is a configuration file for telling rex where to look for the file or csproj that contains tasks.

The rexfile setting within the file will tell rex where to find either the csproj file, the single csharp file, or the assembly to run.

Using a project

rexfile:./RexKitchen/RexKitchen.csproj

Using a file

rexfile:./path/to/rexfile.cs
rexfile:./path/to/app.cs

Using an assembly

rexfile:./path/to/app.dll

Run a task

rex tasks run hello
rex tasks hello
rex hello

Note, if the task has the same name as a job or deployment, you'll need use the tasks subcommand so that rex knows which one to use.

Run a job

A job is a collection of tasks to run in sequential order.

rex jobs run job1
rex jobs job1
rex job1

Note, if the task has the same name as a job or deployment, you'll need use the tasks subcommand so that rex knows which one to use.

Run a deployment, rollback, or deletion

deploy

rex deploy deployment-name

Rollback

Rollbacks are only supported if one was configured when defining the deployment.

rex rollback deployment-name

Destroy

Destroys are only supported if one was configured when defining the deployment.

rex destroy deployment-name

Defining tasks

You'll need to have project or single csharp file that has a package reference to Hyprx.Rex.Console.

using static Hyprx.RexConsole;
using static Hyprx.Shell;

Task("default", () => Echo("Hello, World!"));

Task("hello", () => Echo("Hello from RexKitchen!"));

Task("env", () => Echo(Env.Expand("$MY_VALUE")));

Job("job1", (job) =>
{
    // addes the global task "hello" as a dependency to all tasks in this job
    // which allows you to share common tasks across multiple job
    // and run them as a standalone task as well.
    job.AddGlobalTask("hello");
    job.Task("task1", () => Echo("Task 1"));
    job.Task("task2", () => Echo("Task 2"));
});

Deployment("deploy1",
    (ctx) =>
    {
        Echo("Starting deployment...");
        Echo("Deployment finished.");
    })
    .BeforeDeploy((before) =>
    {
        before.Task("hello", () => Echo("Preparing to say hello..."));
    })
    .WithRollback(() =>
    {
        Echo("Rolling back deployment...");
        Echo("Rollback complete.");
    });

return await RunTasksAsync(args);
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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.

This package has no dependencies.

Version Downloads Last Updated
0.0.0-alpha.4 125 7/11/2025
0.0.0-alpha.2 132 6/25/2025
0.0.0-alpha.1 125 6/25/2025
0.0.0-alpha.0 130 6/17/2025