Skip to main content

Release orchestration and project scaffolding for npm and PyPI

Project description

rlsbl

Release orchestration and project scaffolding CLI for npm and PyPI.

Install

From npm:

npm i -g rlsbl

From PyPI (requires Node.js 18+):

uv tool install rlsbl

Quick start

rlsbl scaffold
rlsbl release minor

Commands

All commands work at the top level -- registries are auto-detected from project files (package.json, pyproject.toml). Use --registry <npm|pypi> when you need to target a specific registry.

scaffold [--force] [--update]

Scaffolds CI/CD infrastructure and release tooling for all detected registries.

rlsbl scaffold
rlsbl scaffold --registry npm          # target npm only
rlsbl scaffold --registry pypi --force # overwrite existing files

Context-aware behavior when files already exist (without --force):

File Behavior
CLAUDE.md Appends rlsbl sections if the marker is not present
.gitignore Merges missing entries from the template
.github/workflows/ci.yml Preserves existing file, prints a note to review manually
All others Skipped

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

Bumps version, commits, pushes, and creates a GitHub Release. Defaults to patch.

rlsbl release minor
rlsbl release major --dry-run --registry npm

The version is synced across all detected project files (package.json, pyproject.toml) regardless of which registry is primary.

If scripts/pre-release.sh exists, it runs before any changes are made. A non-zero exit aborts the release.

status

Shows project status: package name, version (per registry), git branch, last tag, working tree state, changelog coverage, and CI workflow presence.

rlsbl status
rlsbl status --registry pypi

check <name>

Checks name availability on both npm and PyPI, and warns about confusingly similar names.

rlsbl check my-cool-lib
rlsbl check my-cool-lib --registry npm   # npm only

npm checks variant spellings (hyphens, underscores, dots, no separator). PyPI normalizes per PEP 503 and checks common alternatives.

Global flags: --help, --version.

Release flow

When you run release, the following happens in order:

  1. Verifies gh CLI is installed and authenticated
  2. Checks that the git working tree is clean
  3. Reads the current version from the primary project file
  4. Computes the new version and confirms the git tag does not already exist
  5. Validates that CHANGELOG.md contains a ## <new-version> section
  6. Runs scripts/pre-release.sh if present (non-zero exit aborts)
  7. Writes the new version to the primary project file
  8. Syncs the new version to all other detected project files
  9. Commits the version bump (uses safegit if available, otherwise git)
  10. Pushes the branch to origin
  11. Creates a GitHub Release tagged v<new-version> with the changelog entry as notes
  12. The GitHub Release triggers publish.yml, which publishes to the registry

What scaffold creates

File Source Purpose
.github/workflows/ci.yml Registry-specific CI workflow (lint, test)
.github/workflows/publish.yml Registry-specific Publish on GitHub Release (OIDC)
CHANGELOG.md Shared Version changelog
LICENSE Shared MIT license (author and year filled in)
.gitignore Shared Standard ignores for the ecosystem
CLAUDE.md Shared AI assistant instructions
.claude/settings.json Shared Claude Code settings
scripts/check-prs.sh Shared PR review helper
scripts/pre-release.sh Shared Pre-release hook (runs before each release)
scripts/record-gif.sh Shared Terminal recording helper
scripts/pre-push-hook.sh Shared Pre-push changelog enforcement

All .sh files in scripts/ are made executable automatically. The pre-push hook is installed into .git/hooks/pre-push during scaffold.

Pre-push hook

The scaffolded scripts/pre-push-hook.sh is installed as a git pre-push hook during scaffold. It prevents pushing when CHANGELOG.md lacks an entry for the current version.

How it works:

  1. Detects project type (package.json or pyproject.toml)
  2. Extracts the current version
  3. Checks that CHANGELOG.md contains a heading ## <version>
  4. Blocks the push with an error if the entry is missing

To reinstall manually:

cp scripts/pre-push-hook.sh .git/hooks/pre-push && chmod +x .git/hooks/pre-push

First publish

The first version must be published manually before CI can take over:

Registry Manual first publish Then configure
npm Add an NPM_TOKEN secret to your GitHub repo (Settings > Secrets > Actions), then push a release CI handles subsequent publishes
PyPI Run uv publish Set up Trusted Publishing on pypi.org

After configuration, all subsequent releases are handled by CI when rlsbl release creates a GitHub Release.

Requirements

  • Node 18+
  • GitHub CLI (gh), installed and authenticated
  • git

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rlsbl-0.2.0.tar.gz (24.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rlsbl-0.2.0-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file rlsbl-0.2.0.tar.gz.

File metadata

  • Download URL: rlsbl-0.2.0.tar.gz
  • Upload date:
  • Size: 24.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rlsbl-0.2.0.tar.gz
Algorithm Hash digest
SHA256 cb4c1ed54012b257f455ceed6ee5d437817837d4cfae55fc49df1f19cf0410ca
MD5 335eea1a7515febc3ba050778ac87b54
BLAKE2b-256 7501f25afb788f75cd7c842af8b422838a39577f9eec931cbed03715325dcff4

See more details on using hashes here.

Provenance

The following attestation bundles were made for rlsbl-0.2.0.tar.gz:

Publisher: publish.yml on smm-h/rlsbl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rlsbl-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: rlsbl-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rlsbl-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 646208e4a7b76b9a4bce940a15a5bc142c5d3fb48d5142540f64f94a8501d9c9
MD5 524ca82c3fcedba9e63da5fb756dc83f
BLAKE2b-256 499c77053b89080921872c06db93b77814544b2868f7cda94c46fd3708932375

See more details on using hashes here.

Provenance

The following attestation bundles were made for rlsbl-0.2.0-py3-none-any.whl:

Publisher: publish.yml on smm-h/rlsbl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page