@photon-ai/cli 2.0.0 → 2.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.
Files changed (3) hide show
  1. package/README.md +32 -4
  2. package/dist/photon.js +78 -140
  3. package/package.json +4 -2
package/README.md CHANGED
@@ -18,9 +18,12 @@ Runs on Node.js >= 18. Bun is also supported but not required.
18
18
  ```sh
19
19
  npx @photon-ai/cli login
20
20
  npx @photon-ai/cli projects ls
21
+ yarn dlx --package @photon-ai/cli@latest photon login
21
22
  ```
22
23
 
23
- Each invocation pulls the latest release on demand. Good for scripts, throwaway machines, or trying the CLI before committing. Works with `npx`, `pnpx`, or `bunx`.
24
+ Each invocation pulls the requested release on demand. Good for scripts,
25
+ throwaway machines, or trying the CLI before committing. Works with `npx`,
26
+ `pnpx`, `bunx`, or `yarn dlx`.
24
27
 
25
28
  ### Global install
26
29
 
@@ -31,7 +34,8 @@ photon login
31
34
 
32
35
  After install, both `photon` and the shorter `pho` alias are on your `PATH`.
33
36
 
34
- Also works with other package managers:
37
+ Also works with other package managers (Yarn global installs require Yarn
38
+ Classic 1.x):
35
39
 
36
40
  ```sh
37
41
  pnpm add -g @photon-ai/cli
@@ -57,7 +61,27 @@ Available for macOS (arm64 / x64) and Linux (x64 / arm64). Each binary ships wit
57
61
 
58
62
  ## Update
59
63
 
60
- The CLI shows a notification when a new version is available. To update:
64
+ The CLI shows a notification when a new version is available. It can detect
65
+ global npm, pnpm, Yarn Classic, and Bun installs, and securely replace standalone
66
+ binaries after verifying the published SHA-256 checksum:
67
+
68
+ ```sh
69
+ photon update
70
+ photon update --check # check without installing
71
+ photon update --force # reinstall even when already current
72
+ photon update --check --json # machine-readable check result
73
+ ```
74
+
75
+ `--json` also works during an installation. `--force` cannot be combined with
76
+ `--check`.
77
+
78
+ If automatic detection is ambiguous, choose the installer explicitly:
79
+
80
+ ```sh
81
+ photon update --installer npm # npm | pnpm | yarn | bun
82
+ ```
83
+
84
+ You can also update directly with the package manager you originally used:
61
85
 
62
86
  ```sh
63
87
  npm update -g @photon-ai/cli
@@ -80,7 +104,11 @@ curl -L -o /usr/local/bin/photon \
80
104
  chmod +x /usr/local/bin/photon
81
105
  ```
82
106
 
83
- `npx` / `pnpx` / `bunx` users always get the latest release automatically — no manual update needed.
107
+ `npx` / `pnpx` / `bunx` users can request `@photon-ai/cli@latest` directly.
108
+ Yarn 2+ users can run
109
+ `yarn dlx --package @photon-ai/cli@latest photon`, so no self-update is needed.
110
+ If a Yarn 2+ project lists Photon as a local dependency, update it from that
111
+ project with `yarn up @photon-ai/cli`.
84
112
 
85
113
  To suppress the update notification, set `PHOTON_NO_UPDATE_NOTIFIER=1`.
86
114