-
Notifications
You must be signed in to change notification settings - Fork 3
Contributing
Griffen Fargo edited this page May 22, 2026
·
3 revisions
How to set up a development environment, run tests, lint code, and submit pull requests to strut.
git clone https://github.com/gfargo/strut.git
cd strutNo build step — it's all bash. You just need shellcheck and bats for linting and testing.
brew install shellcheck bats-core # macOSbats tests/ # All tests
bats tests/test_config.bats # Single fileThe test suite includes property-based tests with 100-iteration randomized loops.
shellcheck -s bash strut
find lib -name '*.sh' -print0 | xargs -0 shellcheck -s bash- Create a feature branch
- Make your changes following Code Conventions
- Add tests in
tests/test_<module>.bats - Run
bats tests/andshellcheckto verify - Submit a PR
| Test | What It Covers |
|---|---|
test_config.bats |
Config walk-up, parsing defaults, symlink resolution |
test_registry.bats |
Registry dispatch routing, invalid type rejection |
test_health_discovery.bats |
Service/DB/port discovery from services.conf |
test_init.bats |
Init flag propagation to strut.conf |
test_entrypoint.bats |
Version round-trip, upgrade guard |
test_no_hardcodes.bats |
Static grep — no hardcoded references in engine |
test_scaffold.bats |
Org substitution, required_vars consistency |
test_docker_helpers.bats |
Docker pull, prune helpers |
test_drift_helpers.bats |
Drift detection logic |
test_schema_helpers.bats |
Schema management |
test_utils.bats |
Utility functions |
test_volumes.bats |
Volume management |
test_topology.bats |
Multi-host topology parsing, resolution, property tests |
test_deploy_blue_green.bats |
Blue-green deploy orchestration, state, rollback |
test_local_helpers.bats |
Local env validation, port checking, endpoint display |
test_github_token.bats |
GitHub token permission checks, creation, revocation |
test_cmd_ship.bats |
Ship command dry-run, flag parsing, env resolution |
test_tui.bats |
TUI stack/command/env discovery, picker helpers |
test_audit.bats |
Audit report generation, key categorization, stack suggestions |
test_remote_init.bats |
Remote init dry-run, arg parsing, connection resolution |
- Code Conventions — Shell module standards
- Adding a New Command — Extending the CLI
- Project Structure — File layout
strut · v0.28.0 · Report an Issue
Getting Started
Core Concepts
Operations
- Deployment
- Ship and Rebuild
- GitHub Action
- Webhook Automation
- Remote Host Setup
- Provisioning
- Blue-Green Deploy
- Deploy Rollback
- Database Backups
- Secrets Management
- Stack Groups
- Lifecycle Hooks
- Notifications
- Key Rotation
- Drift Detection
- Domain and SSL
- Certificate Management
- Gateway Management
- Monitoring
- Volume Management
Advanced
- Security Posture
- VPS Audit and Migration
- Stack Validation
- Data Anonymization
- Debugging
- Local Development
Extending
Contributing