Skip to main content

One-off — no install

You can run any CLI command on demand without a global install:
npx @photon-ai/cli login
npx @photon-ai/cli projects ls
Each time you run it, it pulls the latest release automatically. This is useful for scripts, throwaway machines, or trying the CLI before committing.

Global install

For daily use, you can install globally so photon is always on your PATH:
npm install -g @photon-ai/cli
photon login
The pho shortcut alias is created automatically the first time you run photon.
You need Node.js >= 18 to run the CLI. You can also use Bun, but it’s not required.

Standalone binary

If you don’t want any runtime dependency (e.g. CI environments), you can download a prebuilt binary directly. Replace <os> and <arch> with your platform:
# <os>: darwin | linux
# <arch>: arm64 | x64
curl -L -o /usr/local/bin/photon \
  https://github.com/photon-hq/cli/releases/latest/download/photon-<os>-<arch>
chmod +x /usr/local/bin/photon
photon --version
For example, on an Apple Silicon Mac:
curl -L -o /usr/local/bin/photon \
  https://github.com/photon-hq/cli/releases/latest/download/photon-darwin-arm64
chmod +x /usr/local/bin/photon
Available platforms:
PlatformArchitectures
macOSarm64, x64
Linuxarm64, x64
Each binary ships with a corresponding .sha256 checksum on the release page.

Update

The CLI shows a notification when a new version is available. To update:
npm update -g @photon-ai/cli
If you installed via a standalone binary, re-download the latest release:
curl -L -o /usr/local/bin/photon \
  https://github.com/photon-hq/cli/releases/latest/download/photon-<os>-<arch>
chmod +x /usr/local/bin/photon
If you use a one-off runner (npx / pnpx / yarn dlx / bunx), you automatically pick up new releases — no manual update needed. These tools cache resolved versions, so to force the latest immediately, pin to @latest:
npx @photon-ai/cli@latest projects ls
To suppress the update notification, set PHOTON_NO_UPDATE_NOTIFIER=1.

Verify the installation

photon --version
photon ping
photon ping hits the Photon API health endpoint — if you see a success response, you’re ready to authenticate.