owlly

command module
v0.0.0-...-763a825 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2022 License: MIT Imports: 12 Imported by: 0

README

🦉Owlly

version 0.1.4 wakatime

A file-based .env change notifier for your slack team.

demo

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

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

  1. Create a slack bot
  2. Install the bot to your slack workspace
  3. Issue bot user oauth token and get channel ID to use the bot.

Usage

  1. Update .env files as you wish.
FOO="bar"
  1. 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
  1. 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.

owlly banner

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL