keyman-cli 0.1.1 → 0.2.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/README.md +20 -5
- package/bin/keyman.cjs +2 -2
- package/bin/native/aarch64-apple-darwin/keyman +0 -0
- package/bin/native/aarch64-unknown-linux-gnu/keyman +0 -0
- package/bin/native/x86_64-apple-darwin/keyman +0 -0
- package/bin/native/x86_64-pc-windows-msvc/keyman.exe +0 -0
- package/bin/native/x86_64-unknown-linux-gnu/keyman +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,16 @@ Install the Rust-based Keyman CLI with npm:
|
|
|
6
6
|
npm install -g keyman-cli
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Get started:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
keyman init # create ~/.keyman.yml with an example project and load it
|
|
13
|
+
keyman edit # add your projects and secrets
|
|
14
|
+
cd ~/code/my-app
|
|
15
|
+
keyman inject # write .env for the project named after this folder
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
The master file maps project names to quoted string values:
|
|
10
19
|
|
|
11
20
|
```yaml
|
|
12
21
|
my-app:
|
|
@@ -14,13 +23,19 @@ my-app:
|
|
|
14
23
|
DEBUG: "true"
|
|
15
24
|
```
|
|
16
25
|
|
|
17
|
-
|
|
26
|
+
More commands (leave out the project to use the current folder name):
|
|
18
27
|
|
|
19
28
|
```sh
|
|
20
|
-
keyman load /path/to/master.yml
|
|
21
|
-
keyman
|
|
29
|
+
keyman load /path/to/master.yml # use an existing master file
|
|
30
|
+
keyman status # check every project
|
|
31
|
+
keyman show my-app [--reveal] # variable names, values masked by default
|
|
32
|
+
keyman diff [--reveal] # git-style diff of .env against the master file
|
|
33
|
+
keyman save [--dry-run] # save this folder's .env back to the master file
|
|
34
|
+
eval "$(keyman export my-app)" # load variables into a POSIX shell
|
|
35
|
+
keyman run my-app -- npm start # run a command with the variables, no .env file
|
|
36
|
+
keyman completions bash # also zsh, fish, powershell
|
|
22
37
|
```
|
|
23
38
|
|
|
24
|
-
|
|
39
|
+
Run `keyman help <command>` for details. Keep the master file private and ignore `.env` in Git.
|
|
25
40
|
|
|
26
41
|
Prebuilt binaries are included for Windows x64, macOS Intel and Apple Silicon, and Linux x64 and ARM64. No Rust installation is needed. On Windows systems that block the native executable, the command can use WSL if it is installed. The executable is available as both `keyman` and `keyman-cli`. [Source and full documentation](https://github.com/moonmangit/keyman-cli).
|
package/bin/keyman.cjs
CHANGED
|
@@ -53,9 +53,9 @@ function runWithWsl(args) {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
const linuxArgs = [...args];
|
|
56
|
-
if (linuxArgs[0]
|
|
56
|
+
if (['load', 'init'].includes(linuxArgs[0]) && linuxArgs.length === 2 && !linuxArgs[1].startsWith('-')) {
|
|
57
57
|
linuxArgs[1] = toWslPath(linuxArgs[1]);
|
|
58
|
-
} else if (
|
|
58
|
+
} else if (['inject', 'save', 'diff'].includes(linuxArgs[0]) && linuxArgs.length === 3 && !linuxArgs[2].startsWith('-')) {
|
|
59
59
|
linuxArgs[2] = toWslPath(linuxArgs[2]);
|
|
60
60
|
}
|
|
61
61
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|