Development Setup
Setting up your development environment for contributing to CyanPrint
Development Setup
This guide will help you set up your development environment for contributing to CyanPrint.
Prerequisites
CyanPrint uses Nix for reproducible development environments. All dependencies are managed through Nix flakes.
| Tool | Purpose |
|---|---|
| Nix | Package manager and dev environment |
| Direnv | Auto-loads Nix environment |
| Git | Version control |
Quick Start
Fork the repository on GitHub, then clone your fork:
# Replace REPO_NAME with: boron, iridium, zinc, helium, or argongit clone https://github.com/YOUR_USERNAME/sulfone.REPO_NAME.gitcd sulfone.REPO_NAME
Allow direnv to load the Nix environment:
direnv allow
Nix will automatically install all required dependencies. Note: Some repositories run 'pls setup' automatically via .envrc.
Setup dependencies and start development:
pls setuppls dev
Common Commands
All repositories use pls (Taskfile) for common operations. Note that available commands vary by repository:
| Command | Description |
|---|---|
pls setup | Install dependencies |
pls dev | Start development server (not available in all repos) |
pls build | Build for production |
pls test | Run tests (only available in some repos) |
Check each repository's Taskfile.yaml for the full list of available commands.
Pre-commit Hooks
Pre-commit hooks run automatically on commit and handle:
- Code formatting (treefmt)
- Linting (language-specific: golangci-lint, clippy, biome, ruff, mypy, eslint, etc.)
- Secrets scanning
- Shellcheck
To run all checks manually:
pre-commit run --all-files