Skip to content

Add /setup-gemini and /setup-firecrawl slash commands#18

Open
heyitsnoah wants to merge 2 commits intomainfrom
feature/setup-commands
Open

Add /setup-gemini and /setup-firecrawl slash commands#18
heyitsnoah wants to merge 2 commits intomainfrom
feature/setup-commands

Conversation

@heyitsnoah
Copy link
Copy Markdown
Owner

Summary

Adds two interactive setup wizard commands that were referenced in /init-bootstrap but were missing:

  • /setup-gemini - Gemini Vision MCP server setup
  • /setup-firecrawl - Firecrawl web scraping setup

Changes

/setup-gemini Command

  • Checks prerequisites (Node.js v22+, pnpm, Claude Code)
  • Guides through getting free Gemini API key from Google AI Studio
  • Configures GEMINI_API_KEY in shell profile (.zshrc/.bashrc)
  • Installs dependencies with pnpm install
  • Registers MCP server using claude mcp add
  • Uses inherited environment variables (no hardcoding in config files)
  • Tests connection and shows usage examples

/setup-firecrawl Command

  • Checks prerequisites (curl, jq)
  • Guides through getting Firecrawl API key (300 free credits)
  • Configures FIRECRAWL_API_KEY in shell profile
  • Explains both scraping scripts:
    • firecrawl-scrape.sh - single URL with custom filename
    • firecrawl-batch.sh - multiple URLs with auto-generated names
  • Shows research workflow patterns
  • Tests with sample scrape

Best Practices Followed

  • No hardcoded secrets: API keys only in shell environment
  • Clean config files: MCP servers inherit env vars automatically
  • Gitignored configs: .mcp.json stays local and secure
  • Interactive wizards: Step-by-step guidance for new users
  • Comprehensive docs: References to detailed troubleshooting guides

Testing

Both commands tested successfully:

  • Environment variable detection works
  • MCP server registration creates clean config
  • Scripts execute properly with inherited env vars

References

  • Referenced in /init-bootstrap lines 122 and 142
  • Gemini Vision docs: .claude/mcp-servers/GEMINI_VISION_QUICK_START.md
  • Firecrawl docs: .scripts/README.md

Fixes #17

🤖 Generated with Claude Code

heyitsnoah and others added 2 commits October 24, 2025 10:42
Add interactive setup wizards for optional integrations:

- /setup-gemini: Guide users through Gemini Vision MCP setup
  - Check prerequisites (Node.js, pnpm, Claude Code)
  - Help get free API key from Google AI Studio
  - Configure GEMINI_API_KEY in shell profile
  - Install dependencies and register MCP server
  - Uses inherited environment variables (no hardcoding)
  - Test connection and show usage examples

- /setup-firecrawl: Guide users through Firecrawl web scraping setup
  - Check prerequisites (curl, jq)
  - Help get API key from firecrawl.dev (300 free credits)
  - Configure FIRECRAWL_API_KEY in shell profile
  - Explain single-URL and batch scraping scripts
  - Show research workflow patterns
  - Test with sample scrape

Both commands follow best practices:
- API keys stored in shell environment only
- No hardcoded secrets in config files
- MCP servers inherit environment variables automatically
- Config files (.mcp.json) remain clean

Fixes #17

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@heyitsnoah
Copy link
Copy Markdown
Owner Author

@claude please review?

@claude
Copy link
Copy Markdown

claude bot commented Oct 27, 2025

Claude finished @heyitsnoah's task —— View job


Code Review Complete ✅

I've reviewed both setup commands and they look excellent! These are well-structured, comprehensive wizard commands that will significantly improve the user onboarding experience. Here's my detailed feedback:


✅ Strengths

Overall Quality

  • Comprehensive documentation: Both commands provide clear, step-by-step instructions that are easy to follow
  • Security best practices: Correctly emphasizes environment variables over hardcoded secrets
  • User experience: Interactive wizard approach with clear explanations of "why" at each step
  • Error handling: Good guidance on common issues and troubleshooting
  • Consistency: Both commands follow the same structural pattern established in other claudesidian commands

/setup-gemini Command

  • ✅ Correctly checks all prerequisites (Node.js v22+, pnpm, Claude Code)
  • ✅ Clear instructions for obtaining free API key from Google AI Studio
  • ✅ Properly configures GEMINI_API_KEY in shell profile (not in config files)
  • Critical detail: Emphasizes running pnpm install BEFORE registering MCP server
  • ✅ Explains both project-scoped and user-scoped installation options
  • ✅ Includes verification steps and usage examples
  • ✅ References comprehensive troubleshooting guide
  • ✅ Consistent with the actual gemini-vision.mjs implementation (line 14: reads from process.env.GEMINI_API_KEY)

/setup-firecrawl Command

  • ✅ Excellent opening that explains the value proposition ("Research Game-Changer")
  • ✅ Clear prerequisites check (curl, jq)
  • ✅ Good guidance on getting API key (300 free credits)
  • ✅ Properly configures FIRECRAWL_API_KEY in shell environment
  • ✅ Thoroughly explains both scripts (firecrawl-scrape.sh and firecrawl-batch.sh)
  • ✅ Provides practical workflow examples for different use cases
  • ✅ Includes test scraping to verify setup
  • ✅ Scripts correctly reference the environment variable (.scripts/firecrawl-scrape.sh:16, .scripts/firecrawl-batch.sh:35)

Integration with /init-bootstrap

  • ✅ Both commands are properly referenced in /init-bootstrap (lines 122 and 142)
  • ✅ The bootstrap command provides appropriate fallback instructions
  • ✅ Good separation of concerns: bootstrap offers quick setup, detailed commands handle full configuration

🔍 Minor Observations

Documentation Consistency

1. Gemini Vision MCP Configuration Discrepancy

In setup-gemini.md (lines 128-143), there's a slight inconsistency with the quick start guide:

  • setup-gemini.md says: "The MCP server will automatically inherit the GEMINI_API_KEY environment variable from your shell"
  • GEMINI_VISION_QUICK_START.md (lines 106-121) shows manual editing of .mcp.json to add the API key

Recommendation: Clarify which approach is preferred. The environment variable inheritance is cleaner, but the quick start guide suggests manual config file editing. The actual MCP server code (line 14 of gemini-vision.mjs) reads from process.env.GEMINI_API_KEY, which supports environment variable inheritance.

Suggested fix (if environment inheritance is the intended approach):

  • Update GEMINI_VISION_QUICK_START.md to match the setup-gemini approach
  • Or clarify that both methods work, but environment inheritance is preferred

Minor Typos/Formatting

2. setup-firecrawl.md line 98

echo 'export FIRECRAWL_API_KEY="fc-their-actual-key"' >> ~/.zshrc

The fc- prefix in the example is helpful for users to understand the format!

3. Argument Hints
Both commands use the same argument hint:

argument-hint: "(optional) skip steps with 'quick' if you already have API key configured"

This is good, but the commands don't explicitly implement the "quick" mode logic. Consider either:

  • Implementing the quick mode (check if env var is set, skip to registration)
  • Or removing the hint if not implementing it

📋 Suggestions for Enhancement

1. Platform-Specific Guidance

Consider adding platform detection similar to /init-bootstrap (lines 384-399):

  • macOS: zsh is default
  • Linux: likely bash
  • Windows: mention WSL or Git Bash requirements

2. Verification Steps

Both commands could benefit from explicit verification commands:

# Verify environment variable is set
if [ -z "$GEMINI_API_KEY" ]; then
  echo "❌ Not set. Please reload your shell or check your profile."
else
  echo "✅ GEMINI_API_KEY is configured"
fi

3. Post-Setup Test Commands

Add specific test commands that users can copy-paste:

# For Gemini Vision
claude mcp list | grep gemini-vision

# For Firecrawl
.scripts/firecrawl-scrape.sh "https://example.com" "/tmp/test-scrape.md" && rm /tmp/test-scrape.md

🎯 Testing Recommendations

Before merging, verify:

  1. ✅ Commands are accessible via /setup-gemini and /setup-firecrawl
  2. ✅ Scripts exist at referenced paths (verified: they do)
  3. ✅ Documentation matches actual implementation (verified: mostly consistent)
  4. ⚠️ Resolve the MCP configuration discrepancy mentioned above
  5. ✅ Test on fresh machine to ensure instructions are complete

📊 Summary

Overall Assessment: ⭐⭐⭐⭐⭐ (Excellent work!)

These commands are production-ready with only minor documentation inconsistencies to address. They significantly improve the user experience and follow security best practices throughout. The comprehensive nature of these wizards will reduce support questions and improve adoption.

Recommendation: Approve with minor suggestions - The documentation discrepancy around MCP configuration should be clarified, but it doesn't block merging.


Files Reviewed

  • .claude/commands/setup-gemini.md (211 lines) ✅
  • .claude/commands/setup-firecrawl.md (305 lines) ✅
  • Referenced: .claude/commands/init-bootstrap.md
  • Referenced: .claude/mcp-servers/GEMINI_VISION_QUICK_START.md ⚠️
  • Referenced: .scripts/firecrawl-scrape.sh
  • Referenced: .scripts/firecrawl-batch.sh

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.

unknown slash command: /setup-gemini and /setup-firecrawl

1 participant