Creating Packages
The Fast Way: Automated Publishing
The easiest way to publish a MATLAB package is to run tbxmanager publish from your package directory. Alternatively, submit via the registry issue form. See the Quick Start for a full guide.
With the publish action, you only maintain tbxmanager.json in your repo — the action handles archive building, SHA256 hashing, and registry submission automatically.
Package Metadata
Run tbxmanager init in your project directory to generate the metadata file, then edit it:
The generated tbxmanager.json looks like this (customize the fields for your package):
{
"name": "my-toolbox",
"version": "1.0.0",
"description": "A useful MATLAB toolbox",
"homepage": "https://github.com/you/my-toolbox",
"license": "MIT",
"authors": ["Your Name <your@email.com>"],
"matlab": ">=R2022a",
"dependencies": {
"some-other-pkg": ">=2.0"
},
"platforms": {
"all": "https://github.com/you/my-toolbox/releases/download/v1.0.0/my-toolbox-all.zip"
}
}
Tip
You can also create tbxmanager.json manually if you don't have tbxmanager installed yet.
Fields
| Field | Required | Description |
|---|---|---|
name |
Yes | Lowercase, alphanumeric, hyphens, underscores |
version |
Yes | Semver: MAJOR.MINOR.PATCH |
description |
Yes | Short description (max 200 chars) |
platforms |
Yes | At least one platform with download URL |
homepage |
No | Project URL |
license |
No | SPDX identifier (MIT, GPL-3.0, BSD-3-Clause, etc.) |
authors |
No | List of "Name <email>" strings |
matlab |
No | MATLAB version constraint (e.g., >=R2022a) |
dependencies |
No | Map of package names to version constraints |
publish |
No | Publishing config (see below) |
Platforms
| Platform | Description |
|---|---|
all |
Pure MATLAB code (no MEX files) |
win64 |
Windows 64-bit |
maci64 |
macOS Intel |
maca64 |
macOS Apple Silicon |
glnxa64 |
Linux 64-bit |
Use all if your package is pure MATLAB. Provide platform-specific archives if you include MEX files.
Publish Configuration
Optional section for the automated publish action:
{
"publish": {
"exclude": [".git", ".github", "tests", "docs", "benchmarks"],
"archive_dir": "dist"
}
}
| Field | Default | Description |
|---|---|---|
exclude |
.git, .github, tests, docs, tbxmanager.json |
Patterns to exclude from auto-built archives |
archive_dir |
dist |
Directory for pre-built platform archives |
Versioning
Follow Semantic Versioning:
- MAJOR: Breaking changes
- MINOR: New features, backward compatible
- PATCH: Bug fixes
Deprecation and Yanking
Deprecating a Package
To mark an entire package as deprecated, add a "deprecated" field to the registry entry:
Users will see a warning during install, search, and info but can still install the package.
Yanking a Version
To mark a specific version as having a critical issue:
Yanked versions are skipped by the resolver. Users can still install them with an explicit pin: tbxmanager install pkg@==1.0.0.
Submit deprecation or yank changes as a PR to the registry.
Advanced: Manual Submission
If you prefer not to use the automated publish action, you can submit packages manually.
Building Archives
Create a zip archive containing your package files:
# For pure MATLAB packages
cd my-toolbox
zip -r ../my-toolbox-all.zip . -x '.git/*' -x '.github/*' -x 'tbxmanager.json'
# For platform-specific packages (with MEX files)
zip -r ../my-toolbox-maci64.zip . -x '.git/*' -x '*.mexw64' -x '*.mexa64'
Hosting on GitHub Releases
- Tag your release:
git tag v1.0.0 && git push --tags - Go to your repo's Releases page
- Create a new release from the tag
- Upload your archive(s)
- Use the release asset URLs in your registry submission
Computing SHA256
The registry requires SHA256 hashes for integrity verification:
Tip
Use the converter script to generate the registry format from your tbxmanager.json:
Submitting to the Registry
- Fork MarekWadinger/tbxmanager-registry
- Create
packages/my-toolbox/package.json:
{
"name": "my-toolbox",
"description": "A useful MATLAB toolbox",
"homepage": "https://github.com/you/my-toolbox",
"license": "MIT",
"authors": ["Your Name <your@email.com>"],
"versions": {
"1.0.0": {
"matlab": ">=R2022a",
"dependencies": {},
"platforms": {
"all": {
"url": "https://github.com/you/my-toolbox/releases/download/v1.0.0/my-toolbox-all.zip",
"sha256": "your-sha256-hash-here"
}
},
"released": "2026-03-25"
}
}
}
- Open a pull request
- CI automatically validates your submission
- Once merged, the package appears in the registry
Updating (Manual)
To add a new version, edit your package.json in the registry with a new version entry and open a PR.