Contributing to Relizy
Thank you for considering contributing to Relizy! We appreciate your interest in improving this project. This guide will help you get started with contributing.
Table of Contents
- Contributing to Relizy
Code of Conduct
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [email protected].
How Can I Contribute?
Reporting Bugs
If you find a bug, please open an issue using the bug report template. Include:
- A clear, descriptive title
- Steps to reproduce the issue
- Expected vs actual behavior
- Your environment (OS, Node version, package manager)
- Relevant logs or error messages
- Minimal reproduction (if possible)
Suggesting Features
Have an idea for a new feature? Open a feature request with:
- A clear description of the feature
- The problem it solves
- Use cases and examples
- Alternative solutions you've considered
Asking Questions
If you have questions about using Relizy, please open a question issue. We're here to help!
Contributing Code
We welcome code contributions! Here's how to get started:
Development Setup
Prerequisites
Before you begin, ensure you have:
Node.js
^22.23.4 || ^24.22.1 || >=26.12.1(theenginesofpackage.json,.nvmrcfor the version of the CI)pnpm, the version of the
packageManagerfield ofpackage.json, through corepack (Node 25+ no longer ships it):bashnpm install -g corepack && corepack enableGit installed and configured
Fork and Clone
Fork the repository on GitHub by clicking the "Fork" button
Clone your fork locally:
bashgit clone https://github.com/YOUR_USERNAME/relizy.git cd relizy
Install Dependencies
pnpm installThis will:
- Install all dependencies
- Set up Git hooks with Husky
- Prepare your development environment
Development Workflow
Build Commands
# Build the distribution (production build)
pnpm build
# Build in stub mode (faster, for development)
pnpm dev
# Type-check without emitting files
pnpm typecheckTesting Commands
# Run unit tests (generates the docs bundle of the MCP server, agent-docs/, first)
pnpm test:unit
# Run tests in watch mode
pnpm test:unit:watch
# Run tests with coverage report
pnpm test:unit:coverage
# Run a single spec file
pnpm vitest run packages/relizy/src/core/__tests__/version.spec.tsLinting Commands
# Run ESLint
pnpm lint
# Fix linting issues automatically
pnpm lint:fixTesting the CLI Locally
# Run the CLI from the sources, from the root of the repository (tsx packages/relizy/src/cli.ts)
pnpm relizy <command> [options]
# or
pnpm rly <command> [options]Example:
pnpm relizy bump --dry-run
pnpm relizy release --helpProject Structure
Understanding the project structure will help you navigate the codebase:
relizy/
├── packages/
│ ├── relizy/ # The relizy package (CLI and API)
│ │ ├── src/
│ │ │ ├── cli.ts # CLI entry point with Commander.js
│ │ │ ├── index.ts # Public API (an explicit list, see src/__tests__/index.spec.ts)
│ │ │ ├── types.ts # Types of the config, the options and the results
│ │ │ ├── commands/ # One file per command (bump, changelog, commitlint, init, mcp, merge-preview,
│ │ │ │ # pr-comment, provider-release, publish, release, social)
│ │ │ ├── core/ # Logic of the commands (git, tags, versions, npm, AI, commitlint...),
│ │ │ │ # with core/mcp/, the MCP server for the AI agents (relizy mcp)
│ │ │ └── **/__tests__/ # Specs, *.git.spec.ts on real git repositories
│ │ ├── agent-docs/ # Docs bundle of the MCP server, generated (gitignored, published)
│ │ ├── bin/relizy.mjs # CLI executable entry point
│ │ ├── scripts/ # Generation of agent-docs, AI evaluations, peer dependency check
│ │ └── tests/ # Mocks and test helpers of relizy
│ └── core/ # @relizy/core: the generic building blocks (workspaces, catalogs,
│ └── src/ # registries, git helpers, GitHub/GitLab providers)
├── .github/ # GitHub templates and workflows
├── docs/ # VitePress documentation
└── tests/ # Test helper shared by the packages (git repository)The paths below are relative to packages/relizy/.
Key Files to Know
src/cli.ts: CLI argument parsing and command routingsrc/core/version.ts: Semver logic of the bumpssrc/core/config.ts: Default configuration (getDefaultConfig()) and config loadingsrc/types.ts: All the types, with the JSDoc read by the API reference and the MCP serverCLAUDE.md: Architecture of the codebasevitest.config.ts(root): Test configuration and coverage thresholds of both packages
Testing
Unit Tests
Tests are written using Vitest, next to the code in src/**/__tests__/. The coverage covers the src/ of both packages, with the thresholds of the root vitest.config.ts. The specs named *.git.spec.ts run on real git repositories, created in a temporary directory.
# Run all tests
pnpm test:unit
# Watch mode for TDD
pnpm test:unit:watch
# Generate coverage report
pnpm test:unit:coverageWriting Tests
When adding new functionality:
- Add tests in the
__tests__/directory of the module, with theGiven / When / Thennames of the existing specs - For a fix, write a test that fails without it
- Ensure tests are deterministic and isolated
- Aim for meaningful coverage, not just high percentages
The docs are checked too, by src/core/mcp/__tests__/knowledge.spec.ts: it fails when a page cited by the code or the MCP server is renamed, when a CLI flag or a config option is missing from its page, or when a documented default differs from getDefaultConfig(). The links between the pages of the docs are relative (./../config/bump.md).
Example test:
import { describe, expect, it } from 'vitest'
import { someFunction } from '../version'
describe('someFunction', () => {
it('should handle basic case', () => {
expect(someFunction('1.0.0')).toBe('1.0.1')
})
})Manual Testing
For end-to-end testing:
- Create a test monorepo structure
- Run the CLI with
--dry-runto preview changes - Test with different version modes and configurations
- Verify generated changelogs and version bumps
Code Style
TypeScript
- Use TypeScript for all new code
- Provide types for all exported functions and interfaces
- Avoid
anytype; useunknownor proper types - Prefer explicit return types for public APIs
ESLint
This project uses @maz-ui/eslint-config.
# Auto-fix linting issues
pnpm lint:fixKey rules:
- No unused variables
- Consistent quote style (single quotes)
- Trailing commas where valid
- No console statements (use proper logging)
Editor Setup
For the best development experience, use Visual Studio Code with:
- ESLint extension
- TypeScript + JavaScript
- Enable "Format on Save" with ESLint
Commit Guidelines
This project follows Conventional Commits:
Commit Format
<type>(<scope>): <subject>
[optional body]
[optional footer]Types
The types of relizy.config.ts:
- feat: New feature (minor bump)
- fix, perf, refactor, types, style, build: patch bump
- docs, test: in the changelog, without bump
- chore, examples, ci: neither bump nor changelog
A commit has no scope, except docs, release and deps (commitlint.scopes of relizy.config.ts). The body of a commit can end up in the changelog: write it for the users of relizy.
Examples
feat: add support for custom suffix in prerelease versions
fix: handle the 2FA OTP prompt of npm
docs: update the installation instructions
refactor: extract the tag resolution logic
build(deps): upgrade commander to v15Git Hooks
The git hooks are set up with Husky:
pre-commitruns lint-staged:eslint --fixon the staged filescommit-msgrunspnpm relizy commitlint --edit "$1": the commit message is linted with the rules of relizy itself
The no-ai-attribution rule rejects the commits crediting an AI tool (an AI Co-authored-by: trailer, a "Generated with" line): turn off the attribution in the settings of your AI tools.
If your commit is rejected:
- Fix linting issues:
pnpm lint:fix - Follow the problems and the fix printed by commitlint
The hooks do not run the type-checking: run pnpm typecheck before opening the pull request.
Adding an AI Provider
The AI rewrites go through a small registry of providers behind one interface (src/core/ai/), today claude-code and ai-sdk. To add one:
Implement
AIProvider(src/core/ai/provider.ts) insrc/core/ai/providers/my-provider.ts:tsimport type { AIProvider } from '../provider' export const myProvider: AIProvider = { name: 'my-provider', async safetyCheck(config) { // Throw an actionable error when the auth or a dependency is missing }, async generate(config, request) { // Call the model with request.systemPrompt and request.prompt (and request.context), // and return { text, usage? } }, }Register it in
src/core/ai/registry.ts, in theprovidersmap.Add its name to
AIProviderNameand its options toAIConfig.providersinsrc/types.ts, then document them indocs/src/config/ai.md(knowledge.spec.tschecks it).
The prompts, the fallbacks and the call sites need no change.
Pull Request Process
Before Submitting
Update from upstream:
bashgit fetch upstream git rebase upstream/mainTest your changes:
bashpnpm typecheck pnpm lint pnpm test:unit pnpm buildUpdate documentation if needed:
- Update README.md for user-facing changes
- Add/update examples if introducing new features
- Update docs/src/ if needed
Submitting the PR
Push to your fork:
bashgit push origin your-branch-nameOpen a Pull Request on GitHub
Fill out the PR template with:
- Description of changes
- Type of change (feature, bug fix, etc.)
- Related issues
- Testing performed
PR Guidelines
- Keep PRs focused on a single concern
- Write clear PR titles following conventional commits format
- Reference related issues (e.g., "Closes #123")
- Respond to review feedback promptly
- Ensure CI checks pass
- Maintain code coverage: Codecov will comment on your PR
Code Coverage Requirements
This project uses Codecov to track code coverage. When you submit a PR, Codecov will automatically:
- 📊 Comment with coverage diff
- 📁 Show coverage for each modified file
- ✅ Run status checks
Coverage Requirements:
- Overall project: Coverage must not decrease by more than 0.5%
- New code (patch): Must have at least 80% coverage
If Codecov checks fail, add more tests to cover your code:
# Run tests with coverage locally
pnpm test:unit:coverage
# Open coverage report in browser
open coverage/index.htmlReview Process
- A maintainer will review your PR
- Address any requested changes
- Once approved, a maintainer will merge your PR
- Your contribution will be included in the next release! 🎉
Additional Resources
Documentation
- README.md - Project overview and usage
- Online Documentation - Full documentation site
Useful Links
- GitHub Repository
- Issues
- Changelogen - Inspiration of the changelog format
- Conventional Commits
Getting Help
- Questions? Open a question issue
- Found a bug? Report it
- Have an idea? Suggest a feature
Thank you for contributing to Relizy! Your efforts help make this project better for everyone. 🚀