@keywaysh/cli 0.1.15 → 0.2.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/README.md +141 -227
- package/dist/{auth-QLPQ24HZ.js → auth-64V3RWUK.js} +1 -1
- package/dist/{chunk-F4C46224.js → chunk-IVZM2JTT.js} +0 -1
- package/dist/cli.js +857 -868
- package/package.json +3 -4
package/README.md
CHANGED
|
@@ -1,168 +1,127 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
<h1>Keyway CLI</h1>
|
|
3
|
-
<strong>
|
|
4
|
-
Stop
|
|
5
|
-
<br
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
<p><strong>Sync .env files across your team in 30 seconds.</strong></p>
|
|
4
|
+
<p>Stop sharing secrets on Slack. One command and everyone's in sync.</p>
|
|
5
|
+
<br/>
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/@keywaysh/cli)
|
|
8
|
+
[](https://www.npmjs.com/package/@keywaysh/cli)
|
|
9
|
+
[](https://opensource.org/licenses/MIT)
|
|
10
|
+
[](https://keyway.sh)
|
|
11
|
+
|
|
12
|
+
<br/>
|
|
13
|
+
<a href="https://keyway.sh">Website</a> •
|
|
14
|
+
<a href="https://docs.keyway.sh">Docs</a> •
|
|
15
|
+
<a href="https://keyway.sh/security">Security</a> •
|
|
9
16
|
<a href="https://status.keyway.sh">Status</a>
|
|
10
|
-
<br/><br/>
|
|
11
|
-
|
|
12
|
-
[](https://opensource.org/licenses/MIT)
|
|
13
|
-
[](https://www.npmjs.com/package/@keywaysh/cli)
|
|
14
|
-
|
|
15
17
|
</div>
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
Most devs store secrets in... chaotic places:
|
|
20
|
-
|
|
21
|
-
- Slack
|
|
22
|
-
- Notion
|
|
23
|
-
- Discord
|
|
24
|
-
- Google Docs
|
|
25
|
-
- Lost `.env` files
|
|
26
|
-
- Messages you can't find anymore
|
|
27
|
-
- Machine of the dev who left the project
|
|
28
|
-
|
|
29
|
-
**Keyway fixes that.**
|
|
19
|
+
<br/>
|
|
30
20
|
|
|
31
|
-
|
|
32
|
-
No invites. No dashboards. No complex config.
|
|
33
|
-
Just one command that works.
|
|
34
|
-
|
|
35
|
-
## Install
|
|
21
|
+
## Quick Start (30 seconds)
|
|
36
22
|
|
|
23
|
+
**1. Setup your project:**
|
|
37
24
|
```bash
|
|
38
25
|
npm install -g @keywaysh/cli
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Quick Start
|
|
42
|
-
|
|
43
|
-
Inside any project connected to GitHub:
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
keyway login
|
|
47
26
|
keyway init
|
|
48
27
|
```
|
|
49
28
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
1. Keyway authenticates via GitHub OAuth
|
|
53
|
-
2. Detects your GitHub repo
|
|
54
|
-
3. Creates a vault for this repo
|
|
55
|
-
4. Asks if you want to sync your `.env`
|
|
56
|
-
|
|
57
|
-
Then any teammate can simply run:
|
|
58
|
-
|
|
29
|
+
**2. Teammates pull secrets:**
|
|
59
30
|
```bash
|
|
60
31
|
keyway pull
|
|
61
32
|
```
|
|
62
33
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
## Commands
|
|
66
|
-
|
|
67
|
-
### `keyway login`
|
|
68
|
-
|
|
69
|
-
Authenticate with GitHub through the Keyway OAuth/device flow.
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
keyway login
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
If you prefer using a fine-grained PAT:
|
|
76
|
-
|
|
34
|
+
**3. Deploy to Vercel:**
|
|
77
35
|
```bash
|
|
78
|
-
keyway
|
|
36
|
+
keyway sync vercel
|
|
79
37
|
```
|
|
80
38
|
|
|
81
|
-
|
|
39
|
+
<br/>
|
|
82
40
|
|
|
83
|
-
|
|
41
|
+
<details>
|
|
42
|
+
<summary><strong>See it in action</strong></summary>
|
|
84
43
|
|
|
85
|
-
```bash
|
|
86
|
-
keyway init
|
|
87
44
|
```
|
|
45
|
+
$ keyway init
|
|
46
|
+
✓ Logged in as @nicolas
|
|
47
|
+
✓ Detected repo: acme/backend
|
|
48
|
+
✓ Vault created
|
|
49
|
+
? Push your .env to the vault? Yes
|
|
50
|
+
✓ 12 secrets encrypted and stored
|
|
88
51
|
|
|
89
|
-
|
|
52
|
+
$ keyway pull
|
|
53
|
+
✓ .env synced (12 secrets)
|
|
54
|
+
```
|
|
90
55
|
|
|
91
|
-
|
|
56
|
+
</details>
|
|
92
57
|
|
|
93
|
-
|
|
58
|
+
<br/>
|
|
94
59
|
|
|
95
|
-
|
|
96
|
-
# Push to development (default)
|
|
97
|
-
keyway push
|
|
60
|
+
## Why Keyway?
|
|
98
61
|
|
|
99
|
-
|
|
100
|
-
keyway push --env production
|
|
62
|
+
Your secrets are probably in:
|
|
101
63
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
64
|
+
- 💬 Slack DMs
|
|
65
|
+
- 📝 Notion pages
|
|
66
|
+
- 📧 Old emails
|
|
67
|
+
- 🤷 The laptop of the dev who left
|
|
105
68
|
|
|
106
|
-
|
|
107
|
-
- you added a new variable
|
|
108
|
-
- you rotated a key
|
|
109
|
-
- you fixed a staging/production mismatch
|
|
69
|
+
**Keyway fixes that.** If you have GitHub repo access → you have secret access. No invites, no dashboards, no YAML.
|
|
110
70
|
|
|
111
|
-
|
|
71
|
+
<br/>
|
|
112
72
|
|
|
113
|
-
|
|
73
|
+
## Install
|
|
114
74
|
|
|
115
75
|
```bash
|
|
116
|
-
#
|
|
117
|
-
|
|
76
|
+
# npm
|
|
77
|
+
npm install -g @keywaysh/cli
|
|
118
78
|
|
|
119
|
-
#
|
|
120
|
-
|
|
79
|
+
# pnpm
|
|
80
|
+
pnpm add -g @keywaysh/cli
|
|
121
81
|
|
|
122
|
-
#
|
|
123
|
-
|
|
124
|
-
```
|
|
82
|
+
# yarn
|
|
83
|
+
yarn global add @keywaysh/cli
|
|
125
84
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
- switching between machines
|
|
85
|
+
# bun
|
|
86
|
+
bun add -g @keywaysh/cli
|
|
87
|
+
```
|
|
130
88
|
|
|
131
|
-
|
|
89
|
+
<br/>
|
|
132
90
|
|
|
133
|
-
|
|
91
|
+
## Commands
|
|
134
92
|
|
|
135
|
-
|
|
136
|
-
|
|
93
|
+
| Command | What it does |
|
|
94
|
+
|---------|--------------|
|
|
95
|
+
| `keyway login` | Authenticate with GitHub |
|
|
96
|
+
| `keyway init` | Create a vault for this repo |
|
|
97
|
+
| `keyway push` | Upload `.env` to vault |
|
|
98
|
+
| `keyway pull` | Download secrets to `.env` |
|
|
99
|
+
| `keyway sync vercel` | Deploy secrets to Vercel |
|
|
100
|
+
| `keyway doctor` | Debug your setup |
|
|
137
101
|
|
|
138
|
-
|
|
139
|
-
keyway doctor --json
|
|
102
|
+
<br/>
|
|
140
103
|
|
|
141
|
-
|
|
142
|
-
keyway doctor --strict
|
|
143
|
-
```
|
|
104
|
+
### Push & Pull
|
|
144
105
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
- API connectivity
|
|
149
|
-
- File system write permissions
|
|
150
|
-
- `.gitignore` configuration
|
|
151
|
-
- System clock synchronization
|
|
106
|
+
```bash
|
|
107
|
+
# Push your local .env
|
|
108
|
+
keyway push
|
|
152
109
|
|
|
153
|
-
|
|
110
|
+
# Push to a specific environment
|
|
111
|
+
keyway push --env production
|
|
154
112
|
|
|
155
|
-
|
|
113
|
+
# Pull secrets
|
|
114
|
+
keyway pull
|
|
156
115
|
|
|
157
|
-
|
|
158
|
-
keyway
|
|
116
|
+
# Pull from production
|
|
117
|
+
keyway pull --env production
|
|
159
118
|
```
|
|
160
119
|
|
|
161
|
-
|
|
120
|
+
<br/>
|
|
162
121
|
|
|
163
|
-
|
|
122
|
+
### Sync to Providers
|
|
164
123
|
|
|
165
|
-
|
|
124
|
+
Deploy your secrets to Vercel, Netlify, or Railway with one command:
|
|
166
125
|
|
|
167
126
|
```bash
|
|
168
127
|
keyway sync vercel
|
|
@@ -170,153 +129,108 @@ keyway sync netlify
|
|
|
170
129
|
keyway sync railway
|
|
171
130
|
```
|
|
172
131
|
|
|
173
|
-
|
|
174
|
-
1. OAuth connection (first time only)
|
|
175
|
-
2. Project auto-detection
|
|
176
|
-
3. Smart diff (only updates what changed)
|
|
177
|
-
|
|
178
|
-
Your local `.env`, Vercel, Netlify, Railway — all in sync with one command.
|
|
179
|
-
|
|
180
|
-
## Security
|
|
181
|
-
|
|
182
|
-
Keyway is designed to be **simple and secure** — a major upgrade from Slack or Notion, without the complexity of Hashicorp Vault or AWS Secrets Manager.
|
|
183
|
-
|
|
184
|
-
**What we do:**
|
|
185
|
-
- AES-256-GCM encryption server-side and client-side token storage
|
|
186
|
-
- TLS everywhere (HTTPS enforced)
|
|
187
|
-
- GitHub read-only permissions
|
|
188
|
-
- No access to your code
|
|
189
|
-
- Secrets stored encrypted at rest
|
|
190
|
-
- No analytics on secret values (only metadata)
|
|
191
|
-
- Encrypted token storage with file permissions
|
|
192
|
-
|
|
193
|
-
**What we don't do:**
|
|
194
|
-
- No zero-trust enterprise model
|
|
195
|
-
- No access to your cloud infrastructure
|
|
196
|
-
- No access to your production deployment keys
|
|
197
|
-
|
|
198
|
-
For detailed security information, see [SECURITY.md](./SECURITY.md) and [keyway.sh/security](https://keyway.sh/security)
|
|
199
|
-
|
|
200
|
-
## Who is this for?
|
|
201
|
-
|
|
202
|
-
Keyway is perfect for:
|
|
203
|
-
- Solo developers
|
|
204
|
-
- Small teams
|
|
205
|
-
- Side-projects
|
|
206
|
-
- Early SaaS
|
|
207
|
-
- Agencies managing many repos
|
|
208
|
-
- Rapid prototyping
|
|
132
|
+
First time: OAuth flow. After that: instant sync.
|
|
209
133
|
|
|
210
|
-
|
|
211
|
-
- Banks
|
|
212
|
-
- Governments
|
|
213
|
-
- Enterprise zero-trust teams
|
|
214
|
-
*(you're looking for Vault, Doppler, or AWS Secrets Manager)*
|
|
134
|
+
<br/>
|
|
215
135
|
|
|
216
|
-
##
|
|
136
|
+
## Real-World Workflows
|
|
217
137
|
|
|
138
|
+
**New dev joins the team:**
|
|
218
139
|
```bash
|
|
219
|
-
git clone git@github.com:acme/
|
|
220
|
-
cd
|
|
140
|
+
git clone git@github.com:acme/app.git
|
|
141
|
+
cd app
|
|
221
142
|
keyway pull
|
|
222
|
-
#
|
|
223
|
-
npm run dev
|
|
143
|
+
npm run dev # Ready to code
|
|
224
144
|
```
|
|
225
145
|
|
|
226
|
-
|
|
227
|
-
|
|
146
|
+
**Rotate an API key:**
|
|
228
147
|
```bash
|
|
229
|
-
|
|
148
|
+
# Update .env locally, then:
|
|
230
149
|
keyway push
|
|
231
|
-
#
|
|
150
|
+
# Done. Everyone pulls the update.
|
|
232
151
|
```
|
|
233
152
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
### GitHub Token (alternative to login)
|
|
237
|
-
|
|
238
|
-
If you cannot use the login flow, set a GitHub token manually:
|
|
239
|
-
|
|
153
|
+
**Deploy to production:**
|
|
240
154
|
```bash
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
# Or via git config
|
|
245
|
-
git config --global github.token your_github_personal_access_token
|
|
155
|
+
keyway push --env production
|
|
156
|
+
keyway sync vercel
|
|
246
157
|
```
|
|
247
158
|
|
|
248
|
-
|
|
159
|
+
<br/>
|
|
249
160
|
|
|
250
|
-
|
|
161
|
+
## Security
|
|
251
162
|
|
|
252
|
-
|
|
253
|
-
export KEYWAY_API_URL=http://localhost:3000
|
|
254
|
-
```
|
|
163
|
+
Keyway is a **major upgrade from Slack** without the complexity of Vault or AWS Secrets Manager.
|
|
255
164
|
|
|
256
|
-
|
|
165
|
+
| Feature | Status |
|
|
166
|
+
|---------|--------|
|
|
167
|
+
| AES-256-GCM encryption | ✅ |
|
|
168
|
+
| Encrypted at rest | ✅ |
|
|
169
|
+
| TLS 1.3 everywhere | ✅ |
|
|
170
|
+
| GitHub-based access control | ✅ |
|
|
171
|
+
| No access to your code | ✅ |
|
|
172
|
+
| SOC2 / enterprise compliance | ❌ |
|
|
257
173
|
|
|
258
|
-
|
|
259
|
-
export KEYWAY_DISABLE_TELEMETRY=1
|
|
260
|
-
```
|
|
174
|
+
**We never track secret values.** Only metadata (command usage, repo names).
|
|
261
175
|
|
|
262
|
-
|
|
176
|
+
→ [Full security details](https://keyway.sh/security)
|
|
263
177
|
|
|
264
|
-
|
|
265
|
-
- Secret names or values
|
|
266
|
-
- Environment variable content
|
|
267
|
-
- Access tokens
|
|
268
|
-
- File contents
|
|
178
|
+
<br/>
|
|
269
179
|
|
|
270
|
-
|
|
271
|
-
- Command usage (init, push, pull)
|
|
272
|
-
- Repository names (public info)
|
|
273
|
-
- Error messages (sanitized)
|
|
180
|
+
## Who is this for?
|
|
274
181
|
|
|
275
|
-
|
|
182
|
+
**Perfect for:**
|
|
183
|
+
- Solo devs
|
|
184
|
+
- Small teams (2-20)
|
|
185
|
+
- Side projects
|
|
186
|
+
- Agencies
|
|
187
|
+
- Early-stage startups
|
|
276
188
|
|
|
277
|
-
|
|
189
|
+
**Not for:**
|
|
190
|
+
- Banks, governments, enterprises needing SOC2/zero-trust
|
|
191
|
+
- (Try Vault, Doppler, or AWS Secrets Manager)
|
|
278
192
|
|
|
279
|
-
|
|
280
|
-
git init
|
|
281
|
-
git remote add origin git@github.com:your-org/your-repo.git
|
|
282
|
-
```
|
|
193
|
+
<br/>
|
|
283
194
|
|
|
284
|
-
|
|
195
|
+
## Configuration
|
|
285
196
|
|
|
286
197
|
```bash
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
export GITHUB_TOKEN=your_token
|
|
290
|
-
```
|
|
198
|
+
# Use a different API
|
|
199
|
+
export KEYWAY_API_URL=https://your-api.com
|
|
291
200
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
```bash
|
|
295
|
-
keyway init
|
|
201
|
+
# Disable telemetry
|
|
202
|
+
export KEYWAY_DISABLE_TELEMETRY=1
|
|
296
203
|
```
|
|
297
204
|
|
|
298
|
-
|
|
205
|
+
<br/>
|
|
299
206
|
|
|
300
|
-
|
|
207
|
+
## Troubleshooting
|
|
301
208
|
|
|
302
|
-
|
|
209
|
+
| Error | Fix |
|
|
210
|
+
|-------|-----|
|
|
211
|
+
| "Not in a git repository" | Run `git init && git remote add origin ...` |
|
|
212
|
+
| "Vault not found" | Run `keyway init` |
|
|
213
|
+
| "No access to repository" | Check you're a GitHub collaborator |
|
|
303
214
|
|
|
304
|
-
|
|
305
|
-
npm i -g @keywaysh/cli
|
|
306
|
-
keyway login
|
|
307
|
-
keyway init
|
|
308
|
-
keyway pull
|
|
309
|
-
```
|
|
215
|
+
Run `keyway doctor` for full diagnostics.
|
|
310
216
|
|
|
311
|
-
|
|
312
|
-
Your team stays perfectly in sync.
|
|
217
|
+
<br/>
|
|
313
218
|
|
|
314
|
-
##
|
|
219
|
+
## Links
|
|
315
220
|
|
|
316
|
-
- **
|
|
317
|
-
- **
|
|
318
|
-
- **
|
|
221
|
+
- **Website:** [keyway.sh](https://keyway.sh)
|
|
222
|
+
- **Docs:** [docs.keyway.sh](https://docs.keyway.sh)
|
|
223
|
+
- **Issues:** [GitHub Issues](https://github.com/keywaysh/cli/issues)
|
|
224
|
+
- **Email:** hello@keyway.sh
|
|
225
|
+
|
|
226
|
+
<br/>
|
|
319
227
|
|
|
320
228
|
## License
|
|
321
229
|
|
|
322
|
-
MIT © Nicolas Ritouet
|
|
230
|
+
MIT © [Nicolas Ritouet](https://github.com/nicolasritouet)
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
<div align="center">
|
|
235
|
+
<sub>Built with ☕ by <a href="https://keyway.sh">Keyway</a></sub>
|
|
236
|
+
</div>
|