Ship a package in 5 minutes
The MetaScript registry at
pkg.metascriptlang.org is open —
publish under your own yourname/ namespace the minute you log in. No
approval queue, no gatekeeping, no application form. If you write a
useful module, other people can install it five minutes later.
This guide walks from empty folder to published package.
Prerequisites
mscon your path (msc --versionshould print something)- A GitHub account — the registry authenticates via GitHub OAuth
1. Project skeleton
my-package/
├── src/
│ └── index.ms # exports live here
└── build.ms # project + package manifestMinimal src/index.ms:
export function slugify(text: string): string {
return text
.toLowerCase()
.replace(/\s+/g, "-")
.replace(/[^\w-]/g, "");
}Minimal build.ms:
import { BuildConfig } from "std/build";
const config: BuildConfig = {
entry: "./src/index",
package: {
name: "yourname/slug",
version: "0.1.0",
description: "Tiny slug helper",
license: "MIT",
repository: "https://github.com/yourname/slug",
keywords: ["string", "slug", "utility"],
files: ["./src/**/*.ms"],
},
};
export default config;build.ms is MetaScript's only manifest — there is no package.json.
One file, typed config, imports from std/build.
2. The package section
Every field the publisher looks at:
| Field | Required | Purpose |
|---|---|---|
name | ✓ | Personal: yourname/pkg (no @). Org: @orgname/pkg. |
version | ✓ | Semver under MVS resolution. v-prefix accepted (e.g. v0.1.0 or 0.1.0). |
description | One-line summary, shown on the registry | |
license | SPDX id (MIT, Apache-2.0, ...) | |
repository | Repo URL | |
homepage | Project site or docs URL | |
keywords | Array — helps discovery | |
author | Free-form string | |
files | Include globs. Empty = everything under project root | |
ignore | Exclude globs, applied after files |
3. Log in
msc loginOpens your browser to GitHub OAuth. On approval, the token is cached locally. Confirm:
msc whoami
# @yourname4. Dry run first
msc publish --dry-runLists every file that would be uploaded and prints the total size. No
upload happens. Use this to sanity-check your files/ignore globs —
easy to accidentally ship a .env or a node_modules/ clone if you
forget the ignore glob.
5. Publish
msc publishServer limits — enforced client-side so you fail fast, not after uploading megabytes:
| Limit | Value |
|---|---|
| Max files per package | 10,000 |
| Max uncompressed total | 100 MB |
| Max zipped upload | 50 MB |
If publish succeeds, your package is live at
pkg.metascriptlang.org/yourname/slug within a second or two.
6. Ship an update
Bump version in build.ms and publish again:
// build.ms
package: {
name: "yourname/slug",
version: "0.1.1", // bumped
// ...
},msc publishFollow semver: patch for bug fixes, minor for
additive features, major for breaking changes. There is no
msc version helper — edit the string in build.ms directly.
Scopes
| Pattern | Example | How to get it |
|---|---|---|
| Personal | yourname/pkg | Automatic — your GitHub username is your namespace on first msc login. No @. |
| Organization | @myorg/pkg | msc org create myorg (or web UI at pkg.metascriptlang.org/orgs/new). Prefixed with @. |
Personal namespaces are 1:1 with GitHub usernames — the lack of @
visually distinguishes "one human's work" from @org packages that
may have multiple maintainers.
Install your package from someone else
msc add yourname/slug@0.1.0Adds the dep to their build.ms and updates msc.lock. From their
code:
import { slugify } from "yourname/slug";Discovery
Search lives on the web UI at
pkg.metascriptlang.org — filter by
keyword, browse by yourname/ or @org/, see download counts. There's no
msc search CLI yet; contributions welcome.
Next steps
- Package registry reference — full API + web UI tour
- CLI reference — every
mscsubcommand - Showcase — what others have shipped