envlope 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,32 @@
1
+ # Changelog
2
+
3
+ All notable changes to `envlope` are documented here. This project follows [Semantic Versioning](https://semver.org/) and the [Keep a Changelog](https://keepachangelog.com/) format.
4
+
5
+ ## [0.1.0] — 2026-05-17
6
+
7
+ Initial release.
8
+
9
+ ### Core
10
+
11
+ - AES-256-GCM symmetric encryption with random 256-bit keys (`envlope_key_<base64>` format).
12
+ - Single-line ciphertext file: `envlope:1:<base64(iv || ciphertext || tag)>`. Safe to commit to git.
13
+ - Automatic `.gitignore` management so plaintext env files never accidentally leak into commits.
14
+
15
+ ### Commands
16
+
17
+ - `envlope init [file]` — generate a fresh key (or accept one via `--key`) and encrypt the env file. Backs up any existing `<file>.encrypted` to `<file>.encrypted.bak` before replacing it. Includes a re-init confirmation flow with `--yes` bypass for scripts.
18
+ - `envlope encrypt [file]` — re-encrypt the env file using an existing key. Refuses keys that don't match the current ciphertext, so accidental key rotation can't happen here.
19
+ - `envlope decrypt [file]` — decrypt the encrypted env file. Prompts before overwriting an existing plaintext file unless `--yes` is passed.
20
+ - `envlope status [file]` — health check showing whether `.env` and `.env.encrypted` are in sync, when the ciphertext was last updated, and whether `.gitignore` protects the plaintext. `--strict` exits with code 1 on drift (good for CI).
21
+ - `envlope view <VARIABLE> [file]` — print a single decrypted variable's value to stdout without ever writing the plaintext env to disk. Perfect for shell scripts that need exactly one secret.
22
+
23
+ ### Workflow
24
+
25
+ - **Multi-file support** — every command accepts an optional positional filename argument. `envlope init .env.production`, `envlope encrypt .env.staging`, etc.
26
+ - **`init --key <key>`** — reuse an existing key when bootstrapping a new repo, so teams managing many `.env` files only need one shared key in their password manager.
27
+ - **`ENVLOPE_KEY` environment variable** — set the key once via env var and every command picks it up automatically. Priority is `--key flag → ENVLOPE_KEY env → interactive prompt`.
28
+
29
+ ### Output
30
+
31
+ - **`--json` mode on every command** — suppresses human-readable output and emits a single structured JSON object to stdout. Errors emit `{"error": "...", "code": 1}`. Designed for scripting and CI pipelines.
32
+ - **Update notifier** — gently informs you when a new version of envlope is available, suppressed in `--json` mode.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mohamad
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.