|
| 1 | +# Quick Start Guide |
| 2 | + |
| 3 | +Get up and running with the Strapi Release Documentation Analyzer in 5 minutes. |
| 4 | + |
| 5 | +## Step 1: Install Dependencies |
| 6 | + |
| 7 | +```bash |
| 8 | +cd scripts/strapi-release-analyzer |
| 9 | +yarn install |
| 10 | +``` |
| 11 | + |
| 12 | +## Step 2: Configure API Keys |
| 13 | + |
| 14 | +Create a `.env` file at the project root: |
| 15 | + |
| 16 | +```bash |
| 17 | +# In the documentation repo root (not in scripts folder) |
| 18 | +cd ../.. |
| 19 | +touch .env |
| 20 | +``` |
| 21 | + |
| 22 | +Add your keys to `.env`: |
| 23 | + |
| 24 | +```bash |
| 25 | +GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| 26 | +ANTHROPIC_API_KEY=sk-ant-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| 27 | +``` |
| 28 | + |
| 29 | +### Getting the Keys |
| 30 | + |
| 31 | +**GitHub Token:** |
| 32 | +- Visit: https://github.com/settings/tokens |
| 33 | +- Click "Generate new token (classic)" |
| 34 | +- Select scope: `public_repo` |
| 35 | +- Copy the token starting with `ghp_` |
| 36 | + |
| 37 | +**Anthropic API Key:** |
| 38 | +- Visit: https://console.anthropic.com/settings/keys |
| 39 | +- Click "Create Key" |
| 40 | +- Copy the key starting with `sk-ant-` |
| 41 | + |
| 42 | +## Step 3: Run Your First Analysis |
| 43 | + |
| 44 | +**Basic analysis (markdown only):** |
| 45 | +```bash |
| 46 | +node scripts/strapi-release-analyzer/index.js https://github.com/strapi/strapi/releases/tag/v5.29.0 |
| 47 | +``` |
| 48 | + |
| 49 | +**With PDF generation:** |
| 50 | +```bash |
| 51 | +node scripts/strapi-release-analyzer/index.js https://github.com/strapi/strapi/releases/tag/v5.29.0 --pdf |
| 52 | +``` |
| 53 | + |
| 54 | +You should see: |
| 55 | +``` |
| 56 | +🚀 Starting Strapi Release Documentation Analysis |
| 57 | +
|
| 58 | +🤖 Using Claude claude-sonnet-4-5-20250929 for intelligent analysis |
| 59 | +
|
| 60 | +📦 Fetching release: v5.29.0 |
| 61 | +✅ Found 19 PRs in release notes |
| 62 | +
|
| 63 | +📝 Analyzing 19 PRs... |
| 64 | +
|
| 65 | + 🔍 Analyzing PR #24554... |
| 66 | + 🤖 Generating documentation suggestions with Claude for PR #24554... |
| 67 | + ✅ Generated 2 suggestions (priority: high) |
| 68 | + ... |
| 69 | +``` |
| 70 | + |
| 71 | +## Step 4: View the Report |
| 72 | + |
| 73 | +The report is generated in: |
| 74 | +``` |
| 75 | +release-analysis/v5.29.0-doc-analysis.md |
| 76 | +release-analysis/v5.29.0-doc-analysis.pdf (if you used --pdf) |
| 77 | +``` |
| 78 | + |
| 79 | +Open it and review the suggestions! |
| 80 | + |
| 81 | +## Step 5: Use in Notion (Optional) |
| 82 | + |
| 83 | +**Copy-paste the markdown into Notion:** |
| 84 | + |
| 85 | +1. Open the `.md` file |
| 86 | +2. Select all (Cmd/Ctrl + A) and copy |
| 87 | +3. Paste into any Notion page |
| 88 | +4. ✨ Checkboxes, formatting, and collapsible sections work perfectly! |
| 89 | + |
| 90 | +**The report is organized by:** |
| 91 | +- 🏗️ CMS Documentation → Features, APIs, Configurations, etc. |
| 92 | +- ☁️ Cloud Documentation → Getting Started, Projects, etc. |
| 93 | + |
| 94 | +Each PR has interactive checkboxes you can tick off as you complete tasks! |
| 95 | + |
| 96 | +## Common Issues |
| 97 | + |
| 98 | +### "GITHUB_TOKEN is not set" |
| 99 | +- Make sure `.env` is in the documentation repo root (not in scripts folder) |
| 100 | +- Check that the variable name is exactly `GITHUB_TOKEN` |
| 101 | + |
| 102 | +### "ANTHROPIC_API_KEY is not set" |
| 103 | +- Make sure you've added it to the `.env` file |
| 104 | +- Verify the key starts with `sk-ant-` |
| 105 | + |
| 106 | +### "Error [ERR_REQUIRE_ESM]" |
| 107 | +- Make sure `package.json` has `"type": "module"` |
| 108 | +- This should already be configured |
| 109 | + |
| 110 | +### Rate Limiting |
| 111 | +- The script respects API rate limits |
| 112 | +- It adds 1-second delays between requests |
| 113 | +- If you hit limits, wait a few minutes and try again |
| 114 | + |
| 115 | +## Next Steps |
| 116 | + |
| 117 | +- Review the generated report |
| 118 | +- Validate suggestions against actual PRs |
| 119 | +- Start creating documentation updates based on suggestions |
| 120 | +- Integrate into your release workflow |
| 121 | + |
| 122 | +## Questions? |
| 123 | + |
| 124 | +Check the main [README.md](./README.md) for detailed documentation. |
0 commit comments