-
Notifications
You must be signed in to change notification settings - Fork 4
Add CLI documentation auto-generator #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add TypeScript scripts to generate CLI docs at build time - Run actual CLI commands with test credentials to validate they work - Parse --help output to generate commands.mdx - Run 12 tests: basic commands + dependent tests (checkpoint info, url update, restore) - Post test results as PR comment in CI - Add prebuild hook to run generator before astro build - Skip tests in Dockerfile (no API access during Docker build) Requires SPRITES_TEST_TOKEN secret in GitHub repo settings. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Contributor
CLI Documentation Generator
📚 Commands documented
|
The Sprites install script uses bash-specific features (set -o pipefail) which aren't supported by dash (Ubuntu's default sh). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add verification step to test CLI auth before build - Use SPRITE_TOKEN env var (CLI recognizes it directly) - Remove duplicate generate:cli-docs call (prebuild already runs it) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The SPRITE_TOKEN env var alone doesn't work for fresh installs. Use `sprite auth setup --token` to properly configure authentication. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace misleading SPRITE_TOKEN env var section with sprite auth setup --token - Add GitHub Actions example - Update security best practices Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The Sprites install script requires bash (uses set -o pipefail). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The node:22-slim image doesn't include CA certificates, causing curl to fail when downloading the install script. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Contributor
Preview Deployment
Commit: |
Contributor
E2E Test Results❌ Tests failure Ran against: https://pr-67-superfly-sprites-docs.fly.dev |
- Generate CLI docs in CI, commit result (not generated on every build) - Simplify Dockerfile: remove CLI installation - Remove prebuild hook from package.json - Keep generate:api for API docs (still generated on build) - Add Callout margin fix - Update checkpoints.mdx to use Callout component This approach: - Makes Docker builds simpler and faster - Makes deploys more reliable (no external API dependency) - Makes doc changes visible in PRs for review Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Publish the CLI installation and authentication pages by removing draft: true, and add a CLI Reference section to the sidebar with Installation, Authentication, and Commands pages. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The CI workflow now commits updated CLI documentation back to the PR branch when changes are detected. This ensures the generated docs stay in sync with the CLI. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Change preview workflow to trigger on workflow_run after CI completes instead of running in parallel. This ensures the generated CLI docs are committed before the preview build runs. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move preview deployment job into CI workflow to run after build completes. This ensures generated CLI docs are available before the Docker build. Simplify fly-preview.yml to only handle cleanup when PRs are closed. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Both jobs run after preview deployment completes: - E2E tests run Cypress against the preview URL - Lighthouse CI audits changed pages for performance Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
--helpoutput to generatecommands.mdxTests Run (12 total)
Basic tests:
sprite org list,sprite list,sprite exec echo testsprite checkpoint list,sprite url,sprite api /v1/spritessprite upgrade --checkDependent tests (require outputs from previous commands):
sprite checkpoint create→ captures checkpoint IDsprite checkpoint info <id>sprite url update --auth public→--auth defaultsprite restore <id>Usage
CI Integration
prebuildhook beforeastro buildSPRITES_TEST_TOKENsecret (already added)Test plan
commands.mdxbuilds correctly🤖 Generated with Claude Code