Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 30 additions & 12 deletions cli/installation.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: Installation
description: Install the Photon CLI via Homebrew, npm, Bun, or as a standalone binary
description: Install the Photon CLI via npm, or as a standalone binary
---

## Homebrew (macOS / Linux)
{/* ## Homebrew (macOS / Linux)

If you're on macOS or Linux, Homebrew is the easiest option. You get a self-contained binary with no runtime dependencies.

Expand All @@ -12,9 +12,9 @@ brew install photon-hq/photon/photon
photon login
```

Updates automatically with `brew upgrade photon`.
Updates automatically with `brew upgrade photon`. */}

## One-off with npx / bunx
## One-off — no install

You can run any CLI command on demand without a global install:

Expand All @@ -24,6 +24,11 @@ npx @photon-ai/cli login
npx @photon-ai/cli projects ls
```

```sh pnpx
pnpx @photon-ai/cli login
pnpx @photon-ai/cli projects ls
```

```sh bunx
bunx @photon-ai/cli login
bunx @photon-ai/cli projects ls
Comment on lines +27 to 34
Expand All @@ -32,25 +37,38 @@ bunx @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.

<Note>
The npm bundle uses a `#!/usr/bin/env bun` shebang, so you need Bun on your `PATH`. Install it with:
## Global install

```sh
curl -fsSL https://bun.sh/install | bash
For daily use, you can install globally so `photon` is always on your `PATH`:

<CodeGroup>
```sh npm
npm install -g @photon-ai/cli
```
</Note>

## Global install with Bun
```sh pnpm
pnpm add -g @photon-ai/cli
```

For daily use, you can install globally so `photon` is always on your `PATH`:
```sh yarn
yarn global add @photon-ai/cli
```

```sh
```sh bun
bun add -g @photon-ai/cli
```
</CodeGroup>

```sh
photon login
```

The `pho` shortcut alias is created automatically the first time you run `photon`.

<Note>
You need Node.js >= 18 to run the CLI. You can also use Bun, but it's not required.
</Note>

## 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:
Expand Down
4 changes: 3 additions & 1 deletion cli/overview.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Photon CLI
description: Manage projects, Spectrum, billing, and your profile from the terminal
description: Bring your agents to any interface — manage projects, Spectrum, billing, and your profile from the terminal
---

The Photon CLI replaces the [Dashboard](https://app.photon.codes) web UI for everyday work. Manage projects, Spectrum users and lines, billing, and your developer profile — all from a terminal.
Expand All @@ -9,6 +9,8 @@ The Photon CLI replaces the [Dashboard](https://app.photon.codes) web UI for eve
npx @photon-ai/cli login
```

You can run it on Node.js >= 18 — no additional runtime required.

## Quick demo

After [installing](/cli/installation) the CLI:
Expand Down
Loading