๐ Clamp
![Go version](https://img.shields.io/github/go-mod/go-version/JulienBreux/clamp)
Clamp is a useful tool to help to replace environment variables in any file using go template syntax.
๐ง Installation
Clamp is available on Linux, OSX and Windows platforms.
-
Binaries for Mac OS, Linux and Windows are available as tarballs in the release page.
-
Via Homebrew (Mac OS) or LinuxBrew (Linux)
brew tap JulienBreux/clamp
brew install clamp
-
Building from source
Clamp was built using go 1.12 or above. In order to build Clamp from source you must:
-
Clone this repository
-
Add the following command in your go.mod file
replace (
github.com/JulienBreux/clamp => CLONED_GIT_REPOSITORY
)
-
Build and run the executable
go run main.go
-
Use it
./clamp
๐ Help
How to use from pipe
echo "{{ .USER }}" | clamp
# JulienBreux
How to use from file
echo "{{ .HOME }}" > home.txt
clamp home.txt
# /Users/julienbreux
- Email: julien.breux@gmail.com
- GitHub: @JulienBreux
- Twitter: @JulienBreux
๐ฎโโ๏ธ Security info
GPG Signature
You can download Julien Breux's public key to verify the signature.
gpg --keyserver hkps://hkps.pool.sks-keyservers.net --recv-keys 0BD023FA