Thank you for considering a contribution! This guide explains how to set up your environment, propose changes, and submit high‑quality pull requests.
By participating, you agree to uphold a respectful, inclusive environment. Be kind and constructive.
- Fork the repository and clone your fork.
- Install PHP dependencies:
composer install
- Verify the CLI runs locally:
# via PHP php bin/flexi-cli --help # or if executable bit is set ./bin/flexi-cli --help
bin/flexi-cli: CLI entry pointsrc/Command/: Symfony Console commandssrc/Core/,src/Service/,src/Installer/: core logic and helpersstubs/: template files used by installers/scaffoldingdocs/: user documentation (index and per‑command pages)
- Create a feature branch from
dev-cli:git checkout dev-cli git pull git checkout -b feat/my-change
- Make changes with clear, focused commits (see Commit Style below).
- Run the CLI locally to test your changes (see Testing Changes).
- Update or add docs where needed (see Documentation below).
- Open a Pull Request against
dev-cli.
Use Conventional Commits to keep history consistent:
feat: add something newfix: resolve a bugdocs: update docsrefactor: improve code without changing behaviorchore: tooling or maintenanceperf: performance improvements
Examples:
feat(init): simplify default setup flowfix(add): skip existing files without error
- Follow PSR-12 coding standards.
- Use strict types and type hints where practical.
- Prefer explicit, descriptive names over abbreviations.
- Handle errors with meaningful messages; avoid silent failures.
- Keep functions small and focused; use early returns to reduce nesting.
If you use an auto‑formatter or linter locally, ensure it does not reformat unrelated code.
While there is not yet a formal test suite, please:
- Manually exercise affected commands:
php bin/flexi-cli init --help php bin/flexi-cli add --help php bin/flexi-cli build --help php bin/flexi-cli validate --help
- For file‑writing operations, test inside a temporary sample project directory and verify generated files.
- For network/registry features, prefer using local/test endpoints when possible.
If you add testing utilities or scripts later, document them here and in composer.json scripts.
If your change affects behavior, options, or output, update the docs:
- Docs index:
docs/README.md - Per‑command pages:
docs/commands/*.md
When adding a new command:
- Implement in
src/Command/*Command.php. - Create a new page in
docs/commands/your-command.mdwith synopsis, options, behavior, and examples. - Link it from
docs/README.mdand the rootreadme.mdDocumentation section.
- Place new templates under
stubs/in the appropriate subfolder. - Keep stub file names consistent and descriptive.
- Avoid trailing spaces and ensure newline at end of file.
- Branch is up to date with
dev-cli - Conventional Commit messages
- Code follows PSR‑12 and project style
- New/changed behavior documented in
docs/ - Manually tested relevant CLI commands
- No unrelated file changes or reformatting
When filing a bug report, include:
- CLI version and PHP version (
php -v) - OS and package manager (npm/yarn/pnpm) if relevant
- Exact command(s) run and full output (or a screenshot)
- Minimal reproduction steps or a sample repo if possible
- Merge features into
dev-cli - After validation, fast‑forward or merge into
mainwith a version bump - Tag the release and update changelog
Thanks for contributing to Flexiwind CLI!