Marathon.CLI
1.0.0
dotnet tool install --global Marathon.CLI --version 1.0.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 Marathon.CLI --version 1.0.0
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Marathon.CLI&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package Marathon.CLI --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Marathon CLI
Command Line Interface for Marathon Transpiler, a Runtime-First code transpiler.
Installation
Option 1: Install as a .NET Tool
dotnet tool install --global Marathon.CLI
Option 2: Build from Source
git clone https://github.com/ameritusweb/MarathonTranspiler.git
cd cli/Marathon.CLI
dotnet pack
dotnet tool install --global --add-source ./nupkg Marathon.CLI
Usage
Initialize a New Project
marathon init --target csharp
This creates a basic mrtconfig.json
file and an example .mrt
file in the src
directory.
Transpile Files
marathon transpile
Options:
-c, --config <PATH>
: Path to configuration file (default: mrtconfig.json)-o, --output <DIR>
: Output directory for generated files-v, --verbose
: Enable verbose output
Watch for Changes
marathon watch
This will continuously watch for changes in .mrt
files and transpile them automatically.
Options:
- Same as the
transpile
command
List Available Inlineable Functions
marathon list
Options:
-t, --target <TARGET>
: Filter functions by target (e.g., csharp, react)-v, --verbose
: Show detailed information about functions
Configuration
The mrtconfig.json
file controls the transpiler settings:
{
"transpilerOptions": {
"target": "csharp",
"csharp": {
"testFramework": "xunit"
}
},
"include": ["**/*.mrt"],
"exclude": ["**/node_modules/**", "**/bin/**", "**/obj/**"],
"rootDir": "./src"
}
Example
Initialize a project:
marathon init --target csharp
Modify the example file or create new
.mrt
files:@varInit(className="Counter", type="int") this.count = 0; @run(className="Counter", functionName="increment") this.count++; Console.WriteLine($"Count: {this.count}");
Transpile:
marathon transpile
Check the output
.cs
file.
Documentation
For more information about Marathon Transpiler and the Runtime-First approach, see the main documentation.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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. net9.0 was computed. 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. |
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.0.0 | 43 | 3/1/2025 |
Initial release of the Marathon Transpiler CLI tool.
- Added core transpilation functionality.
- Implemented command-line interface.
- Basic error handling.