Gleam tooling for Morphir and the Morphir ecosystem. This repository is a multi-module monorepo providing Gleam implementations of Morphir components.
Morphir is a library of tools that work to capture business logic as data. This repository provides Gleam ports of Morphir components, taking advantage of Gleam's similarities to Elm (the language used in the reference implementation at finos/morphir-elm).
| Package | Description |
|---|---|
| morphir_models | Gleam port of the Morphir IR (Intermediate Representation) |
| morphir_cli | CLI tooling for working with Morphir IR |
If you have mise installed, you can install morphir-gleam as a global tool:
# Install latest version
mise use -g github:finos/morphir-gleam
# Install specific version
mise use -g github:finos/morphir-gleam@v0.1.0
# Verify installation
morphir-gleam versionThis automatically downloads the correct binary for your platform and manages it through mise.
Install the morphir-gleam CLI directly from GitHub releases:
Linux and macOS:
# Install latest version
curl -fsSL https://raw.githubusercontent.com/finos/morphir-gleam/main/install.sh | bash
# Install specific version
curl -fsSL https://raw.githubusercontent.com/finos/morphir-gleam/main/install.sh | bash -s v0.1.0Windows (PowerShell):
# Install latest version
irm https://raw.githubusercontent.com/finos/morphir-gleam/main/install.ps1 | iex
# Install specific version
$env:VERSION="v0.1.0"; irm https://raw.githubusercontent.com/finos/morphir-gleam/main/install.ps1 | iexDownload pre-built binaries from the releases page:
- Linux x64:
morphir-gleam-linux-x64 - Linux ARM64:
morphir-gleam-linux-arm64 - macOS x64 (Intel):
morphir-gleam-macos-x64 - macOS ARM64 (Apple Silicon):
morphir-gleam-macos-arm64 - Windows x64:
morphir-gleam-windows-x64.exe
After downloading:
# Linux/macOS: Make executable and move to PATH
chmod +x morphir-gleam-*
sudo mv morphir-gleam-* /usr/local/bin/morphir-gleam
# Windows: Move to a directory in your PATH
move morphir-gleam-windows-x64.exe C:\Windows\System32\morphir-gleam.exe# Show help
morphir-gleam --help
# Show version
morphir-gleam version
# Show about information
morphir-gleam aboutIf you want to contribute or build from source, you'll need mise for tool version management.
# Install mise (if not already installed)
curl https://mise.run | sh
# Install project dependencies (Gleam, Erlang, Bun)
mise install
# Build all packages
mise run build
# Run tests
mise run test
# Build executable
mise run build-exemorphir-gleam/
├── .mise.toml # Tool versions (Gleam 1.14.0, Erlang 27)
├── packages/
│ ├── morphir_models/ # Morphir IR types package
│ │ ├── gleam.toml
│ │ ├── src/
│ │ │ ├── morphir_models.gleam
│ │ │ └── morphir/ir/
│ │ │ ├── name.gleam
│ │ │ ├── path.gleam
│ │ │ ├── qname.gleam
│ │ │ ├── fqname.gleam
│ │ │ ├── access_controlled.gleam
│ │ │ ├── documented.gleam
│ │ │ ├── literal.gleam
│ │ │ ├── type_.gleam
│ │ │ ├── value.gleam
│ │ │ ├── module.gleam
│ │ │ └── package.gleam
│ │ └── test/
│ └── morphir_cli/ # CLI tooling package
│ ├── gleam.toml
│ ├── src/
│ │ ├── morphir_cli.gleam
│ │ └── morphir_cli/commands/
│ │ ├── about.gleam
│ │ └── version.gleam
│ └── test/
└── README.md
import morphir/ir/name
import morphir/ir/fqname
import morphir/ir/type_
// Create a name from various conventions
let my_name = name.from_string("myVariableName")
// Result: ["my", "variable", "name"]
// Convert to different naming conventions
name.to_snake_case(my_name) // "my_variable_name"
name.to_camel_case(my_name) // "myVariableName"
name.to_title_case(my_name) // "MyVariableName"
// Create fully qualified type references
let int_type = fqname.fqn("Morphir.SDK", "Basics", "Int")
// Build type expressions
let string_type = type_.Reference(
Nil,
fqname.fqn("Morphir.SDK", "String", "String"),
[],
)- ✅ Core IR types (Name, Path, QName, FQName)
- ✅ Type system (Type, Specification, Definition)
- ✅ Value system (Value, Pattern, Definition)
- ✅ Module and Package representations
- ✅ CLI tooling foundation (morphir_cli)
- 🔲 JSON serialization/deserialization
- 🔲 IR validation utilities
- 🔲 SDK type mappings
- 🔲 Code generation commands
- morphir-elm - Reference Morphir implementation in Elm
- morphir - Next-gen Morphir tooling
- morphir.finos.org - Morphir documentation
For any questions, bugs or feature requests please open an issue. For anything else please send an email to morphir@finos.org.
To submit a contribution:
- Fork it (https://github.com/finos/morphir-gleam/fork)
- Create your feature branch (
git checkout -b feature/fooBar) - Read our contribution guidelines and Community Code of Conduct
- Commit your changes (
git commit -am 'Add some fooBar') - Push to the branch (
git push origin feature/fooBar) - Create a new Pull Request
NOTE: Commits and pull requests to FINOS repositories will only be accepted from those contributors with an active, executed Individual Contributor License Agreement (ICLA) with FINOS OR who are covered under an existing and active Corporate Contribution License Agreement (CCLA) executed with FINOS. Commits from individuals not covered under an ICLA or CCLA will be flagged and blocked by the FINOS Clabot tool (or EasyCLA). Please note that some CCLAs require individuals/employees to be explicitly named on the CCLA.
Need an ICLA? Unsure if you are covered under an existing CCLA? Email help@finos.org
Copyright 2026 FINOS
Distributed under the Apache License, Version 2.0.
SPDX-License-Identifier: Apache-2.0