Morphir.Core
0.3.0-rc.1
Prefix Reserved
See the version list below for details.
dotnet add package Morphir.Core --version 0.3.0-rc.1
NuGet\Install-Package Morphir.Core -Version 0.3.0-rc.1
<PackageReference Include="Morphir.Core" Version="0.3.0-rc.1" />
<PackageVersion Include="Morphir.Core" Version="0.3.0-rc.1" />
<PackageReference Include="Morphir.Core" />
paket add Morphir.Core --version 0.3.0-rc.1
#r "nuget: Morphir.Core, 0.3.0-rc.1"
#:package Morphir.Core@0.3.0-rc.1
#addin nuget:?package=Morphir.Core&version=0.3.0-rc.1&prerelease
#tool nuget:?package=Morphir.Core&version=0.3.0-rc.1&prerelease
<img src="https://github.com/finos/branding/blob/master/project-logos/active-project-logos/Morphir%20Logo/Horizontal/2020_Morphir_Logo_Horizontal.png?raw=true" width="450">
Morphir
Morphir is a library of tools that works to capture business logic as data.
For the first time, business logic can be shared, stored, translated and visualised, all with the reliability of standardisation ensured in the Morphir framework.
What is it?
A set of tools for integrating technologies. Morphir is composed of a library of tools that facilitate the digitisation of business logic into multiple different languages & platforms. The Morphir framework is unique too in that facilities elements of automation and conversion that were previously unavailable in the field of finance-tech.
Why is it important?
Makes business logic portable. Business logic digitised provides distinct advantages: capacity for movement across departments and fields & the ability to be converted to new languages and applications.
How does it work?
Defines a standard format for storing and sharing business logic. A clear set of standards and format is in-place from the input/output, allowing for coherent structure.
What are the benefits?
✔️ Eliminates technical debt risk
Refactoring code libraries is often a harmful and time-sensitive issue for businesses, Morphir ensure the standards introduced from input eliminate delays at deployment.
✔️ Increases agility
Adaptability and usability are key concepts of the Morphir framework, business logic can now move with the code, be easily understood and adopted, in an ever-developing eco-system.
✔️ Ensures correctness
Certifying that specified functions behave as intended from input to output is assured through the Morphir library / tool chain.
✔️ Disseminates information through automation
Morphir’s automated processing helps disseminate information which otherwise may not be understood or shared at all, a useful tool when brining elements of business logic to conversation outside of its immediate audience (i.e developers).
Morphir .NET
Provides tooling for the Morphir ecosystem and .NET libraries that can be used to help you work with Morphir.
Getting Started
Quick Start
Install Morphir using one of the following methods:
Using Platform-Specific Install Scripts (Recommended):
# Linux
curl -fsSL https://raw.githubusercontent.com/finos/morphir-dotnet/main/scripts/install-linux.sh | bash
# macOS
curl -fsSL https://raw.githubusercontent.com/finos/morphir-dotnet/main/scripts/install-macos.sh | bash
# Windows (PowerShell)
irm https://raw.githubusercontent.com/finos/morphir-dotnet/main/scripts/install-windows.ps1 | iex
Using .NET Tool (requires .NET SDK):
dotnet tool install -g Morphir
Verify Installation:
morphir --version
For detailed installation instructions and troubleshooting, see the Installation Guide.
Documentation
Building
This project uses Nuke for build orchestration, providing a strongly-typed, cross-platform build system written in C#.
Requirements
- .NET SDK 10.0 or higher
Basic Commands
# First-time setup: Restore tools and dependencies
dotnet tool restore
./build.sh --target Restore
# Build the solution (default target)
./build.sh
# Run tests
./build.sh --target Test
# Run linting/formatting checks
./build.sh --target Lint
# Format code
./build.sh --target Format
# Run full CI pipeline (restore, build, test, lint)
./build.sh --target CI
# Show all available targets
./build.sh --help
Windows users: Use build.cmd or build.ps1 instead of ./build.sh
Configuration
You can set the build configuration using the --configuration parameter:
# Build in Debug mode
./build.sh --configuration Debug
# Run tests in Debug mode
./build.sh --target Test --configuration Debug
By default, commands use Release configuration.
Migration from Just
This project was recently migrated from Just to Nuke. See NUKE_MIGRATION.md for the complete migration guide and command mappings. The old justfile is preserved for reference.
Developing
Project Structure
morphir-dotnet/
├── src/
│ ├── Morphir.Core/ # Core IR types and utilities
│ ├── Morphir.Tooling/ # Tooling infrastructure
│ └── Morphir/ # CLI application
├── tests/
│ ├── Morphir.Core.Tests/ # Unit tests for Core
│ ├── Morphir.Tooling.Tests/ # Unit tests for Tooling
│ └── Morphir.E2E.Tests/ # End-to-end tests (BDD/Gherkin)
├── build/
│ ├── _build.csproj # Nuke build project
│ └── Build.cs # Build orchestration (strongly-typed)
├── scripts/ # Build and utility scripts (C# scripts)
├── build.sh/cmd/ps1 # Nuke bootstrap scripts
└── justfile # Legacy build commands (preserved for reference)
Development Workflow
Restore dependencies:
./build.sh --target RestoreBuild the solution:
./build.sh --target CompileRun tests:
./build.sh --target TestCheck code formatting:
./build.sh --target LintFormat code (if needed):
# Unix/macOS ./build.sh --target Format # Windows build.cmd --target Format # or ./build.ps1 --target Format
Scripts
The project uses C# scripts (.cs files) for build automation, leveraging .NET 10's direct C# file execution. These scripts are located in the scripts/ directory:
publish-single-file.cs- Publishes trimmed single-file executablespublish-single-file-untrimmed.cs- Publishes untrimmed single-file executablesrun-tests.cs- Runs unit testsrun-e2e-tests.cs- Runs end-to-end testsgenerate-wolverine-code.cs- Generates Wolverine code
Note: The deprecated build-tool-dll.cs and pack-tool-platform.cs scripts have been removed. Use the Nuke build targets (PackTool, PublishTool) instead.
Build Commands
All Nuke build commands support both Unix/macOS (./build.sh) and Windows (build.cmd or ./build.ps1) bootstrap scripts. Examples below show both formats.
Building Libraries
# Unix/macOS: Pack library projects as NuGet packages
./build.sh --target PackLibs
# Windows
build.cmd --target PackLibs
# or
./build.ps1 --target PackLibs
# Pack all projects (libraries and tool)
./build.sh --target PackAll # Unix/macOS
build.cmd --target PackAll # Windows
# Specify configuration and version
./build.sh --target PackLibs --configuration Debug --version 1.2.3
build.cmd --target PackLibs --configuration Debug --version 1.2.3
# Custom output directory
./build.sh --target PackLibs --output-dir ./my-packages
build.cmd --target PackLibs --output-dir ./my-packages
Building Executables
# Build a trimmed single-file executable for a specific platform
./build.sh --target PublishSingleFile --rid linux-x64 # Unix/macOS
build.cmd --target PublishSingleFile --rid linux-x64 # Windows
# Build an AOT (ahead-of-time compiled) executable
./build.sh --target PublishExecutable --rid linux-x64
build.cmd --target PublishExecutable --rid linux-x64
# Build an untrimmed executable (larger, better for debugging)
./build.sh --target PublishSingleFileUntrimmed --rid win-x64
build.cmd --target PublishSingleFileUntrimmed --rid win-x64
# Common RIDs: linux-x64, linux-arm64, win-x64, osx-x64, osx-arm64
# With custom configuration and output directory
./build.sh --target PublishSingleFile --rid linux-x64 --configuration Debug --output-dir ./bin
build.cmd --target PublishSingleFile --rid linux-x64 --configuration Debug --output-dir ./bin
Building the Dotnet Tool
# Pack the Morphir CLI as a dotnet tool
./build.sh --target PackTool # Unix/macOS
build.cmd --target PackTool # Windows
# With version and output directory
./build.sh --target PackTool --version 2.0.0 --output-dir ./packages
build.cmd --target PackTool --version 2.0.0 --output-dir ./packages
Testing
# Run unit tests
./build.sh --target Test # Unix/macOS
build.cmd --target Test # Windows
# Run tests in Debug configuration
./build.sh --target Test --configuration Debug
build.cmd --target Test --configuration Debug
# Build E2E test project
./build.sh --target BuildE2ETests
build.cmd --target BuildE2ETests
# Run end-to-end tests
./build.sh --target TestE2E # Unix/macOS
build.cmd --target TestE2E # Windows
# Run E2E tests for specific executable type (aot, trimmed, untrimmed, or all)
./build.sh --target TestE2E --executable-type trimmed
build.cmd --target TestE2E --executable-type trimmed
Publishing to NuGet
# Publish library packages to NuGet.org
./build.sh --target PublishLibs --api-key YOUR_API_KEY # Unix/macOS
build.cmd --target PublishLibs --api-key YOUR_API_KEY # Windows
# Publish the Morphir CLI tool package to NuGet.org
./build.sh --target PublishTool --api-key YOUR_API_KEY
build.cmd --target PublishTool --api-key YOUR_API_KEY
# Publish all packages
./build.sh --target PublishAll --api-key YOUR_API_KEY
build.cmd --target PublishAll --api-key YOUR_API_KEY
# Publish to custom NuGet source
./build.sh --target PublishLibs --nuget-source https://custom-feed.com --api-key YOUR_KEY
build.cmd --target PublishLibs --nuget-source https://custom-feed.com --api-key YOUR_KEY
# Publish to local NuGet feed (for testing)
./build.sh --target PublishLocalLibs # Unix/macOS
build.cmd --target PublishLocalLibs # Windows
# With custom local source
./build.sh --target PublishLocalLibs --local-source ./my-local-feed
build.cmd --target PublishLocalLibs --local-source ./my-local-feed
# Install tool locally from package
./build.sh --target PublishLocalTool
build.cmd --target PublishLocalTool
# Install globally
./build.sh --target PublishLocalTool --global true
build.cmd --target PublishLocalTool --global true
Available Nuke Targets
Run ./build.sh --help (Unix/macOS) or build.cmd --help (Windows) to see all available targets with descriptions and parameters.
Key targets:
Restore- Restore .NET dependenciesCompile- Build the solution (default target)Test- Run unit testsLint- Check code formattingFormat- Format codeCI- Run full CI pipeline (restore, build, test, lint)PackLibs- Pack library projects as NuGet packagesPackTool- Pack the Morphir CLI as a dotnet toolPackAll- Pack all projects (libraries and tool)PublishSingleFile- Publish trimmed single-file executable (requires--rid)PublishExecutable- Publish AOT executable (requires--rid)PublishSingleFileUntrimmed- Publish untrimmed single-file executable (requires--rid)TestE2E- Run end-to-end testsPublishLibs- Publish library packages to NuGetPublishTool- Publish tool package to NuGetPublishAll- Publish all packages to NuGetPublishLocalLibs- Publish libraries to local feedPublishLocalTool- Install tool locally from packagePublishLocalAll- Publish all to local feed
Contributing
We welcome contributions! Please see our Contributing Guide for details.
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Links
| Product | Versions 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. |
-
net10.0
- Dunet (>= 1.11.3)
- Generator.Equals (>= 3.2.1)
- LanguageExt.Core (>= 5.0.0-beta-61)
- Vogen (>= 8.0.3)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Morphir.Core:
| Package | Downloads |
|---|---|
|
Morphir.Bogus
Package Description |
|
|
Morphir.Tooling
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.5.0-alpha.3 | 48 | 11/14/2026 |
| 0.5.0-alpha.2 | 49 | 11/13/2026 |
| 0.5.0-alpha.1 | 48 | 11/13/2026 |
| 0.4.0-alpha.5 | 50 | 11/13/2026 |
| 0.4.0-alpha.4 | 52 | 11/10/2026 |
| 0.4.0-alpha.3 | 62 | 11/9/2026 |
| 0.4.0-alpha.2 | 61 | 11/8/2026 |
| 0.4.0-alpha.1 | 65 | 11/7/2026 |
| 0.3.0-rc.2 | 287 | 12/19/2025 |
| 0.3.0-rc.1 | 285 | 12/18/2025 |
| 0.2.0-alpha-003 | 274 | 12/16/2025 |
| 0.2.0-alpha-001 | 273 | 12/16/2025 |
| 0.1.0-Alpha-01 | 222 | 5/23/2023 |
### Added
- **NOTE**: This is a pre-release version. Stable v0.3.0 pending LanguageExt.Core 5.0 stable release.
- Serilog logging infrastructure for CLI tools (Serilog, Serilog.Extensions.Hosting, Serilog.Sinks.Console)
- CLI logging standards documentation in AGENTS.md and CLAUDE.md
- `.morphir/out/` directory to .gitignore
- New Morphir.Tool project as dedicated dotnet tool package (#214)
- Build.CI.cs with DevWorkflow, CILint, CITest targets for local CI simulation (#214)
- Comprehensive XML documentation for all 23+ build targets (#214)
- Morphir package now published to NuGet/GitHub releases (#214)
- Comprehensive Phase 1 test plan in docs/content/contributing/qa/
- **QA Testing Framework**: Claude Code skill with F# automation scripts - smoke-test.fsx - Quick 2-minute smoke test - regression-test.fsx - Full 10-15 minute regression suite - validate-packages.fsx - NuGet package structure validation
- **Release Management Framework**: Claude Code skill with F# automation scripts (#220) - prepare-release.fsx - Automated pre-flight checks and version suggestion - monitor-release.fsx - Real-time workflow monitoring with issue updates - validate-release.fsx - Post-release package and installation validation - resume-release.fsx - Recovery from failed releases - Comprehensive release playbook and tracking templates
- **Cross-Agent Guidance**: `.agents/` directory for specialized topics - .agents/qa-testing.md - Comprehensive QA testing guidance for all AI agents - .agents/release-management.md - Release workflow and automation guidance - .agents/README.md - Navigation and contribution guidelines
- **Multi-Agent Pointer Files**: Configuration for all major AI coding assistants - .cursorrules - Cursor AI pointer file - .github/copilot-instructions.md - GitHub Copilot instructions - .windsurf/rules/morphir.md - Windsurf AI rules and workflows - .idea/ai-assistant-rules.md - JetBrains AI Assistant configuration
- **AGENTS.md Enhancements**: - Quick Navigation section (links to .agents/, CLAUDE.md, docs/) - Section 18: Specialized Guidance (detailed links to .agents/ topics) - Section 19: Resources and References (comprehensive resource index)
- **Comprehensive Developer Documentation**: - F# Coding Guide with active patterns, railway-oriented programming, and best practices - Native AOT, trimming, and size optimization guide - System.Text.Json guidance for F# with common gotchas - F# 9 nullable reference types guidance for C# interop
### Changed
- **BREAKING**: Configured all logging to write to stderr instead of stdout to preserve stdout for command output. Scripts parsing stdout may need updates.
- Updated E2E test runner script to use Nuke build commands instead of deprecated `just` commands
- Updated README.md with Nuke build command examples
- Split monolithic Build.cs into 5 partial classes: Packaging, Publishing, Testing, CI (#214)
- Tool command name follows dotnet convention: `dotnet-morphir` (was `morphir`) (#214)
- Morphir.Tool delegates to public Morphir.Program.Main() eliminating code duplication (#214)
- Morphir project now packable (IsPackable=true, was false) (#214)
- PackAll now builds 4 packages: Core, Tooling, Morphir, Tool (#214)
- **AGENTS.md**: Enhanced with navigation sections for better discoverability across AI tools
### Fixed
- Fixed JSON output contamination issue where log messages were being written to stdout
- CLI tools now properly separate data (stdout) and diagnostics (stderr) following Unix conventions
- E2E tests for JSON output format now pass (12/13 tests passing, up from 10/13)
- Windows build file locking issues by removing problematic MSBuild target (#214)
- Circular build dependencies causing CS2012 errors on Windows (#214)
- Directory cleaning conflicts in PackAll target (#214)
- Resolved prepare-release.fsx issues with Spectre.Console markup and Int64 (#220)
### Removed
- Deprecated scripts: pack-tool-platform.cs, build-tool-dll.cs (#214)
- Problematic GenerateWolverineCode MSBuild target, moved to Nuke (#214)
- BuildInParallel=false workaround after fixing root cause (#214)