fsrun 1.1.0

dotnet tool install --global fsrun --version 1.1.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 fsrun --version 1.1.0                
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=fsrun&version=1.1.0                
nuke :add-package fsrun --version 1.1.0                

FSRun

FSRun is a language agnostic task runner. I often miss the ease of use of being able to put repetitive tasks in the scripts section of package.json, so I've tried to create something similar that can be used in any language.

Getting started

The easiest way to install right now is to add it as a .net tool dotnet tool install --global fsrun

You can also clone the repo from source, then you can do dotnet run publish[-platform]. Then can copy the executable to your path.

To use it make a config file. (fsrun.toml is the default, but you can change the name)

here's an example with one command that just echos hello world.

fsrun.toml

[commands]
greet = "echo hello, world!"

then you could run fsrun greet and it would write hello, world! to your console.

You can have multiple commands in the block, and you can break out commands to a separate table if you need to be more precise with them.

[commands]
clean = "dotnet clean"
build = "dotnet build"

[commands.publish]
command = "dotnet"
args = ["publish", "-r", "linux-x64", "--self-contained", "true"]

You can also use multiple staged commands by referencing other commands in a list.

[commands]
clean = "dotnet clean"
build = "dotnet build"
rebuild = ["clean", "build"]

You can also set environment variables that you want added to all commands.

[environment]
ENV = "development"

[commands]
script = "echo $ENV"
$ fsrun script
development

You can also set environment vars for an individual command.

[commands.echo]
command = "echo"
args = ["$VAR"]
environment = { VAR = "my variable" }

The working directory to run a command from can be set much the same way. It can be set at the root level, or on a detailed command. With any setting, the value on a specific commad will take percedence over a global setting.

working_directory = "./src"

[commands.list-packages]
command = "ls"
working-directory = "node_module"

Flags

Here are some of the flags that you can pass to fsrun.

--help

Prints the help text for the tool.

--list

Lists all the commands that can be run for the project

--init

Initializes a basic config file

--logs <filepath>

Will write all output logs to the specified file in append mode. Will create the file if it does not exist.

--file, -f <filename>

Name of the file to run for config instead of fsrun.toml. Will look upwards recursively through directories attempting to find the file. Can be useful if you want to have different config files for different environments in the same project.

--quiet

Silence output from run commands in the terminal

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.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
1.1.0 102 5/6/2024
1.0.1 87 4/29/2024
1.0.0 83 4/29/2024