Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/openpixel/rise
A powerful text interpolation tool.
https://github.com/openpixel/rise
hcl hil interpolation substitution
Last synced: 14 days ago
JSON representation
A powerful text interpolation tool.
- Host: GitHub
- URL: https://github.com/openpixel/rise
- Owner: openpixel
- License: mit
- Created: 2017-10-11T06:26:49.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2022-02-03T11:54:40.000Z (almost 3 years ago)
- Last Synced: 2024-06-20T08:04:38.035Z (5 months ago)
- Topics: hcl, hil, interpolation, substitution
- Language: Go
- Homepage: https://docs.openpixel.io/rise/
- Size: 99.6 KB
- Stars: 9
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[![Build Status](https://github.com/openpixel/rise/actions/workflows/go.yml/badge.svg)](https://github.com/openpixel/rise/actions/workflows/go.yml)
[![Go Report Card](https://goreportcard.com/badge/github.com/openpixel/rise)](https://goreportcard.com/report/github.com/openpixel/rise)
[![GoDoc](https://godoc.org/github.com/openpixel/rise?status.svg)](https://godoc.org/github.com/openpixel/rise)# rise
Powerful text interpolation. Documentation can be found [here](https://openpixel.gitbooks.io/rise).
Note: rise is still in development and is subject to breaking changes until we reach our first major release.
## Installation
### Binaries
You can find binaries for the latest release on the [releases](https://github.com/OpenPixel/rise/releases) page.
### Go toolchain
```bash
$ go get -u github.com/openpixel/rise
```## Quickstart
### CLI
You can see the usage documentation for the CLI by running `rise --help`.```bash
$ rise --help
A powerful text interpolation tool.Usage:
rise [flags]
rise [command]Available Commands:
help Help about any command
version Print the version number of riseFlags:
-c, --config stringSlice The files that define the configuration to use for interpolation
-h, --help help for rise
-i, --input string The file to perform interpolation on
-o, --output string The file to output
```### Config Files
The config files should be in hcl compatible formats. See https://github.com/hashicorp/hcl for reference. Rise loads the files using FIFO, meaning the last file to reference a key will take precedence. For example, if we had two files that looked like this:
vars.hcl
```hcl
variable "i" {
value = 6
}
```vars2.hcl
```hcl
variable "i" {
value = 10
}
```And ran the following command
```bash
$ rise ... --config vars.hcl --config vars2.hcl
```The value of `i` would be `10`.
### Examples
Look in the [examples](https://github.com/OpenPixel/rise/tree/master/examples) directory for an example, including inheritance:
```bash
$ rise -i ./examples/input.json -o ./examples/output.json --config ./examples/vars.hcl --config ./examples/vars2.hcl
```## Coming Soon
- More interpolation methods
- Deeper documentation with examples for interpolation methods
- More configuration CLI arguments
- Support for directories as inputs/outputs
- Support for globs (eg: /tmp/*.json)## Inspiration
- [hashicorp/hil](https://github.com/hashicorp/hil) - Used to perform interpolation
- [hashicorp/hcl](https://github.com/hashicorp/hcl) - Used as a configuration syntax for variables
- [hashicorp/terraform](https://github.com/hashicorp/terraform) - Inspiration for the tool. A number of the interpolation functions have been extracted directly from terraform.