Contributing
How to contribute to DevFlow — set up your local dev environment, write or fix modules, run tests, and submit a pull request to the open-source repository.
Getting Started
Prerequisites
- Node.js >= 18
- npm (or pnpm/yarn)
- Git
Setup
git clone https://github.com/disin8/devflow.git
cd devflow
npm installDevelopment
# Build
npm run build
# Watch mode
npm run dev
# Type checking
npm run typecheck
# Run tests
npm test
# Run with coverage
npm run test:coverage
# Test the CLI
node bin/devflow.js --help
node bin/devflow.js --dry-runProject Structure
src/
├── cli.ts # CLI entry point (Commander)
├── index.ts # Public exports
├── core/ # Core utilities (types, fs, logger, executor)
├── modules/ # All 40+ modules (one file each)
│ ├── registry.ts # Module catalogue
│ └── presets.ts # Preset configurations
├── wizard/ # Interactive wizard
└── test/ # Test helpersCommit Convention
We use Conventional Commits:
feat: add new module for X
fix: correct eslint config for Vue
docs: update module catalogue
test: add tests for executor
chore: bump dependenciesAdding a New Module
- Create module file in the appropriate category directory
- Implement
DevFlowModuleinterface (see Creating Modules) - Register in
src/modules/registry.ts - Add to presets if appropriate (
src/modules/presets.ts) - Write tests
- Update documentation
Testing
Tests use Vitest with temporary directory isolation:
# Run all tests
npm test
# Watch mode
npm run test:watch
# With coverage
npm run test:coverageTest Structure
src/core/*.test.ts— core utility testssrc/modules/*.test.ts— module registry, presets, and integration testssrc/test/helpers.ts— shared test utilities (temp dirs, stubs)
Pull Request Process
- Fork the repository
- Create a feature branch (
feat/my-feature) - Make your changes with tests
- Run
npm testandnpm run typecheck - Submit a PR against
main
Code Style
- TypeScript strict mode
- ESM imports with
.jsextensions - Functional style — pure functions where possible
- Actions as data — modules return action objects, not side effects