@elding/cli 0.9.1 → 0.9.2
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 +30 -28
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,47 +1,49 @@
|
|
|
1
1
|
# @elding/cli
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
The Elding CLI. Run your app locally with your API keys injected by a proxy:
|
|
4
|
+
the real key never enters your app's memory.
|
|
5
5
|
|
|
6
6
|
```bash
|
|
7
7
|
npm install -g @elding/cli
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
> ⚠️ **Elding warning:** always use the **scoped** name `@elding/cli`. `npm install -g elding` (without the `@elding/` scope) installs an unrelated third-party package, not Elding.
|
|
11
|
+
|
|
12
|
+
## Getting started
|
|
11
13
|
|
|
12
14
|
```bash
|
|
13
|
-
elding login #
|
|
14
|
-
elding init #
|
|
15
|
-
elding proxy -- npm run dev #
|
|
15
|
+
elding login # sign in (opens the browser)
|
|
16
|
+
elding init # link the current folder to a secret set
|
|
17
|
+
elding proxy -- npm run dev # run your app with the proxy active
|
|
16
18
|
```
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
(`configure()`
|
|
20
|
+
In your code, use [`@elding/sdk`](https://www.npmjs.com/package/@elding/sdk)
|
|
21
|
+
(`configure()` for HTTP keys, `secret()` for the rest).
|
|
20
22
|
|
|
21
|
-
##
|
|
23
|
+
## Commands
|
|
22
24
|
|
|
23
|
-
|
|
|
25
|
+
| Command | Role |
|
|
24
26
|
|---|---|
|
|
25
|
-
| `elding login` / `logout` |
|
|
26
|
-
| `elding init` |
|
|
27
|
-
| `elding proxy -- <cmd>` |
|
|
28
|
-
| `elding run -- <cmd>` |
|
|
29
|
-
| `elding keys` / `sets` |
|
|
30
|
-
| `elding use` |
|
|
31
|
-
| `elding status` / `whoami` |
|
|
32
|
-
| `elding doctor` |
|
|
33
|
-
| `elding open` |
|
|
27
|
+
| `elding login` / `logout` | Sign in / out (token in the OS keychain) |
|
|
28
|
+
| `elding init` | Link the project to an organisation + a set |
|
|
29
|
+
| `elding proxy -- <cmd>` | Run `<cmd>` with the local proxy (key out of process) |
|
|
30
|
+
| `elding run -- <cmd>` | Inject secrets as env variables (if allowed by the org) |
|
|
31
|
+
| `elding keys` / `sets` | List keys / sets |
|
|
32
|
+
| `elding use` | Switch the active set |
|
|
33
|
+
| `elding status` / `whoami` | Current state / signed-in user |
|
|
34
|
+
| `elding doctor` | Diagnose the local config |
|
|
35
|
+
| `elding open` | Open the web dashboard |
|
|
34
36
|
|
|
35
37
|
## `proxy` vs `run`
|
|
36
38
|
|
|
37
|
-
- **`proxy`** (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
- **`run
|
|
41
|
-
|
|
39
|
+
- **`proxy`** (recommended): your app receives a placeholder, the proxy injects the
|
|
40
|
+
real key into the outgoing request and locks it to its domain. The key never
|
|
41
|
+
enters `process.env`. For **HTTP API keys** only.
|
|
42
|
+
- **`run`**: injects secrets in clear text into `process.env` (all types, all
|
|
43
|
+
languages). Disabled by default at the organisation level, enable it explicitly.
|
|
42
44
|
|
|
43
|
-
##
|
|
45
|
+
## Security
|
|
44
46
|
|
|
45
|
-
- Token
|
|
46
|
-
-
|
|
47
|
-
-
|
|
47
|
+
- Token stored in the **OS keychain**, never in clear text on disk.
|
|
48
|
+
- The proxy binds `127.0.0.1` only, anti-SSRF, secret values never logged.
|
|
49
|
+
- Each key can be locked to a domain (`allowedHost`) and cut off (`INACTIVE`).
|