docs: add CLI documentation#22
Conversation
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>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
Disabled knowledge base sources:
📝 WalkthroughWalkthroughAdds 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. ChangesCLI Documentation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
cli/installation.mdx (1)
8-8: ⚡ Quick winUse 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
📒 Files selected for processing (8)
cli/authentication.mdxcli/billing.mdxcli/installation.mdxcli/overview.mdxcli/profile-and-utilities.mdxcli/projects.mdxcli/spectrum.mdxdocs.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.mdxcli/billing.mdxcli/installation.mdxcli/spectrum.mdxcli/authentication.mdxcli/overview.mdxcli/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)
There was a problem hiding this comment.
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.jsonwith “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.
- 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>
Summary
@photon-ai/cli)phoalias), installation (Homebrew / npx / bun / standalone binary), authentication (device flow, multi-backend, CI tokens)docs.jsonnavigation under the CLI tabTest plan
pnpm docs:generatesucceedspnpm lintpasses (pre-commit hook)pnpm typecheck:docspasses (pre-commit hook)mintlify devlocal preview renders all 7 pages correctlyMade with Cursor
Need help on this PR? Tag
@codesmithwith what you need.Summary by CodeRabbit