Thank you for your interest in contributing to bunkit! This guide will help you get started.
- Bun v1.3.0 or higher (required for catalogs, isolated installs, MySQL, Redis)
- Node.js v20.9.0 or higher (required for Next.js 16)
- Git
# Clone the repository
git clone https://github.com/Arakiss/bunkit.git
cd bunkit
# Install dependencies
bun install
# Build all packages
bun run build
# Run the CLI locally
bun run cli -- --helpbunkit/
├── packages/
│ ├── cli/ # Main CLI package (@bunkit/cli)
│ ├── core/ # Core utilities (@bunkit/core)
│ ├── templates/ # Project templates (@bunkit/templates)
│ └── generators/ # Code generators (@bunkit/generators)
├── .github/
│ └── workflows/ # CI/CD workflows
└── .changeset/ # Changesets configuration
-
Create a branch for your changes:
git checkout -b feature/your-feature-name
-
Make your changes in the appropriate package
-
Test your changes:
bun run build # Build all packages bun run typecheck # Type check bun run lint # Lint code bun run format # Format code
-
Create a changeset to describe your changes:
bun run changeset
This will prompt you to:
- Select which packages are affected
- Choose the bump type (major/minor/patch)
- Write a summary of the changes
Example changeset:
--- "@bunkit/cli": minor "@bunkit/core": patch --- Add new feature X to CLI and fix bug Y in core
- Major (1.0.0) - Breaking changes that require user action
- Minor (0.1.0) - New features, backwards compatible
- Patch (0.0.1) - Bug fixes, no new features
- Prerelease (0.1.0-alpha.1) - Alpha/beta releases for testing
Follow conventional commits format:
type(scope): description
[optional body]
Types:
feat: New featurefix: Bug fixdocs: Documentation changesrefactor: Code refactoringtest: Adding testschore: Maintenance tasks
Examples:
git commit -m "feat(cli): add new preset for SvelteKit"
git commit -m "fix(core): resolve path validation issue"
git commit -m "docs: update README with new examples"bunkit uses GitHub Actions + Changesets for automated releases.
-
Add your changes with a changeset (see above)
-
Push to main (via PR merge):
git push origin your-branch # Create PR and merge -
GitHub Actions will automatically:
- Detect the changeset
- Create a "Release: Version Packages" PR
- Update package versions and CHANGELOGs
-
Merge the release PR:
- GitHub Actions will automatically publish to npm ✨
If automated release fails:
# 1. Update versions from changesets
bun run version
# 2. Commit the version bump
git add .
git commit -m "Release version packages"
# 3. Build and publish
bun run build
bun run releaseWe follow SemVer 2.0.0:
- Major (1.0.0) - Breaking changes that require user action
- Minor (0.1.0) - New features, backwards compatible
- Patch (0.0.1) - Bug fixes, no new features
- Prerelease (0.1.0-alpha.1) - Alpha/beta releases for testing
- Workflow:
.github/workflows/release.yml - Triggers: Push to
mainbranch - Process:
- Detects changesets
- Creates release PR with version bumps
- Publishes to npm on PR merge
The following secrets must be configured in GitHub Settings → Secrets:
NPM_TOKEN- npm automation token for publishing- Create at: https://www.npmjs.com/settings/USERNAME/tokens
- Type: "Automation" (no 2FA required)
- Permissions: "Read and write"
.github/workflows/release.yml- Automated release workflow- Triggers on push to
main - Creates release PR or publishes packages
- Requires
NPM_TOKENsecret
- Triggers on push to
bunkit maintains all dependencies at their latest stable versions. To keep dependencies up to date:
Check for outdated dependencies:
bun run check-depsUpdate all dependencies to latest versions:
bun run update-depsThis will:
- Update all dependencies to their latest compatible versions
- Update the lockfile (
bun.lock) - Verify everything still builds correctly
Note: Major version updates (e.g., Zod 3 → 4, Vitest 2 → 4) are kept at stable versions to avoid breaking changes. These are updated manually after thorough testing.
# Run all tests
bun test
# Run tests in watch mode
bun test --watch
# Run tests for specific package
bun --filter @bunkit/core testPlace test files next to source files:
src/
├── utils.ts
└── utils.test.ts
We use Biome for linting and formatting:
# Check code
bun run lint
# Fix issues automatically
bun run format# Check types
bun run typecheckAll packages are configured for public access in .changeset/config.json:
{
"access": "public"
}Each package must have:
{
"name": "@bunkit/package-name",
"version": "x.y.z",
"description": "Package description",
"author": "Arakiss",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/Arakiss/bunkit.git",
"directory": "packages/package-name"
}
}# Install dependencies for all workspaces
bun install
# Run command in specific workspace
bun --filter @bunkit/cli dev
# Run command in all workspaces
bun run --filter './packages/*' build
# Add dependency to specific workspace
bun --filter @bunkit/cli add package-name
# Add to catalog (for shared versions)
bun add package-name # In rootShared dependency versions are managed in root package.json:
{
"catalog": {
"react": "^19.1.0",
"next": "^15.5.6"
}
}Reference in workspace:
{
"dependencies": {
"react": "catalog:"
}
}- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: README.md
By contributing to bunkit, you agree that your contributions will be licensed under the MIT License.