Skip to content

docs: add CLI documentation#22

Merged
citron (lcandy2) merged 2 commits into
mainfrom
docs/cli-documentation
May 11, 2026
Merged

docs: add CLI documentation#22
citron (lcandy2) merged 2 commits into
mainfrom
docs/cli-documentation

Conversation

@lcandy2
Copy link
Copy Markdown
Member

@lcandy2 citron (lcandy2) commented May 11, 2026

Summary

  • Adds a new CLI tab to the Photon docs site with 7 pages covering the Photon CLI (@photon-ai/cli)
  • Getting Started: overview (command tree, global flags, pho alias), installation (Homebrew / npx / bun / standalone binary), authentication (device flow, multi-backend, CI tokens)
  • Commands: projects, spectrum (profile/users/lines/platforms/avatar), billing (plans/checkout/manage), profile & utilities (ping/env/whoami/auth/config)
  • Registers all pages in docs.json navigation under the CLI tab

Test plan

  • pnpm docs:generate succeeds
  • pnpm lint passes (pre-commit hook)
  • pnpm typecheck:docs passes (pre-commit hook)
  • mintlify dev local preview renders all 7 pages correctly
  • Verify Mintlify deployment preview renders the CLI tab

Made with Cursor


View in Codesmith
Need help on this PR? Tag @codesmith with what you need.

  • Let Codesmith autofix CI failures and bot reviews

Summary by CodeRabbit

  • Documentation
    • Added comprehensive CLI docs: overview, installation, authentication, billing, projects, Spectrum, and profile/utilities with command examples and flags.
    • Documented login flows, project selection, billing workflows, subscription management, utility commands, and CI/non-interactive usage.
    • Added a new "CLI" documentation section in the navigation with "Getting Started" and "Commands" groups.

Review Change Stack

Adds a new "CLI" tab to the docs site covering the Photon CLI
(@photon-ai/cli). Includes Getting Started (overview, installation,
authentication) and Commands (projects, spectrum, billing, profile
& utilities) sections.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI review requested due to automatic review settings May 11, 2026 16:06
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 11, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: dc87508e-2508-49d5-802c-3641e090d092

📥 Commits

Reviewing files that changed from the base of the PR and between 51f9ceb and 7d468e1.

📒 Files selected for processing (3)
  • cli/billing.mdx
  • cli/installation.mdx
  • cli/overview.mdx

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


📝 Walkthrough

Walkthrough

Adds a new CLI documentation section and pages: overview, installation, authentication, profile/utilities, projects, Spectrum, billing; updates docs.json navigation to include a top-level "CLI" tab.

Changes

CLI Documentation

Layer / File(s) Summary
Navigation & Overview
docs.json, cli/overview.mdx
Adds CLI navigation tab with Getting Started and Commands groups; overview page describes CLI scope, command hierarchy, the pho alias, and global flags (--debug, --no-color).
Installation Guide
cli/installation.mdx
Documents Homebrew, npx/bunx one-off execution, global Bun install with pho alias, standalone binary installation for CI, platform/arch support, SHA256 checks, and verification via photon --version and photon ping.
Authentication Guide
cli/authentication.mdx
Covers device-flow login (photon login with --no-browser), session verification (photon whoami), logout, credential storage and migration, multi-backend credentials, backend host targeting (PHOTON_API_HOST/--api-host), project selection (--project/PHOTON_PROJECT_ID), and CI/non-interactive token usage (--token / PHOTON_TOKEN).
Profile & Utilities
cli/profile-and-utilities.mdx
Documents profile management (photon profile show/init/update) and utility commands (photon ping, ping -u, photon env current, photon whoami, photon auth status, photon config show) with JSON output variants.
Projects Management
cli/projects.mdx
Documents list, show, create (interactive and flag-driven), update, delete (with permanent warning and -y), rotate Spectrum secret, open in dashboard (--no-browser), check phone availability, and common flags.
Spectrum Management
cli/spectrum.mdx
Documents profile show/update, user list/add/remove (with irreversibility warning), line list/add/remove (iMessage-only note), platform list/enable/disable, avatar upload presigned-URL flow and --no-update-profile, plus common flags.
Billing Commands
cli/billing.mdx
Documents plan listing, subscription viewing (--json), Stripe Checkout initiation (plan, qty, --no-browser/--json), and Stripe Customer Portal access; commands require an active project.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

I nibble docs by lantern light,
From install steps to login flight,
Projects, Spectrum, billing in a row,
The pho alias hops — on with the show! 🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'docs: add CLI documentation' is concise, clear, and accurately describes the primary change—adding comprehensive CLI documentation with seven new pages covering overview, installation, authentication, and command references.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/cli-documentation

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
cli/installation.mdx (1)

8-8: ⚡ Quick win

Use second-person voice consistently in narrative text.

A few lines are descriptive but not addressed directly to the reader (for example, “The recommended way…”, “Each invocation pulls…”). Rewriting these in direct second person will align with the docs style used elsewhere.

As per coding guidelines, "Use active voice and second person ("you") in documentation".

Also applies to: 33-33, 56-57

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cli/installation.mdx` at line 8, Several sentences use
third-person/descriptive voice (e.g., "The recommended way to install on macOS
and Linux.", "Each invocation pulls…") instead of addressing the reader; update
those lines to use active, second-person voice using "you" (for example rewrite
"The recommended way to install on macOS and Linux." to directly address the
reader with "You can install on macOS and Linux by…", and change "Each
invocation pulls…" to "Each time you run it, it pulls…"). Search the file for
similar phrasing (including the quoted examples and the other occurrences noted)
and replace passive/descriptive constructions with short, direct "you"-focused
sentences while preserving technical accuracy and meaning.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cli/installation.mdx`:
- Around line 58-63: The install snippet in cli/installation.mdx hard-codes the
filename "photon-darwin-arm64", which will install the wrong binary on
non-darwin/arm64 systems; update the example to be platform-aware by replacing
the fixed artifact name with either (a) a brief shell-based platform/arch
detection and selection of the correct release asset, or (b) explicit
alternative curl examples for darwin-arm64, darwin-amd64, linux-amd64, and
linux-arm64 and a note telling users to pick the matching URL; ensure the
updated text references the original "photon-darwin-arm64" sample so readers see
the mapping.

---

Nitpick comments:
In `@cli/installation.mdx`:
- Line 8: Several sentences use third-person/descriptive voice (e.g., "The
recommended way to install on macOS and Linux.", "Each invocation pulls…")
instead of addressing the reader; update those lines to use active,
second-person voice using "you" (for example rewrite "The recommended way to
install on macOS and Linux." to directly address the reader with "You can
install on macOS and Linux by…", and change "Each invocation pulls…" to "Each
time you run it, it pulls…"). Search the file for similar phrasing (including
the quoted examples and the other occurrences noted) and replace
passive/descriptive constructions with short, direct "you"-focused sentences
while preserving technical accuracy and meaning.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1d6c81b6-e5c3-411c-81f2-81c4985a82df

📥 Commits

Reviewing files that changed from the base of the PR and between 743f856 and 51f9ceb.

📒 Files selected for processing (8)
  • cli/authentication.mdx
  • cli/billing.mdx
  • cli/installation.mdx
  • cli/overview.mdx
  • cli/profile-and-utilities.mdx
  • cli/projects.mdx
  • cli/spectrum.mdx
  • docs.json
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Agent
🧰 Additional context used
📓 Path-based instructions (1)
**/*.mdx

📄 CodeRabbit inference engine (AGENTS.md)

**/*.mdx: Pages should be written as MDX files with YAML frontmatter
Use active voice and second person ("you") in documentation
Keep sentences concise with one idea per sentence in documentation
Use sentence case for headings in documentation
Bold UI elements in documentation (e.g., Click Settings)
Use code formatting for file names, commands, paths, and code references in documentation

Files:

  • cli/profile-and-utilities.mdx
  • cli/billing.mdx
  • cli/installation.mdx
  • cli/spectrum.mdx
  • cli/authentication.mdx
  • cli/overview.mdx
  • cli/projects.mdx
🪛 LanguageTool
cli/profile-and-utilities.mdx

[grammar] ~54-~54: Ensure spelling is correct
Context: ...our-custom-backend.example.com ``` ### env Print the currently resolved backend: `...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

Comment thread cli/installation.mdx
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new CLI section to the Photon Mintlify docs, introducing end-to-end documentation for @photon-ai/cli and wiring it into the site navigation.

Changes:

  • Added a new CLI navigation tab in docs.json with “Getting Started” and “Commands” groups.
  • Introduced 7 new MDX pages covering CLI overview, installation, authentication, and key command areas (projects, spectrum, billing, profile/utilities).
  • Documented common flags, aliases, and expected workflows (project selection, multi-backend auth, CI usage).

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
docs.json Registers the new “CLI” tab and its pages in Mintlify navigation.
cli/overview.mdx CLI positioning + command tree, alias behavior, and global flags.
cli/installation.mdx Install paths (Homebrew, npx/bunx, global Bun, standalone binary) and verification steps.
cli/authentication.mdx Device flow login, credential storage/multi-backend behavior, project selection, and CI token usage.
cli/projects.mdx Project command reference (list/show/create/update/delete/etc.) and common flags.
cli/spectrum.mdx Spectrum command reference (profile/users/lines/platforms/avatar) and common flags.
cli/billing.mdx Billing command reference (plans/show/checkout/manage) and related flags.
cli/profile-and-utilities.mdx Profile management commands + diagnostic utilities (ping/env/whoami/auth/config).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cli/overview.mdx
Comment thread cli/installation.mdx Outdated
Comment thread cli/billing.mdx
- Make standalone binary example platform-aware with <os>-<arch> placeholders
- Use consistent second-person voice ("you") throughout installation page
- Add prerequisite note before Quick Demo in overview
- Clarify npx section requires Bun runtime
- Add --json and --no-browser to billing common flags table

Addresses Copilot/CodeRabbit feedback on #22.

Co-authored-by: Cursor <cursoragent@cursor.com>
@lcandy2 citron (lcandy2) merged commit 2e85ddb into main May 11, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants