This guide will help you set up a local development environment for gh-config, build the project, run tests, and contribute changes.
- Rust (stable)
- Git
- Make (optional, for convenience)
-
Clone the repository:
git clone https://github.com/gitkb/gh-config-cli.git cd gh-config-cli -
Install Rust (if not already installed):
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-
Build the project:
cargo build --release
-
Run tests:
cargo test -
Lint and format:
cargo fmt -- --check cargo clippy --all-targets --all-features -- -D warnings
The Makefile provides shortcuts for common tasks:
make build
make diff CONFIG_FILE=config.yaml
make sync CONFIG_FILE=config.yaml
make sync-from-github CONFIG_FILE=config.yaml GITHUB_ORG=gitkbAfter building, run the CLI with:
./target/release/gh-config --help- Follow the contribution guidelines.
- Write tests for new features or bug fixes.
- Ensure all tests pass and code is formatted.
Happy hacking!