Development Setup¶
Get your development environment ready to contribute to Feluda.
Setting Up for Development¶
Fork the repository and clone it to your local machine:
git clone https://github.com/yourusername/feluda.git cd feluda
Install dependencies and tools:
cargo buildConfigure git hooks (recommended for automatic checks on commit):
# Setup development environment with pre-commit hooks just setup
This will:
Make hook scripts executable
Configure git to use
.githooksdirectoryEnable automatic pre-commit checks
Run locally:
./target/debug/feluda --helpRun tests to ensure everything is working:
cargo testInstall feluda system-wide (optional):
just installThis will:
Build the release binary with all checks
Copy the binary to
/usr/local/bin/feludafor system-wide accessMake
feludaavailable globally in your terminal
Verify the installation:
feluda --version
Pre-commit Hooks¶
The repository includes automated pre-commit hooks that run:
Format checks (
cargo fmt --all -- --check)Linting (
cargo clippy --all-targets --all-features -- -D warnings)All tests (
cargo test)
Setup options:
Option A: Git hooks (automatic) - Recommended¶
# After cloning, run once:
just setup
# Now CI checks will run automatically on every commit
git commit -m "your message"
If you prefer manual setup:
git config core.hooksPath .githooks
chmod +x .githooks/*
Option B: Using pre-commit framework¶
# Install pre-commit if you don't have it
pip install pre-commit
# Install the hooks
pre-commit install
# CI checks will run automatically on every commit
git commit -m "your message"
Option C: Run CI checks manually¶
just test-ci
This runs all checks exactly as the GitHub Actions CI does, without committing.
Documentation¶
To work on the documentation locally:
# Install documentation dependencies (first time only)
just docs-setup
# Serve docs locally with live reload
just docs-serve
# Build documentation
just docs-build
# Clean documentation build artifacts
just docs-clean