@tolgamorf/env2op-cli 0.2.1 → 0.2.3
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/LICENSE +1 -1
- package/README.md +39 -9
- package/dist/cli.js +569 -280
- package/dist/index.d.ts +3 -0
- package/dist/index.js +130 -131
- package/dist/op2env-cli.js +553 -266
- package/package.json +1 -1
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
|
-
# env2op
|
|
1
|
+
# 🔐 env2op ⇄ op2env
|
|
2
2
|
|
|
3
|
-
Push `.env` files to 1Password and pull them back with two simple commands.
|
|
3
|
+
### Push `.env` files to [1Password](https://1password.com) and pull them back with two simple commands.
|
|
4
4
|
|
|
5
|
-

|
|
6
|
+
[](https://www.npmjs.com/package/@tolgamorf/env2op-cli)
|
|
7
|
+
[](https://packagephobia.com/result?p=@tolgamorf/env2op-cli@0.2.2)
|
|
8
|
+
[](https://bundlephobia.com/package/@tolgamorf/env2op-cli)
|
|
9
|
+
[](https://github.com/tolgamorf/env2op-cli/commits/main)
|
|
10
|
+
[](https://github.com/tolgamorf/env2op-cli/commits/main)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
[](https://nodejs.org/)
|
|
14
|
+
[](https://www.typescriptlang.org/)
|
|
15
|
+
[](https://nodejs.org/api/esm.html)
|
|
16
|
+
[](https://bun.sh/)
|
|
17
|
+
[](https://biomejs.dev/)
|
|
18
|
+
|
|
19
|
+
[](https://www.npmjs.com/package/@tolgamorf/env2op-cli)
|
|
20
|
+
[](https://github.com/tolgamorf/homebrew-tap)
|
|
21
|
+
[](https://github.com/tolgamorf/env2op-cli/actions/workflows/ci.yml)
|
|
22
|
+
[](https://github.com/tolgamorf/env2op-cli/issues)
|
|
23
|
+
[](https://github.com/tolgamorf/env2op-cli/pulls)
|
|
24
|
+
[](https://github.com/tolgamorf/env2op-cli/blob/main/LICENSE)
|
|
25
|
+
|
|
26
|
+
<!--
|
|
27
|
+
[](https://socket.dev/npm/package/@tolgamorf/env2op-cli)
|
|
28
|
+
[](https://github.com/tolgamorf/env2op-cli/stargazers)
|
|
29
|
+
-->
|
|
30
|
+
|
|
31
|
+

|
|
6
32
|
|
|
7
33
|
## Installation
|
|
8
34
|
|
|
@@ -19,7 +45,7 @@ Or in a single command:
|
|
|
19
45
|
brew install tolgamorf/tap/env2op-cli
|
|
20
46
|
```
|
|
21
47
|
|
|
22
|
-
### Package Managers (
|
|
48
|
+
### Package Managers (macOS/Linux/Windows)
|
|
23
49
|
|
|
24
50
|
#### Global installation
|
|
25
51
|
|
|
@@ -58,7 +84,7 @@ pnpm dlx @tolgamorf/env2op-cli .env Personal "MyApp"
|
|
|
58
84
|
This package provides two commands:
|
|
59
85
|
|
|
60
86
|
| Command | Description |
|
|
61
|
-
|
|
87
|
+
|:--------:|--------------------------------------------------------|
|
|
62
88
|
| `env2op` | Push `.env` to 1Password, generate `.env.tpl` template |
|
|
63
89
|
| `op2env` | Pull secrets from 1Password using `.env.tpl` template |
|
|
64
90
|
|
|
@@ -92,13 +118,15 @@ env2op .env.production Personal "MyApp" -f
|
|
|
92
118
|
### Options for env2op
|
|
93
119
|
|
|
94
120
|
| Flag | Description |
|
|
95
|
-
|
|
121
|
+
|----------------:|-------------------------------------------------------|
|
|
96
122
|
| `-o, --output` | Output template path (default: `<env_file>.tpl`) |
|
|
97
123
|
| `-f, --force` | Skip confirmation prompts |
|
|
98
124
|
| `--dry-run` | Preview actions without executing |
|
|
99
125
|
| `--secret` | Store all fields as 'password' type (default: 'text') |
|
|
100
|
-
|
|
|
126
|
+
| `--verbose` | Show op CLI output |
|
|
127
|
+
| `--update` | Check for and install updates |
|
|
101
128
|
| `-v, --version` | Show version |
|
|
129
|
+
| `-h, --help` | Show help |
|
|
102
130
|
|
|
103
131
|
## op2env (Pull)
|
|
104
132
|
|
|
@@ -127,12 +155,14 @@ op2env .env.tpl -f
|
|
|
127
155
|
### Options for op2env
|
|
128
156
|
|
|
129
157
|
| Flag | Description |
|
|
130
|
-
|
|
158
|
+
|----------------:|-----------------------------------------------------|
|
|
131
159
|
| `-o, --output` | Output .env path (default: template without `.tpl`) |
|
|
132
160
|
| `-f, --force` | Overwrite without prompting |
|
|
133
161
|
| `--dry-run` | Preview actions without executing |
|
|
134
|
-
|
|
|
162
|
+
| `--verbose` | Show op CLI output |
|
|
163
|
+
| `--update` | Check for and install updates |
|
|
135
164
|
| `-v, --version` | Show version |
|
|
165
|
+
| `-h, --help` | Show help |
|
|
136
166
|
|
|
137
167
|
## How It Works
|
|
138
168
|
|