Thank you for your interest in contributing to strava-cli! This document provides guidelines and instructions for contributing.
- OCaml >= 4.14
- opam (OCaml package manager)
- dune (build system)
- Clone the repository:
git clone https://github.com/fetsh/strava-cli.git
cd strava-cli- Install dependencies:
opam install . --deps-only- Build the project:
dune build- Run the CLI:
dune exec strava -- --helpstrava-cli/
├── bin/
│ └── main.ml # CLI entry point (cmdliner)
├── lib/
│ ├── db.ml # SQLite credential storage
│ ├── auth.ml # OAuth 2.0 authentication
│ ├── api.ml # Strava API client
│ ├── commands.ml # Command implementations
│ └── strava.ml # Public interface
├── dune-project # Project configuration
└── README.md
- Follow OCaml conventions
- Use 2-space indentation for OCaml files
- Use meaningful variable and function names
- Add comments for complex logic
- Add the API endpoint in
lib/api.mlandlib/api.mli - Add the command implementation in
lib/commands.mlandlib/commands.mli - Add the CLI definition in
bin/main.ml - Update the completion scripts:
strava-completion.bashstrava-completion.zsh
- Update
README.mdwith usage examples
Before submitting changes:
- Build the project:
dune build- Test your changes:
dune exec strava -- init # Set up credentials if needed
dune exec strava -- YOUR_COMMAND --help
dune exec strava -- YOUR_COMMAND [args]- Test with different output modes:
dune exec strava -- YOUR_COMMAND --raw
dune exec strava -- YOUR_COMMAND --output test.json
dune exec strava -- YOUR_COMMAND --quietWrite clear, descriptive commit messages:
Add support for gear endpoints
- Implement get_gear API function
- Add gear command to CLI
- Update completion scripts
- Add usage examples to README
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature-name - Make your changes
- Commit your changes:
git commit -m "Description of changes" - Push to your fork:
git push origin feature/your-feature-name - Open a Pull Request
- Provide a clear description of the changes
- Reference any related issues
- Ensure the code builds without errors
- Update documentation as needed
- Keep PRs focused on a single feature or fix
- Maintainers will review your PR
- Address any feedback or requested changes
- Once approved, your PR will be merged
Feel free to open an issue for:
- Bug reports
- Feature requests
- Questions about the codebase
- General discussion
By contributing, you agree that your contributions will be licensed under the MIT License.