Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ishotihadus/momoka
Encrypted dotenv manager
https://github.com/ishotihadus/momoka
Last synced: about 2 months ago
JSON representation
Encrypted dotenv manager
- Host: GitHub
- URL: https://github.com/ishotihadus/momoka
- Owner: Ishotihadus
- License: mit
- Created: 2022-12-04T10:56:40.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-22T07:15:39.000Z (9 months ago)
- Last Synced: 2024-10-31T14:23:23.539Z (2 months ago)
- Language: Ruby
- Size: 10.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Momoka
白薔薇のように無垢なドレス…普段のレディなわたくしより、少し幼く見えるかもしれません。ですがこの装いでこそ引き立つ表情もありますわ。
Encrypted dotenv file manager.
## Installation
Install the gem and add to the application's Gemfile by executing:
$ bundle add momoka
If bundler is not being used to manage dependencies, install the gem by executing:
$ gem install momoka
## Usage
### 1. Initialize
Generate a new key file `.momoka`.
```sh
$ momoka-cli init
```By this command, a new key file `.momoka` is generated like:
```
i7rxNWSlteGzfBK5WhVkt9Jy+Zgk+TsPnNAhvB2VGCj89dcXWYg5+ibLTpWv5IYV
```### 2. Encrypt
Encrypt text from stdin using `.momoka`.
```sh
$ echo 'sakurai momoka' | momoka-cli encrypt
# => :momoka:hLUcqXF5Td3ZR17xWHjIAQ==:
```Tips: If you use macOS, `pbcopy` command is useful.
```sh
$ echo 'sakurai momoka' | momoka-cli encrypt | pbcopy
```### 3. Write encrypted text to .env file
```
TEST=:momoka:hLUcqXF5Td3ZR17xWHjIAQ==:
```### 4. Load from ruby
```rb
require 'momoka'Momoka.load
```### encenv mode
You can directly encrypt an env file.
```sh
$ bundle exec momoka-cli encenv >> .env < sakurai momoka
```## License
This gem is licensed under the MIT License.