Development Setup¶
Set up your development environment for envsecrets.
Prerequisites¶
- mise — run
mise installto set up Go 1.24 and golangci-lint v2 - Docker (for integration tests)
Clone and Build¶
Running Tests¶
Unit Tests¶
Integration Tests¶
Integration tests use testcontainers with fake-gcs-server:
All Checks¶
Code Quality¶
Linting¶
Formatting¶
Building Documentation¶
Open http://127.0.0.1:7070 to preview.
Project Structure¶
envsecrets/
├── cmd/envsecrets/ # Entry point
├── internal/
│ ├── cli/ # Cobra commands
│ ├── config/ # Configuration management
│ ├── constants/ # Defaults and exit codes
│ ├── crypto/ # Age encryption
│ ├── domain/ # Types and errors
│ ├── git/ # Git operations
│ ├── project/ # Project discovery
│ ├── storage/ # GCS abstraction
│ ├── cache/ # Local cache
│ ├── sync/ # Push/pull orchestration
│ ├── ui/ # Terminal UI
│ └── version/ # Build info
├── test/integration/ # Integration tests
└── docs/ # Documentation
Testing Strategy¶
- Unit tests: Interface mocking, table-driven tests
- Integration tests: testcontainers with fake-gcs-server
- Git tests: go-git with memory storage
Making Changes¶
- Create a feature branch
- Make changes with tests
- Run
make check - Submit a pull request