@photon-ai/cli 0.4.0 → 1.1.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 +20 -7
  2. package/dist/photon.js +77 -77
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -107,14 +107,30 @@ photon billing show
107
107
  `pho` is a shortcut for `photon`, useful for high-frequency commands. Every global install (npm / pnpm / yarn / bun) wires up both `photon` and `pho` automatically — they're declared as sibling `bin` entries that point at the same binary, so no setup is needed:
108
108
 
109
109
  ```sh
110
- pho ls # photon projects ls
111
- pho whoami
110
+ pho projects ls # same as: photon projects ls
111
+ pho whoami # same as: photon whoami
112
112
  ```
113
113
 
114
+ `pho` is a drop-in alias — it accepts the exact same commands and flags as `photon`, just fewer keystrokes to type. There's no top-level `ls` shortcut; list projects with the full `projects ls` path (`pho projects ls`).
115
+
114
116
  For `npx` / `bunx`, the package name itself is what you type, so `npx @photon-ai/cli` runs `photon` (the first declared bin). To run `pho` explicitly through `npx`, use `npx --package=@photon-ai/cli pho`.
115
117
 
116
118
  ---
117
119
 
120
+ ## Use with AI agents
121
+
122
+ There's a `photon-cli` [Agent Skill](https://skills.sh/) that teaches AI agents (Claude Code, Cursor, Copilot, OpenCode, and [25+ others](https://skills.sh/)) how to drive this CLI — the login flow, project bootstrapping, billing/upgrades, Spectrum resources, and config/environment resolution. Install it from [`photon-hq/skills`](https://github.com/photon-hq/skills):
123
+
124
+ ```sh
125
+ npx skills add photon-hq/skills --skill photon-cli
126
+ ```
127
+
128
+ Once installed, supported agents pick it up automatically — try *"log in to Photon, create a project, and tell me its id and secret"* or *"how many Spectrum lines does my project have, and how do I upgrade it to a business line?"*
129
+
130
+ The same collection ships skills for Photon's other SDKs — [`imessage`](https://github.com/photon-hq/skills/tree/main/skills/imessage), [`spectrum`](https://github.com/photon-hq/skills/tree/main/skills/spectrum), [`chat-adapter-imessage`](https://github.com/photon-hq/skills/tree/main/skills/chat-adapter-imessage), and [`buildspace-ci-cd`](https://github.com/photon-hq/skills/tree/main/skills/buildspace-ci-cd). Browse them all at [photon-hq/skills](https://github.com/photon-hq/skills).
131
+
132
+ ---
133
+
118
134
  ## Concepts
119
135
 
120
136
  ### Backend host
@@ -256,7 +272,7 @@ The CLI's config root is resolved in this order:
256
272
 
257
273
  If a legacy `~/.config/photon-dashboard/` directory exists from a prior pre-rename install, it migrates automatically to the new path on first run.
258
274
 
259
- Other env vars: `PHOTON_TYPES_SRC` (maintainer-only, for `bun run sync:api`), `PHOTON_NO_UPDATE_NOTIFIER=1` (mute update prompt).
275
+ Other env vars: `PHOTON_NO_UPDATE_NOTIFIER=1` (mute update prompt).
260
276
 
261
277
  ---
262
278
 
@@ -278,12 +294,9 @@ bun run typecheck
278
294
 
279
295
  # Build (produces dist/photon.js)
280
296
  bun run build
281
-
282
- # Sync API types from a sibling `dashboard` checkout (maintainer)
283
- bun run sync:api
284
297
  ```
285
298
 
286
- The CLI's API contract comes from the `@photon-ai/api-public` type bundle, vendored at `types/api.d.ts`. To refresh after the dashboard's API surface changes, run `bun run sync:api` (looks for the sibling checkout by default; set `PHOTON_TYPES_SRC` to override).
299
+ The CLI's API contract comes from the [`@photon-ai/dashboard-api`](https://www.npmjs.com/package/@photon-ai/dashboard-api) package, a types-only bundle of the dashboard's public API (the `PublicApp` Elysia type, used with `@elysiajs/eden` treaty). To pick up dashboard API changes, bump that dependency — its version tracks the dashboard release tag.
287
300
 
288
301
  See [`docs/cli-design.md`](docs/cli-design.md) and [`docs/cli-build-plan.md`](docs/cli-build-plan.md) for the full architecture notes.
289
302