{"id":29182517,"url":"https://github.com/gosayram/go-envsync","last_synced_at":"2026-05-19T07:06:48.162Z","repository":{"id":301820440,"uuid":"1010307467","full_name":"Gosayram/go-envsync","owner":"Gosayram","description":"go-envsync is a secure and pluggable environment variable loader for Go projects. It merges .env files with secrets from Kubernetes, Vault, and S3, supports validation, and exports to .env, .json, or .yaml.","archived":false,"fork":false,"pushed_at":"2025-06-29T02:13:30.000Z","size":60,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-29T03:38:22.625Z","etag":null,"topics":["aws-s3","cli","configuration-management","devops","dotenv","env","go","golang","kubernetes","validation","vault"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Gosayram.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-28T19:43:26.000Z","updated_at":"2025-06-29T02:13:33.000Z","dependencies_parsed_at":"2025-06-29T03:50:04.936Z","dependency_job_id":null,"html_url":"https://github.com/Gosayram/go-envsync","commit_stats":null,"previous_names":["gosayram/go-envsync"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Gosayram/go-envsync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gosayram%2Fgo-envsync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gosayram%2Fgo-envsync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gosayram%2Fgo-envsync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gosayram%2Fgo-envsync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gosayram","download_url":"https://codeload.github.com/Gosayram/go-envsync/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gosayram%2Fgo-envsync/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263029214,"owners_count":23402354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws-s3","cli","configuration-management","devops","dotenv","env","go","golang","kubernetes","validation","vault"],"created_at":"2025-07-01T20:06:37.005Z","updated_at":"2026-05-19T07:06:48.107Z","avatar_url":"https://github.com/Gosayram.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-envsync\n\n![Go Version](https://img.shields.io/badge/Go-1.20+-blue.svg)\n![Build Status](https://img.shields.io/badge/build-passing-brightgreen.svg)\n![License](https://img.shields.io/badge/license-MIT-blue.svg)\n\nA minimal yet extensible Go library and CLI tool for unified environment variable and secrets management across multiple sources.\n\n## Features\n\n### ✅ Phase 1 - Core Foundation (Completed)\n- **Multiple Provider Support**: Load configuration from various sources\n- **JSON Schema Validation**: Strong type checking and validation\n- **Multi-Format Export**: Export to JSON, YAML, and .env formats\n- **CLI Interface**: User-friendly command-line tool\n- **SDK Library**: Programmatic access for Go applications\n\n### ✅ Phase 2 - Provider Ecosystem (Completed)\n- **Provider Registry**: Dynamic provider registration system\n- **Local File Provider**: Full support for .env files\n- **Kubernetes Provider**: Stub implementation (ready for k8s dependencies)\n- **Vault Provider**: Stub implementation (ready for HashiCorp Vault)\n- **Provider Management**: List, filter, and configure providers\n\n### 🚧 Future Phases\n- **Phase 3**: Enhanced Validation \u0026 Security\n- **Phase 4**: Advanced CLI Features\n- **Phase 5**: Enterprise Features\n- **Phase 6**: Ecosystem Integration\n\n## Quick Start\n\n### Installation\n\n```bash\n# Build from source\ngit clone https://github.com/Gosayram/go-envsync.git\ncd go-envsync\nmake build\n\n# Or use go install\ngo install github.com/Gosayram/go-envsync/cmd/go-envsync@latest\n```\n\n### Basic Usage\n\n```bash\n# List available providers\ngo-envsync providers\n\n# Load from .env file\ngo-envsync load --from=.env\n\n# Load with validation and export\ngo-envsync load --from=.env --validate=schema.json --export=json:config.json\n\n# Load from multiple sources\ngo-envsync load --from=.env --from=local:.env.local --merge-strategy=override\n```\n\n### Example Configuration\n\nCreate a `.env` file:\n```env\n# Application settings\nAPP_NAME=my-application\nAPP_VERSION=1.0.0\nAPP_ENV=development\n\n# Database settings\nDB_HOST=localhost\nDB_PORT=5432\nDB_NAME=myapp_db\n```\n\nCreate a JSON schema (`.envschema.json`):\n```json\n{\n  \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n  \"type\": \"object\",\n  \"properties\": {\n    \"APP_NAME\": {\n      \"type\": \"string\",\n      \"pattern\": \"^[a-zA-Z0-9_-]+$\"\n    },\n    \"APP_VERSION\": {\n      \"type\": \"string\",\n      \"pattern\": \"^\\\\d+\\\\.\\\\d+\\\\.\\\\d+$\"\n    }\n  },\n  \"required\": [\"APP_NAME\", \"APP_VERSION\"]\n}\n```\n\n## Supported Providers\n\n| Provider | Status | Description |\n|----------|---------|-------------|\n| **local** | ✅ Available | Load from local .env files |\n| **kubernetes** | 🚧 Stub | Kubernetes Secrets/ConfigMaps (requires k8s deps) |\n| **vault** | 🚧 Stub | HashiCorp Vault secrets (requires Vault deps) |\n| **s3** | 📋 Planned | AWS S3 objects |\n\n### Provider Usage\n\n```bash\n# List providers with details\ngo-envsync providers --details\n\n# Filter providers\ngo-envsync providers --filter=local\n\n# Load from different providers (when implemented)\ngo-envsync load --from=local:.env\ngo-envsync load --from=k8s:namespace/secret/my-secret\ngo-envsync load --from=vault:path/to/secret\n```\n\n## Library Usage\n\n```go\npackage main\n\nimport (\n    \"context\"\n    \"log\"\n    \n    \"github.com/Gosayram/go-envsync/pkg/client\"\n    \"github.com/Gosayram/go-envsync/pkg/client\"\n    \"github.com/Gosayram/go-envsync/pkg/providers/local\"\n)\n\nfunc main() {\n    client := client.New()\n    \n    // Add local provider\n    client.AddProvider(\"local\", local.NewProvider())\n    \n    // Load and validate\n    env, err := client.Load(client.LoadOptions{\n        Sources: []string{\"local:.env\"},\n        Schema:  \"./schema.json\",\n    })\n    if err != nil {\n        panic(err)\n    }\n    \n    // Export to different formats\n    env.ExportJSON(\"config.json\")\n}\n```\n\n## Supported Providers\n\n| Provider   | Status    | Description                         |\n| ---------- | --------- | ----------------------------------- |\n| Local      | ✅ Planned | Local .env files with dotenv syntax |\n| Kubernetes | ✅ Planned | K8s Secrets and ConfigMaps          |\n| Vault      | ✅ Planned | HashiCorp Vault integration         |\n| AWS S3     | ✅ Planned | S3 bucket configuration files       |\n\n## Development\n\n### Requirements\n\n- Go 1.24.2+\n- Make\n\n### Building\n\n```bash\n# Install dependencies\nmake deps\n\n# Build binary\nmake build\n\n# Run tests\nmake test\n\n# Run all quality checks\nmake check-all\n```\n\n### Project Structure\n\n```\ngo-envsync/\n├── cmd/envsync/          # CLI application\n├── pkg/                  # Public API packages\n│   ├── client/          # Main client interface\n│   ├── providers/       # Provider implementations\n│   ├── validator/       # Validation engine\n│   └── exporter/        # Export functionality\n├── internal/            # Internal packages\n├── examples/            # Usage examples\n├── docs/                # Documentation\n└── scripts/             # Build scripts\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests and run `make check-all`\n5. Submit a pull request\n\n## License\n\nApache License version 2.0 - see [LICENSE](LICENSE) for details.\n\n## Roadmap\n\n### Phase 1: Core Foundation\n- [x] Project structure and build system\n- [ ] Basic provider interface\n- [ ] Local file provider implementation\n- [ ] JSON Schema validation\n- [ ] CLI basic commands\n\n### Phase 2: Remote Providers\n- [ ] Kubernetes Secrets integration\n- [ ] HashiCorp Vault provider\n- [ ] AWS S3 provider implementation\n- [ ] Multi-source configuration loading\n\n### Phase 3: Advanced Features\n- [ ] Configuration merging and precedence\n- [ ] Custom validation rules engine\n- [ ] Encryption and secure export\n- [ ] Performance optimizations\n\nSee [IDEA.md](IDEA.md) for detailed project vision and architecture. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgosayram%2Fgo-envsync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgosayram%2Fgo-envsync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgosayram%2Fgo-envsync/lists"}