Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/walteh/retab
Effortless Configuration Management with HCL ➡️
https://github.com/walteh/retab
editorconfig go golang hcl hcl2 json jsonschema tabs yaml
Last synced: about 1 month ago
JSON representation
Effortless Configuration Management with HCL ➡️
- Host: GitHub
- URL: https://github.com/walteh/retab
- Owner: walteh
- License: apache-2.0
- Created: 2023-06-11T12:40:41.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-17T17:52:53.000Z (5 months ago)
- Last Synced: 2024-09-26T19:07:06.104Z (about 2 months ago)
- Topics: editorconfig, go, golang, hcl, hcl2, json, jsonschema, tabs, yaml
- Language: Go
- Homepage:
- Size: 33.9 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# retab ➡️
**Effortless Configuration Management with HCL**
`retab` streamlines your configuration workflow by transforming human-readable HCL (HashiCorp Configuration Language) files into YAML or JSON. Enjoy the benefits of:
* **Simplified Syntax:** Write cleaner, more maintainable configurations using HCL.
* **Flexible Output:** Generate YAML or JSON output to match your project's requirements.
* **Improved Readability:** Automatically format HCL files for optimal clarity and consistency.## Installation
```bash
go install github.com/walteh/retab/cmd/retab
```## Usage
> [!IMPORTANT]
> Files must be located in a `.retab` directory and have the `.retab` extension.1. **Write your configuration in HCL**
2. **Format:** `retab fmt`
3. **Generate:** `retab gen` (outputs YAML or JSON)## Example
```hcl
# ./.retab/config.retab
gen "config" {
schema = "https://example.com/schema.json" # Optional
path = "config.yaml"
data = {
server = {
port = 8080
enable_ssl = true
}
}
}
```Run `retab gen` to produce:
```yaml
# ./config.yaml
server:
port: 8080
enable_ssl: true
```## Additional Features
* **Advanced Formatting:** Format HCL, Terraform (.tf), Protocol Buffers (.proto), and Dart (.dart) files.
* **Schema Validation:** Ensure your configurations adhere to defined schemas.