Contributing Guidelines
Help improve LoKO by contributing catalog workloads, bug reports, documentation improvements, or core code changes.
How to Contribute
Section titled “How to Contribute”You can contribute to LoKO in several ways:
- Catalog workloads - Add new system or user workloads to the catalog (most common)
- Bug reports and feature requests - Submit issues for bugs or suggest improvements
- Documentation improvements - Fix typos, clarify instructions, add examples
- Core code contributions - Fix bugs or add features to the LoKO CLI
Catalog Workload Contributions
Section titled “Catalog Workload Contributions”The most common contribution type. Follow the process below.
1. Fork the Repository
Section titled “1. Fork the Repository”# Fork on GitHub# https://github.com/getloko/getloko.github.io
# Clone your forkgit clone https://github.com/YOUR-USERNAME/getloko.github.io.gitcd getloko.github.io
# Install pre-commit hooks (optional but recommended)pip install pre-commitpre-commit install2. Create a Branch
Section titled “2. Create a Branch”git checkout -b add-workload-myapp3. Add Your Workload
Section titled “3. Add Your Workload”Add your workload definition to the appropriate category file in public/catalog/workloads/:
databases.yaml- Database workloadscache.yaml- Cache and key-value storesmessaging.yaml- Message queues and streamingstorage.yaml- Object storagedevops.yaml- Git hosting, CI/CDdevtools.yaml- Development and testing toolsgitops.yaml- GitOps toolscollaboration.yaml- Team collaboration
4. Test Your Workload
Section titled “4. Test Your Workload”# Test with LoKO CLIloko workloads add myapploko workloads enable myapp --now
# Verify deploymentloko workloads info myapploko workloads connect myapp5. Update Documentation
Section titled “5. Update Documentation”Create or update the workload documentation page in src/content/docs/catalog/workloads/.
6. Submit Pull Request
Section titled “6. Submit Pull Request”git add .git commit -m "Add workload: myapp"git push origin add-workload-myappOpen a pull request on GitHub with:
- Clear description of the workload
- Why it’s useful for local development
- Any special requirements or dependencies
Core Code Contributions
Section titled “Core Code Contributions”Contributing to the LoKO CLI requires Python development setup.
Development Setup
Section titled “Development Setup”# Fork the repository# https://github.com/getloko/loko
# Clone your forkgit clone https://github.com/YOUR-USERNAME/loko.gitcd loko
# Install in development mode with dev dependenciespip install -e ".[dev]"
# Or using uv (faster)uv pip install -e ".[dev]"Running Tests
Section titled “Running Tests”# Run all testspytest
# Run with coveragepytest --cov=loko --cov-report=html
# Run specific test filepytest tests/test_cli.py
# Run with debug outputpytest -v -sCode Quality
Section titled “Code Quality”LoKO uses Ruff for linting and formatting:
# Install ruffpip install ruff
# Format coderuff format .
# Lint coderuff check .
# Fix auto-fixable issuesruff check --fix .Making Changes
Section titled “Making Changes”-
Create a branch for your feature or fix:
Terminal window git checkout -b fix-dns-resolution -
Make your changes following the existing code style
-
Add or update tests for your changes
-
Run tests to ensure nothing breaks:
Terminal window pytestruff check . -
Commit your changes using conventional commit format:
Terminal window git commit -m "fix: resolve DNS timeout on macOS Sequoia" -
Push to your fork:
Terminal window git push origin fix-dns-resolution -
Open a pull request on GitHub
Pull Request Guidelines
Section titled “Pull Request Guidelines”Follow these guidelines when submitting PRs (both catalog and core contributions):
PR Title Format
Section titled “PR Title Format”Use conventional commit format:
feat: add PostgreSQL workload- New featurefix: correct Redis connection string template- Bug fixdocs: clarify installation prerequisites- Documentationtest: add cluster creation tests- Testsrefactor: simplify DNS configuration logic- Code refactoringchore: update Helm chart versions- Maintenance
PR Description
Section titled “PR Description”Include:
- What: Clear description of what changed
- Why: Why the change is needed (problem being solved)
- Testing: What testing you did (commands run, test results)
Example:
## What
Add MinIO workload to object storage category.
## Why
MinIO provides S3-compatible object storage for local development,useful for testing applications that use AWS S3.
## Testing
- Deployed with `loko workloads add minio --now`- Verified Web UI accessible at https://minio.dev.me- Tested S3 client connection using boto3- Validated secret generation and storageReview Process
Section titled “Review Process”Pull requests will be reviewed when maintainers have time. There is no guaranteed timeline for reviews or merges.
What we look for:
- Code quality and clarity
- Test coverage (for core contributions)
- Documentation completeness
- Adherence to existing patterns
- Clear value to users
Approval process:
- No specific approval count required
- Maintainers merge when ready
- May request changes or clarification
Workload Requirements
Section titled “Workload Requirements”System Workloads
Section titled “System Workloads”System workloads are pre-configured services for common use cases.
Must have:
- ✅ Clear description and category
- ✅ Tested Helm chart configuration
- ✅ Pre-configured presets (sensible defaults)
- ✅ Connection strings for common use cases
- ✅ Health checks
- ✅ Documentation page
Should have:
- Auto-generated secrets
- Web UI (as linked workload if separate chart)
- Endpoints documentation
- Code examples
Example:
workloads: redis: type: system category: cache description: "Redis in-memory cache"
chart: repo: groundhog2k name: groundhog2k/redis version: "0.5.0"
defaults: namespace: loko-workloads ports: [6379]
secrets: - name: password type: password length: 16
presets: # Pre-configured values service: type: ClusterIP port: 6379
endpoints: - name: client protocol: tcp port: 6379
connection-strings: - name: default template: "redis://:${PASSWORD}@${HOST}:6379"User Workloads
Section titled “User Workloads”User workloads are examples showing how to deploy custom applications.
Should provide:
- Example YAML configuration
- Clear documentation
- Common patterns (HTTP vs TCP services)
Adding Helm Repositories
Section titled “Adding Helm Repositories”If your workload uses a chart from a repository not in the catalog:
Add Repository to repositories.yaml
Section titled “Add Repository to repositories.yaml”helm-repositories: - name: my-repo url: https://charts.example.com/For OCI registries:
helm-repositories: - name: my-oci-repo url: ghcr.io/myorg/charts oci: trueReference Repository in Workload
Section titled “Reference Repository in Workload”workloads: myapp: chart: repo: my-repo name: my-repo/myapp version: "1.0.0"Documentation Guidelines
Section titled “Documentation Guidelines”Create Workload Documentation
Section titled “Create Workload Documentation”Add a section to the appropriate category page in src/content/docs/catalog/workloads/:
### MyApp
Brief description of what it does.
**Features:**- Feature 1- Feature 2- Feature 3
**Deployment:**
\```bashloko workloads add myapp --nowloko workloads connect myapp\```
**Endpoints:**- **Web UI**: `https://myapp.${LOKO_DOMAIN}`- **API**: Port 8080
**Connection String:**\```https://myapp.${LOKO_DOMAIN}\```
**Code Example:**
\```pythonimport requests
response = requests.get('https://myapp.${LOKO_DOMAIN}/api')print(response.json())\```
**Chart:** my-repo/myappDocumentation Standards
Section titled “Documentation Standards”- Use clear, concise language
- Include practical code examples
- Show both deployment and usage
- Document all endpoints and ports
- Provide connection strings for external access (using
${LOKO_DOMAIN})
YAML Style Guide
Section titled “YAML Style Guide”Formatting
Section titled “Formatting”- Use 2-space indentation
- Quote strings with special characters
- Use lowercase for keys
- Use kebab-case for workload names
Structure
Section titled “Structure”workloads: my-app: # kebab-case name type: system # system | user category: database # lowercase category description: "Short description" # quoted string
chart: repo: groundhog2k name: groundhog2k/myapp version: "1.0.0" # quoted version
defaults: namespace: loko-workloads ports: [8080] # inline array for short lists storage: size: 10Gi
presets: # Group related settings service: type: ClusterIP port: 8080
# Use YAML anchors for common patterns ingress: <<: *ingress-traefik hosts: - host: myapp.${LOKO_DOMAIN}YAML Anchors
Section titled “YAML Anchors”Reuse common patterns from public/catalog/catalog.yaml:
presets: ingress: <<: *ingress-traefik # Traefik ingress template service: <<: *service-clusterip # ClusterIP service chart: <<: *chart-bjw-s # bjw-s app-templateTesting Checklist
Section titled “Testing Checklist”Before submitting your contribution:
- Workload deploys successfully with
loko workloads add <name> --now - Service is accessible at documented endpoints
- Connection strings work correctly
- Health checks pass
- Secrets are generated properly (if applicable)
- Web UI is accessible (if applicable)
- Documentation is complete and accurate
- YAML is valid and follows style guide
- No Bitnami charts used (use groundhog2k or others)
Validation
Section titled “Validation”The catalog uses automated validation:
Pre-Commit Hooks (Recommended)
Section titled “Pre-Commit Hooks (Recommended)”Automatically validate changes before committing:
# Install pre-commitpip install pre-commit
# Install hookspre-commit install
# Run manually on all filespre-commit run --all-filesWhat it checks:
- YAML syntax and formatting
- Markdown formatting
- Trailing whitespace
- Large files
- Potential secrets
- Broken links
YAML Syntax
Section titled “YAML Syntax”# Install yamllintpip install yamllint
# Validate all YAML filescd public/catalogyamllint catalog.yaml workloads/*.yaml repositories.yamlPydantic Models
Section titled “Pydantic Models”Workload definitions are validated against Python models in the LoKO CLI. Common validation errors:
Missing required fields:
# ❌ Invalidworkloads: myapp: chart: repo: groundhog2k
# ✅ Validworkloads: myapp: type: system description: "My app" chart: repo: groundhog2k name: groundhog2k/myapp version: "1.0.0"Invalid port numbers:
# ❌ Invaliddefaults: ports: [0, 70000]
# ✅ Validdefaults: ports: [8080, 5432]Review Process
Section titled “Review Process”- Automated checks - YAML validation, link checking
- Manual review - Workload configuration, documentation quality
- Testing - Deploy and verify functionality
- Merge - PR merged and workload available in catalog
Review criteria:
- Workload serves a clear purpose
- Configuration is correct and tested
- Documentation is complete
- Follows catalog standards
Getting Help
Section titled “Getting Help”Need help with your contribution?
- GitHub Discussions: getloko/loko/discussions - Ask questions
- GitHub Issues: getloko/loko/issues - Report bugs, request features
- Documentation: https://getloko.github.io/ - Comprehensive guides
- FAQ: Frequently Asked Questions - Common questions answered
Suggest Workloads
Section titled “Suggest Workloads”Don’t have time to contribute? Suggest workloads by opening an issue:
Title: Add workload: PostgreSQL with pgAdminDescription: PostgreSQL database with pgAdmin web UI for local development
- Chart: groundhog2k/postgres- Category: database- Use case: Application development with databaseCode of Conduct
Section titled “Code of Conduct”Be respectful and professional in all interactions. We’re building tools to help developers be more productive, and a positive community makes that easier for everyone.
License
Section titled “License”By contributing, you agree that your contributions will be licensed under the same license as the LoKO project.
Next Steps
Section titled “Next Steps”- Schema Reference - Complete workload schema
- Testing Guidelines - How to test workloads
- Browse Workloads - Existing workloads