Thank you for your interest in contributing to vibe!
mise installSource the development helper to use vibe command directly:
source .vibedev
vibe start feat/my-feature
vibe cleanOr run via pnpm:
pnpm run dev start feat/my-featureNote: The shell function uses eval because vibe start outputs shell commands for directory navigation.
All tasks are defined in package.json to ensure consistency between local development and CI:
# Run all CI checks (same as CI runs)
pnpm run check:core
# Individual checks
pnpm run format:check # Check code formatting
pnpm run lint # Run linter
pnpm run typecheck # Type check
pnpm run test # Run tests
# Auto-fix formatting
pnpm run format
# Development
pnpm run dev # Run in development mode
pnpm run compile # Build binaries for all platformsBefore pushing, run the same checks that CI will run:
pnpm run check:coreThis runs:
- Format check (
pnpm run format:check) - Linter (
pnpm run lint) - Type check (
pnpm run typecheck) - Tests (
pnpm run test)
This project follows the git-flow branching model:
develop- Active development branch. All feature branches merge here.main- Stable release branch. Only receives merges from develop during releases.
See AGENTS.md for detailed branching workflow.
-
Prepare the release on develop:
# Ensure you're on develop and up to date git checkout develop git pull origin develop # Update version in package.json # Update CHANGELOG if you maintain one # Commit version bump git add package.json git commit -m "chore: Bump version to vX.X.X" git push origin develop
-
Sync main with develop:
Since main branch has protection rules, you must create a pull request:
# Create a sync branch from develop git checkout -b chore/release-vX.X.X git push origin chore/release-vX.X.X # Create PR targeting main gh pr create --base main --title "chore: Release vX.X.X" \ --body "Sync main with develop for vX.X.X release"
After the PR is merged:
-
Create and push the tag:
# Checkout main and pull the merged changes git checkout main git pull origin main # Create and push the tag git tag vX.X.X git push origin vX.X.X # Return to develop git checkout develop
-
Create the GitHub release:
gh release create vX.X.X --generate-notes
When a release is created, GitHub Actions automatically:
- Builds binaries for each platform
- Uploads binaries to the release
- Updates the homebrew-tap formula
The release workflow requires the HOMEBREW_TAP_TOKEN secret.
-
Go to https://github.com/settings/personal-access-tokens/new
-
Configure the following:
- Token name:
homebrew-tap-updater - Expiration: 90 days (or your preference)
- Repository access:
Only select repositories→kexi/homebrew-tap - Permissions:
- Contents: Read and write
- Token name:
-
Click
Generate tokenand copy the token
gh secret set HOMEBREW_TAP_TOKEN
# Paste the token when promptedgit tag v0.1.0
git push origin v0.1.0
gh release create v0.1.0 --generate-notesThis project follows GNU Coding Standards for command-line interface design:
- Support
--helpand--versionoptions - Use long options with
--prefix (e.g.,--verbose) - Use short options with
-prefix (e.g.,-v)
When contributing to vibe, please keep these security considerations in mind:
- Always validate user inputs, especially file paths and branch names
- Use
validatePath()frompackages/core/src/utils/copy/validation.tsfor path validation - Check for null bytes, newlines, and shell command substitution patterns
- Use Node.js
spawnwith argument arrays, not shell strings, to prevent injection - Never pass untrusted input directly to shell commands
- The
runHooks()function inpackages/core/src/utils/hooks.tsexecutes user-defined commands - this is intentional, but the trust mechanism must be respected
- The trust system (
packages/core/src/utils/settings.ts) uses SHA-256 hashes to verify configuration file integrity - Trust is repository-based (identified by remote URL or repo root)
- Always require explicit user consent before executing hook commands from untrusted sources
- Use atomic file operations (temp file + rename) for settings to prevent corruption
- Validate paths before copy operations to prevent directory traversal
- The
TOCTOU(time-of-check to time-of-use) race condition is addressed inverifyTrustAndRead()- this function reads the file content and verifies its hash atomically, preventing attackers from modifying the file between the check and use
If you discover a security vulnerability, please report it by creating a private security advisory on GitHub rather than opening a public issue.