pi-release

Pi-native release automation: bump version, create GitHub release, publish to npm

Packages

Package details

extension

Install pi-release from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-release
Package
pi-release
Version
1.0.0
Published
Jun 25, 2026
Downloads
46/mo · 9/wk
Author
realvendex
License
MIT
Types
extension
Size
46.3 KB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./extensions"
  ],
  "skills": [],
  "prompts": []
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-release

Pi-native release automation: bump version, generate changelog, create GitHub release, publish to npm.

Installation

pi install npm:pi-release

What It Does

pi-release automates the full release lifecycle for pi.dev packages. It completes the pipeline:

pi-commit-lint → pi-changelog → pi-release

Three focused tools and one orchestrated /release command handle:

  • Version bumping — semver-aware package.json updates with git commits and tags
  • GitHub releases — auto-generated release notes via GitHub CLI
  • npm publishing — with OTP/2FA support and custom registries

Tools

bump_version

Bump the version in package.json, create a git commit and tag.

bump_version(bump: "patch" | "minor" | "major", pre_release?: "beta", dry_run?: false)

Parameters:

Parameter Type Default Description
bump major | minor | patch patch Version bump type
pre_release string Pre-release tag (e.g. beta, alpha, rc)
dry_run boolean false Preview without making changes
message string chore(release): {version} Custom commit message

create_github_release

Create a GitHub release from a git tag.

create_github_release(tag: "v1.0.0", title?: "Release v1.0.0", notes?: "...", prerelease?: false, dry_run?: false)

Parameters:

Parameter Type Default Description
tag string required Git tag to release from
title string Release {tag} Release title
notes string auto-generated Custom release notes
prerelease boolean false Mark as pre-release
dry_run boolean false Preview without creating

Requires GitHub CLI (gh) installed and authenticated.

publish_npm

Publish the package to npm.

publish_npm(otp?: "123456", registry?: "https://...", tag?: "beta", dry_run?: false)

Parameters:

Parameter Type Default Description
otp string One-time password for npm 2FA
registry string https://registry.npmjs.org/ npm registry URL
tag string latest npm dist-tag
dry_run boolean false Preview without publishing

Command

/release

Orchestrates the full release flow:

/release [major|minor|patch] [--dry-run]

Steps:

  1. 📦 Bump version in package.json, commit, tag
  2. 📝 Generate changelog from conventional commits
  3. 🚀 Create GitHub release with auto-generated notes
  4. 📤 Publish to npm
# Preview a patch release
/release patch --dry-run

# Execute a minor release
/release minor

# Major release
/release major

Configuration

Create pi-release.json in your project root:

{
  "registry": "https://registry.npmjs.org/",
  "githubRepo": "owner/repo",
  "defaultBump": "patch",
  "preReleaseTag": "",
  "generateChangelog": true,
  "commitBump": true,
  "commitMessage": "chore(release): {version}",
  "createTag": true,
  "tagPrefix": "v",
  "createGithubRelease": true,
  "publishToNpm": true
}

Config options:

Option Type Default Description
registry string https://registry.npmjs.org/ npm registry URL
githubRepo string | null null (auto-detect) GitHub owner/repo
defaultBump string patch Default bump type for /release
preReleaseTag string "" Pre-release tag applied to all releases
generateChangelog boolean true Auto-generate changelog
commitBump boolean true Commit the version bump
commitMessage string chore(release): {version} Commit message template
createTag boolean true Create git tag
tagPrefix string v Tag prefix (e.g. v1.0.0)
createGithubRelease boolean true Create GitHub release
publishToNpm boolean true Publish to npm

Dry Run

All tools support --dry-run mode to preview what would happen without making any changes:

# Via tool
bump_version(bump="minor", dry_run=true)

# Via command
/release minor --dry-run

Example Workflow

# 1. Ensure commits follow conventional format
pi> /lint-commits

# 2. Preview the release
pi> /release minor --dry-run

# 3. Execute the release
pi> /release minor

# Output:
# 📦 Version Bump: 1.0.0 → 1.1.0
# 📝 Changelog generated
# 🚀 GitHub Release: https://github.com/owner/repo/releases/tag/v1.1.0
# 📤 Published to npm: my-package@1.1.0
# ✅ Release complete!

Resources

License

MIT