@hades200082/envsync 0.0.2 → 0.0.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/README.md +14 -11
- package/dist/src/cli.js +3 -3
- package/package.json +1 -1
- package/schema.json +2 -2
package/README.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# envsync
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@hades200082/envsync)
|
|
4
|
+
[](https://github.com/hades200082/env-sync/actions/workflows/ci.yml)
|
|
5
|
+
|
|
3
6
|
One JSON file that lists the CLI tools and agent skills you want. One command that installs or updates them on whatever machine you are sitting at: Ubuntu, Mint, Fedora, macOS, Windows, WSL, or an agent sandbox.
|
|
4
7
|
|
|
5
8
|
I wrote it because I work across an Ubuntu server, a Linux Mint desktop and a Windows 11 laptop, plus the odd Claude Code sandbox, and one of them was always missing `gh` or running stale skills.
|
|
@@ -9,7 +12,7 @@ I wrote it because I work across an Ubuntu server, a Linux Mint desktop and a Wi
|
|
|
9
12
|
1. Make a config file. This writes a starter one into the current directory:
|
|
10
13
|
|
|
11
14
|
```sh
|
|
12
|
-
npx -y envsync@latest --init
|
|
15
|
+
npx -y @hades200082/envsync@latest --init
|
|
13
16
|
```
|
|
14
17
|
|
|
15
18
|
Add `--global` to write it to `~/.config/envsync/envsync.json` instead, so it is found from any directory.
|
|
@@ -19,7 +22,7 @@ I wrote it because I work across an Ubuntu server, a Linux Mint desktop and a Wi
|
|
|
19
22
|
3. Run it. Same command on every machine:
|
|
20
23
|
|
|
21
24
|
```sh
|
|
22
|
-
npx -y envsync@latest
|
|
25
|
+
npx -y @hades200082/envsync@latest
|
|
23
26
|
```
|
|
24
27
|
|
|
25
28
|
Tools that are missing get installed. Tools that are present get updated. Anything that fails is reported and the rest carries on.
|
|
@@ -27,12 +30,12 @@ I wrote it because I work across an Ubuntu server, a Linux Mint desktop and a Wi
|
|
|
27
30
|
Useful variations:
|
|
28
31
|
|
|
29
32
|
```sh
|
|
30
|
-
npx -y envsync@latest --status # just tell me what is missing
|
|
31
|
-
npx -y envsync@latest --dry-run # show what would run
|
|
32
|
-
npx -y envsync@latest --only gh # one tool
|
|
33
|
-
npx -y envsync@latest -f ./work.json # a specific file or URL
|
|
34
|
-
npx -y envsync@latest -g you/dotfiles # envsync.json from a GitHub repo
|
|
35
|
-
npx -y envsync@latest --info # what does this machine look like to envsync?
|
|
33
|
+
npx -y @hades200082/envsync@latest --status # just tell me what is missing
|
|
34
|
+
npx -y @hades200082/envsync@latest --dry-run # show what would run
|
|
35
|
+
npx -y @hades200082/envsync@latest --only gh # one tool
|
|
36
|
+
npx -y @hades200082/envsync@latest -f ./work.json # a specific file or URL
|
|
37
|
+
npx -y @hades200082/envsync@latest -g you/dotfiles # envsync.json from a GitHub repo
|
|
38
|
+
npx -y @hades200082/envsync@latest --info # what does this machine look like to envsync?
|
|
36
39
|
```
|
|
37
40
|
|
|
38
41
|
Requires Node 18 or later. No other dependencies.
|
|
@@ -136,7 +139,7 @@ After every install or update, envsync re-reads the environment the way a new te
|
|
|
136
139
|
|
|
137
140
|
### Selectors
|
|
138
141
|
|
|
139
|
-
This is how one file covers several distros. Each machine gets an ordered list of selectors, most specific first, and a platform map uses the first key it has that appears in that list. `npx -y envsync@latest --info` prints the list for the machine you are on. A Linux Mint 22.1 desktop with apt and snap looks like this:
|
|
142
|
+
This is how one file covers several distros. Each machine gets an ordered list of selectors, most specific first, and a platform map uses the first key it has that appears in that list. `npx -y @hades200082/envsync@latest --info` prints the list for the machine you are on. A Linux Mint 22.1 desktop with apt and snap looks like this:
|
|
140
143
|
|
|
141
144
|
```
|
|
142
145
|
linuxmint-22.1, linuxmint-22, linuxmint, ubuntu, debian, apt, snap, linux, unix, default
|
|
@@ -234,7 +237,7 @@ A tool that should only run inside a sandbox:
|
|
|
234
237
|
{ "name": "sandbox-setup", "platforms": ["claude-code", "codex"], "install": "..." }
|
|
235
238
|
```
|
|
236
239
|
|
|
237
|
-
For Claude Code on the web or Codex, the simplest arrangement is a setup script that runs `npx -y envsync@latest -g you/dotfiles`. Those containers are Ubuntu or Debian as root, so the `apt` selector matches and `$ENVSYNC_SUDO` is empty.
|
|
240
|
+
For Claude Code on the web or Codex, the simplest arrangement is a setup script that runs `npx -y @hades200082/envsync@latest -g you/dotfiles`. Those containers are Ubuntu or Debian as root, so the `apt` selector matches and `$ENVSYNC_SUDO` is empty.
|
|
238
241
|
|
|
239
242
|
## Shells
|
|
240
243
|
|
|
@@ -271,7 +274,7 @@ Exit code is 0 when everything ran, 1 when an install or update failed (or, with
|
|
|
271
274
|
|
|
272
275
|
## Keeping envsync itself current
|
|
273
276
|
|
|
274
|
-
Always run it as `npx -y envsync@latest`. Without `@latest`, npx will reuse a cached older version. Each run also asks the npm registry whether a newer version exists and prints a one-line note at the end if so. Set `ENVSYNC_NO_UPDATE_CHECK=1` or pass `--no-update-check` to turn that off.
|
|
277
|
+
Always run it as `npx -y @hades200082/envsync@latest`. Without `@latest`, npx will reuse a cached older version. Each run also asks the npm registry whether a newer version exists and prints a one-line note at the end if so. Set `ENVSYNC_NO_UPDATE_CHECK=1` or pass `--no-update-check` to turn that off.
|
|
275
278
|
|
|
276
279
|
## Releasing a new version
|
|
277
280
|
|
package/dist/src/cli.js
CHANGED
|
@@ -18,7 +18,7 @@ const HELP = `envsync ${pkg.version}
|
|
|
18
18
|
Install and update your CLI tools and agent skills from one JSON file.
|
|
19
19
|
|
|
20
20
|
Usage
|
|
21
|
-
npx -y envsync@latest [options]
|
|
21
|
+
npx -y @hades200082/envsync@latest [options]
|
|
22
22
|
|
|
23
23
|
Config lookup (first hit wins)
|
|
24
24
|
1. --file <path or URL> any local path or http(s) URL
|
|
@@ -142,7 +142,7 @@ async function main(argv) {
|
|
|
142
142
|
const newer = await updatePromise;
|
|
143
143
|
if (newer) {
|
|
144
144
|
log.info("");
|
|
145
|
-
log.info(c.yellow(`A newer envsync is available (${newer}, you have ${pkg.version}). Run: npx -y envsync@latest`));
|
|
145
|
+
log.info(c.yellow(`A newer envsync is available (${newer}, you have ${pkg.version}). Run: npx -y @hades200082/envsync@latest`));
|
|
146
146
|
}
|
|
147
147
|
if (runnerOptions.statusOnly)
|
|
148
148
|
return outcomes.some((o) => o.status === "missing") ? 1 : 0;
|
|
@@ -157,7 +157,7 @@ function writeStarter(global) {
|
|
|
157
157
|
fs.mkdirSync(path.dirname(target), { recursive: true });
|
|
158
158
|
fs.writeFileSync(target, starterConfig(), "utf8");
|
|
159
159
|
log.info(`Wrote ${target}`);
|
|
160
|
-
log.info(c.dim("Edit it, then run: npx -y envsync@latest"));
|
|
160
|
+
log.info(c.dim("Edit it, then run: npx -y @hades200082/envsync@latest"));
|
|
161
161
|
return 0;
|
|
162
162
|
}
|
|
163
163
|
function splitList(values) {
|
package/package.json
CHANGED
package/schema.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
3
|
"$id": "https://raw.githubusercontent.com/hades200082/env-sync/master/schema.json",
|
|
4
4
|
"title": "envsync config",
|
|
5
|
-
"description": "Tools to install and keep updated on every machine. Run with `npx -y envsync@latest`.",
|
|
5
|
+
"description": "Tools to install and keep updated on every machine. Run with `npx -y @hades200082/envsync@latest`.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"additionalProperties": false,
|
|
8
8
|
"required": ["tools"],
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
]
|
|
56
56
|
},
|
|
57
57
|
"platformMap": {
|
|
58
|
-
"description": "Keys are platform selectors. The first key that matches this machine wins, most specific first: host (claude-code, codex, codespaces, gitpod, ci, container, wsl), distro id with version (ubuntu-24.04, ubuntu-24), distro id (ubuntu, linuxmint, fedora), ID_LIKE ids (debian), package manager (apt, dnf, yum, pacman, zypper, apk, nix, brew, port, snap, flatpak, winget, choco, scoop), OS family (linux, macos, windows; also macos-15, windows-11), unix (Linux and macOS), default. Run `npx -y envsync@latest --info` to see a machine's selectors.",
|
|
58
|
+
"description": "Keys are platform selectors. The first key that matches this machine wins, most specific first: host (claude-code, codex, codespaces, gitpod, ci, container, wsl), distro id with version (ubuntu-24.04, ubuntu-24), distro id (ubuntu, linuxmint, fedora), ID_LIKE ids (debian), package manager (apt, dnf, yum, pacman, zypper, apk, nix, brew, port, snap, flatpak, winget, choco, scoop), OS family (linux, macos, windows; also macos-15, windows-11), unix (Linux and macOS), default. Run `npx -y @hades200082/envsync@latest --info` to see a machine's selectors.",
|
|
59
59
|
"type": "object",
|
|
60
60
|
"minProperties": 1,
|
|
61
61
|
"not": { "required": ["run"] },
|