Publish bindings with the CLI

Upload a bindings tarball with gma publish.

CLI

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 example latest, 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 .tgz emitted by gma 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-run

Related