Creating Packs
A .forgepack file is a zip archive containing a workflow, its backend modules, and a manifest describing the pack. Packs are the primary way to distribute FORGE Studio workflows.
Pack Structure
my-pack.forgepack (zip)
├── manifest.yaml # Required: pack metadata
├── workflows/
│ └── my-workflow.yaml # Workflow definition(s)
├── matlab/ # Optional: MATLAB modules (.m files)
│ ├── prepData.m
│ └── postProcess.m
├── python/ # Optional: Python modules (.py files)
│ └── brain_masking.py
├── julia/ # Optional: Julia modules (.jl files)
│ └── inversion.jl
├── colormaps/ # Optional: custom colormap JSON files
│ └── mre_wave.json
└── requirements.txt # Optional: Python pip requirementsmanifest.yaml Reference
# Required fields
id: my-pipeline # Unique identifier (lowercase, hyphens only)
name: My Pipeline # Human-readable name
version: 1.0.0 # Semver version string
author: Your Name # Author name or organization
workflows: # List of workflow YAML filenames
- my-workflow.yaml
# Optional fields
license: MIT # License identifier
description: >- # Multi-line description
A reconstruction pipeline for ...
min_studio_version: "0.2.0" # Minimum FORGE Studio version required
requires: # Runtime dependencies (informational)
forge_binaries: # FORGE binaries needed
- forgeSense
matlab_toolboxes: # MATLAB toolboxes needed
- image_processing
python_packages: # Python packages (also in requirements.txt)
- hd-betField Details
| Field | Required | Description |
|---|---|---|
id | Yes | Unique pack identifier. Must match ^[a-z0-9][a-z0-9-]*[a-z0-9]$. |
name | Yes | Display name shown in the UI. |
version | Yes | Semver version (e.g., 1.0.0). |
author | Yes | Author name. |
workflows | Yes | Array of workflow YAML filenames (relative to workflows/). Must contain at least one entry. |
license | No | SPDX license identifier. |
description | No | Free-text description. |
min_studio_version | No | If set, the pack will be rejected during install if FORGE Studio is older. |
requires | No | Informational dependency declarations. |
Creating a Pack Manually
1. Set up the directory
mkdir -p my-pack/workflows my-pack/matlab my-pack/python2. Write the manifest
Create my-pack/manifest.yaml with the required fields above.
3. Add your workflow
Copy or create a workflow YAML in my-pack/workflows/. The workflow id field should match the filename (without .yaml).
If your reconstruction needs a separate calibration scan (e.g. a SENSE coil-sensitivity reference or a B0 field map in its own .dat), declare it under inputs.calibration with source: external and a named files map. FORGE Studio then shows a file picker per file in Setup and passes the chosen paths to your prep module as calibration_paths. See Inputs & Calibration in the workflow reference.
4. Add backend modules
Place MATLAB .m files in matlab/, Python .py files in python/, and Julia .jl files in julia/. Each file corresponds to a module reference in a workflow stage or step.
5. Add Python requirements (optional)
If your workflow uses Python stages, create a requirements.txt with the pip dependencies:
hd-bet>=0.2
numpy>=1.24Reference this in your workflow YAML with python_requirements: requirements.txt.
6. Build the pack
cd my-pack
zip -r ../my-pack.forgepack manifest.yaml workflows/ matlab/ python/ julia/ colormaps/ requirements.txtOr use the provided helper script:
#!/bin/bash
# build-pack.sh — Run from inside the pack directory
PACK_ID=$(grep '^id:' manifest.yaml | awk '{print $2}')
zip -r "../${PACK_ID}.forgepack" . -x '.*' -x '__MACOSX/*'
echo "Created ../${PACK_ID}.forgepack"Exporting from FORGE Studio
The easiest way to create a pack is to export an existing workflow:
- Open the Workflows tab
- Click the Export button on any workflow card
- Choose a save location — FORGE Studio generates the
.forgepackarchive automatically
The export collects the workflow YAML, all referenced backend modules, colormaps, and requirements.txt from the workflow's source pack or resource directories.
Installing a Pack
Via the UI
- Open Settings > Packs
- Click Install Pack
- Select a
.forgepackfile - The pack's workflows appear in the Workflows tab
Pack install location
- Bundled packs:
resources/packs/(read-only, shipped with the app) - User-installed packs:
~/.forge-studio/packs/<pack-id>/
Example: EMPIRE 3D MRE Pack
The bundled EMPIRE pack demonstrates a full multi-stage pipeline:
empire-3d-mre/
├── manifest.yaml
├── workflows/
│ └── empire-3d-mre.yaml # 5-stage pipeline
├── matlab/
│ ├── prepEmpire.m # TWIX data preparation
│ ├── extractWaves.m # Harmonic wave extraction
│ └── mre_wave.m # MRE wave utilities
├── python/
│ └── hd_bet_masking.py # HD-BET brain masking
├── colormaps/
│ └── mre_wave.json # Custom MRE colormap
└── requirements.txt # hd-bet, numpy, nibabelThe workflow stages reference modules by name (prepEmpire, extractWaves, hd-bet-masking), which FORGE Studio resolves to files in the pack's matlab/ and python/ directories.
