Publish bindings with the CLI
Upload a bindings tarball with gma publish.
gma publish uploads a .tgz tarball produced by gma generate to an npm-compatible registry. It needs a registry URL and a token; no GitMyABI account is required.
Tarball resolution
The CLI picks the tarball in this order:--tar <path> → the tar field in the project config → <output>/<name>-<version>.tgz.
Token resolution
Tokens resolve as: --token → $tokenEnv (when tokenEnv is set in gma.config.json) → NPM_TOKEN → the active profile's saved npmToken.
Flags
--tar <path>— path to the bindings tarball.--registry <url>— registry URL.--token <token>— registry auth token.--access <public|restricted>— npm access flag.--tag <tag>— dist-tag (for examplelatest,next).--dry-run— perform all checks and print the request without uploading.--profile <name>— profile name used to read saved registry / npm credentials.--mcp— after publishing the bindings tarball, also publish the companion MCP.tgzemitted bygma generate --generate-mcp.
Examples
# Default: pick up ./gma-out/<name>-<version>.tgz from gma.config.json
gma publish \
--registry https://registry.npmjs.org \
--token "$NPM_TOKEN"
# Explicit tarball
gma publish \
--tar ./gma-out/my-bindings-1.0.0.tgz \
--registry https://registry.npmjs.org \
--token "$NPM_TOKEN"
# Dry run — no upload
gma publish --dry-runRelated
- CLI overview
What the gma CLI does and when to use it.
- Generate bindings with the CLI
Use gma generate to produce a typed bindings tarball.
- CI and GitHub Action
Run gma generate and publish from CI using the official GitHub Action.
- Publish generated bindings to npm
Configure a project so each build publishes a typed bindings package to npm.
- Package format
Shape of the published bindings package and the CDN-hosted ABI artifacts.