◆ FORGE Suite
GitHubMechanical Neuroimaging Lab · Univ. of Delaware
Skip to content

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 requirements

manifest.yaml Reference

yaml
# 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-bet

Field Details

FieldRequiredDescription
idYesUnique pack identifier. Must match ^[a-z0-9][a-z0-9-]*[a-z0-9]$.
nameYesDisplay name shown in the UI.
versionYesSemver version (e.g., 1.0.0).
authorYesAuthor name.
workflowsYesArray of workflow YAML filenames (relative to workflows/). Must contain at least one entry.
licenseNoSPDX license identifier.
descriptionNoFree-text description.
min_studio_versionNoIf set, the pack will be rejected during install if FORGE Studio is older.
requiresNoInformational dependency declarations.

Creating a Pack Manually

1. Set up the directory

bash
mkdir -p my-pack/workflows my-pack/matlab my-pack/python

2. 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.24

Reference this in your workflow YAML with python_requirements: requirements.txt.

6. Build the pack

bash
cd my-pack
zip -r ../my-pack.forgepack manifest.yaml workflows/ matlab/ python/ julia/ colormaps/ requirements.txt

Or use the provided helper script:

bash
#!/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:

  1. Open the Workflows tab
  2. Click the Export button on any workflow card
  3. Choose a save location — FORGE Studio generates the .forgepack archive 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

  1. Open Settings > Packs
  2. Click Install Pack
  3. Select a .forgepack file
  4. 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, nibabel

The 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.

FORGE Studio