🦉Owlly
![wakatime](https://wakatime.com/badge/user/e56daee8-7aae-4b0e-814c-b6bb7f5f841c/project/c15254fd-0a5e-4b66-b897-5ed473191817.svg)
A file-based .env change notifier for your slack team.
Table of Contents
Features
-
Auto-sync .env file changes
-
Watch multiple .env files
-
Auto-post the update to slack channel as attachment
-
Basic metadata supported: timestamp, .env directory
-
Cross platform supported: Windows, Mac OS(intel, m1 chip)
-
Got a cool hand-drawn logo thanks to @HaidiYJ
![owlly-logo-resized](https://user-images.githubusercontent.com/83855174/201008428-7545fafb-bd55-46dc-ab41-46c1c5d5180c.jpg)
Install
Clone this repo and compile it. Go supports cross-compile.
git clone https://github.com/asunlabs/owlly.git
# from Windows(Powershell) to Mac OS
$env:GOOS = "darwin"
$env:GOARCH = "amd64"
go build -o ./bin/owlly-for-mac owlly.go
# for Windows
go build -o ./bin/owlly-for-window.exe owlly.go
Or, simply download binaries from release and execute it.
Prerequisite
Assumption
Owlly will check if below files exist in your project root and sync if exist.
envList = []string{
".env",
".env.test",
".env.development",
".env.production",
".env.dev",
".env.prod",
}
Slack
In order to use Owlly, you have to
- Create a slack bot
- Install the bot to your slack workspace
- Issue bot user oauth token and get channel ID to use the bot.
Usage
- Update .env files as you wish.
FOO="bar"
- Once done, set OWLLY_DONE variable in your .env. This variable will be a key for Owlly to know if your update is done. So your .env will look like,
AUTHOR="developerasun"
FOO="bar"
SLACK_BOT_USER_OAUTH_TOKEN="xoxb-some-value-here"
SLACK_CHANNEL_ID="channel-id-here"
# length of OWLLY_DONE > 0 ? send a DM : do nothing
# OWLLY_DONE="true" // add this line when update is done
- Run Owlly
# if you cloned a repo,
go run owlly.go
# if you executes binaries,
./owlly-for-windows.exe
./owlly-for-mac
./owlly-for-mac-m1
Check your slack channel if the message is sent. Result will look like below.
Note
- Owlly ver 0.1.4 does not support hot-reload yet. It means that you have to re-start Owlly in the situation where 1) you sent DM already 2) but updated it again 3) and want to send it again.
Maintainer
Project Created by developerasun
Reference