gitignored-cli 0.1.1
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 +21 -0
- package/README.md +92 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1407 -0
- package/package.json +56 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024-present gitignored
|
|
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.
|
package/README.md
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# gitignored
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/gitignored-cli)
|
|
4
|
+
[](https://github.com/cyruskelly/gitignored-cli/blob/main/LICENSE)
|
|
5
|
+
|
|
6
|
+
Zero-knowledge `.env` sharing for developer teams. Encrypt, sync, and manage environment variables without ever exposing secrets in plaintext on the server.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install -g gitignored-cli
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Or run directly without installing:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npx gitignored-cli
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Quick start
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Authenticate via the browser
|
|
24
|
+
gitignored login
|
|
25
|
+
|
|
26
|
+
# Create a new project in the current directory
|
|
27
|
+
gitignored new --name my-app
|
|
28
|
+
|
|
29
|
+
# Push your .env.shared to the server (encrypted)
|
|
30
|
+
gitignored push -m "initial env"
|
|
31
|
+
|
|
32
|
+
# Pull the latest .env.shared from the server
|
|
33
|
+
gitignored pull
|
|
34
|
+
|
|
35
|
+
# Invite a teammate
|
|
36
|
+
gitignored invite teammate@example.com
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Command reference
|
|
40
|
+
|
|
41
|
+
| Command | Description |
|
|
42
|
+
| --- | --- |
|
|
43
|
+
| `gitignored login` | Authenticate via browser-based device flow |
|
|
44
|
+
| `gitignored logout` | Sign out and clear local credentials |
|
|
45
|
+
| `gitignored whoami` | Show the current authenticated user |
|
|
46
|
+
| `gitignored new` | Create a new project and generate encryption keys |
|
|
47
|
+
| `gitignored push [-m <msg>]` | Encrypt and push `.env.shared` to the server |
|
|
48
|
+
| `gitignored pull` | Pull and decrypt the latest `.env.shared` |
|
|
49
|
+
| `gitignored invite <email>` | Invite a team member to the project |
|
|
50
|
+
| `gitignored members` | List project members and pending invitations |
|
|
51
|
+
| `gitignored list` | List all projects you belong to |
|
|
52
|
+
| `gitignored switch <slug>` | Switch the active project in the current directory |
|
|
53
|
+
| `gitignored log` | Show the push history for the project |
|
|
54
|
+
| `gitignored diff` | Compare local `.env.shared` with the remote version |
|
|
55
|
+
| `gitignored rollback <version>` | Roll back to a previous version |
|
|
56
|
+
| `gitignored start` | Watch mode -- sync `.env` changes in real-time |
|
|
57
|
+
| `gitignored keys sync` | Sync encryption keys with the server |
|
|
58
|
+
|
|
59
|
+
## How encryption works
|
|
60
|
+
|
|
61
|
+
gitignored uses NaCl (TweetNaCl) for all cryptographic operations. No secrets ever leave your machine in plaintext.
|
|
62
|
+
|
|
63
|
+
1. **Project key** -- A random 256-bit symmetric key is generated locally when you create a project. This key encrypts and decrypts `.env` content using NaCl `secretbox` (XSalsa20-Poly1305).
|
|
64
|
+
2. **Identity keypair** -- Each user has a Curve25519 keypair stored locally. The public key is registered with the server.
|
|
65
|
+
3. **Key exchange** -- When you invite a teammate, the project key is encrypted for them using NaCl `box` (X25519-XSalsa20-Poly1305) with your secret key and their public key.
|
|
66
|
+
4. **Zero knowledge** -- The server only stores encrypted blobs. It never has access to the project key or the plaintext environment variables.
|
|
67
|
+
|
|
68
|
+
## CI/CD usage
|
|
69
|
+
|
|
70
|
+
For automated pipelines, use an API token instead of browser-based login:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
# Set the token as an environment variable
|
|
74
|
+
export GITIGNORED_TOKEN=your-api-token
|
|
75
|
+
|
|
76
|
+
# Pull secrets in CI
|
|
77
|
+
gitignored pull --project my-app
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
You can also pass the token directly:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
gitignored pull --token $GITIGNORED_TOKEN --project my-app
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Documentation
|
|
87
|
+
|
|
88
|
+
Full documentation is available at [gitignored.com/docs](https://gitignored.com/docs).
|
|
89
|
+
|
|
90
|
+
## License
|
|
91
|
+
|
|
92
|
+
[MIT](./LICENSE)
|
package/dist/index.d.ts
ADDED