Thank you for your interest in contributing to the Features CLI project! This document outlines the process for contributing and setting up the development environment.
-
Clone the repository:
git clone https://github.com/interaction-dynamics/features.git cd features -
Build the CLI:
cd tools/cli cargo build -
Run tests:
cargo test -
Test the CLI locally:
cargo run -- ../../examples/javascript-basic
Before submitting a PR, ensure your code passes all checks:
# Format code
cargo fmt --all
# Run clippy
cargo clippy --all-targets --all-features -- -D warnings
# Run tests
cargo testThe project uses automated releases triggered by git tags. Here's how releases work:
When a new version tag (e.g., v0.5.0) is pushed, the GitHub Actions workflow automatically:
- Validates the code - runs tests, linting, and formatting checks
- Builds binaries - creates binaries for all supported platforms
- Publishes to crates.io - publishes the Rust crate
- Publishes to npm - creates and publishes npm packages for all platforms
- Creates GitHub release - with release notes and binary attachments
For maintainers setting up the release workflow, the following GitHub secrets are required:
CRATES_IO_TOKEN: API token from crates.io- Go to crates.io → Account Settings → API Tokens
- Create a new token with publish permissions
- Add it as a repository secret
NPM_TOKEN: API token from npmjs.com- Go to npmjs.com → Access Tokens → Generate New Token
- Select "Publish" or "Automation" type
- Add it as a repository secret
The workflow uses these environments (configure in repository settings):
crates-publish: For crates.io publishing (requiresCRATES_IO_TOKEN)npm-publish: For npm publishing (requiresNPM_TOKEN)
- Update the version in
tools/cli/Cargo.toml - Commit the change:
git commit -am "chore: bump version to X.Y.Z" - Create and push a tag:
git tag vX.Y.Z && git push origin vX.Y.Z - The GitHub Actions workflow will handle the rest
If automated publishing fails, you can publish manually:
cd tools/cli
cargo publishFollow the steps in the GitHub workflow or use the existing npm publishing scripts.
features/
├── tools/
│ ├── cli/ # Rust CLI source code
│ └── web/ # Web dashboard
├── examples/ # Example projects
├── .github/
│ └── workflows/ # CI/CD workflows
└── docs/ # Documentation
- Create a feature branch from
main - Write descriptive commit messages following conventional commits
- Add tests for new functionality
- Update documentation as needed
- Ensure CI passes - all checks must be green
- Keep PRs focused - one feature/fix per PR
We follow Conventional Commits:
feat: add new featurefix: resolve bugdocs: update documentationchore: maintenance taskstest: add or update tests
- Issues: Report bugs or request features via GitHub Issues
- Discussions: Ask questions in GitHub Discussions
- Documentation: Check the README and inline code comments
To update the screenshot in the README, follow these steps:
- Run the project locally using
features /path/to/project --project-dir ./repository --serve - Take a screenshot of the UI
- Use https://postspark.app/ to add a frame
- Upload the framed screenshot to your GitHub account
- Update the README with the new screenshot URL
This project follows a standard code of conduct. Please be respectful and professional in all interactions.
By contributing to this project, you agree that your contributions will be licensed under the MIT License.