Contributing to OpenSpec
Development Setup
- Clone the repository.
-
Install dependencies using pnpm:
pnpm install -
Build the project:
pnpm run build
Running Tests
OpenSpec uses vitest for testing.
# Run all tests
pnpm test
# Run tests in watch mode
pnpm test:watch
# Run tests with UI
pnpm test:ui
Local Development
To test the CLI locally without installing it globally:
# Build and run
pnpm run dev:cli -- [command] [options]
# Example
pnpm run dev:cli -- init
Release Process
OpenSpec uses Changesets for versioning.
- Make your changes.
- Run
pnpm changesetto generate a changeset file. - Push changes. The CI workflow will create a Version Package PR.
- Merging the Version PR triggers the release to npm.