A comprehensive toolkit for AI-powered development, image processing, web scraping, and automation. This project provides utility tools that integrate with various AI services and APIs.
npm install
Copy the example environment file and add your API keys:
cp .env.example .env.local
Edit .env.local
with your API keys:
# Required for Gemini AI tools
GOOGLE_AI_STUDIO_KEY=your_google_ai_studio_key_here
# Required for OpenAI image generation
OPENAI_API_KEY=your_openai_api_key_here
# Required for video generation and AI background removal
REPLICATE_API_TOKEN=your_replicate_api_token_here
- Visit Google AI Studio
- Create a new project or select existing
- Generate an API key
- Add to
.env.local
asGOOGLE_AI_STUDIO_KEY
- Visit OpenAI Platform
- Navigate to API Keys section
- Create a new API key
- Add to
.env.local
asOPENAI_API_KEY
- Visit Replicate
- Sign up/login and go to Account settings
- Generate an API token
- Add to
.env.local
asREPLICATE_API_TOKEN
Generate images using Google's Imagen 3.0 or Gemini 2.0:
npm run gemini-image -- generate -p "A futuristic workspace" -m imagen-3.0 --folder public/images
Generate images using GPT-image-1 or DALL-E 3:
npm run openai-image -- generate -p "A robot assistant" --folder public/images
Resize, convert formats, and remove backgrounds:
npm run optimize-image -- -i input.png -o output.webp --resize 512x512 --format webp --quality 90
Remove backgrounds using edge detection:
npm run remove-background-advanced -- --input image.png --output result.png --tolerance 40
Chat with Gemini, analyze documents, and get grounded search results:
# Basic chat
npm run gemini -- --prompt "Explain quantum computing"
# Grounded search with real-time data
npm run gemini -- --prompt "Latest AI developments 2025" --ground --show-search-data
# Structured JSON output
npm run gemini -- --prompt "List programming languages" --json custom --schema '{"type":"array","items":{"type":"object","properties":{"language":{"type":"string"},"description":{"type":"string"}},"required":["language","description"]}}'
# Document analysis
npm run gemini -- --prompt "Summarize this document" --file document.pdf
# Image analysis
npm run gemini -- --prompt "Describe this image" --image photo.jpg
Scrape websites and convert to Markdown:
npm run html-to-md -- --url https://example.com --output content.md --selector main
Download files with progress tracking:
npm run download-file -- --url https://example.com/file.jpg --folder downloads --filename myfile.jpg
Generate videos using various AI models:
npm run generate-video -- --prompt "A rotating cube" --model minimax --duration 3 --output cube.mp4
Manage repositories, PRs, and issues:
npm run github -- pr-create --title "New feature" --body "Description"
npm run github -- issue-list --state open
npm run github -- repo view
cursor-rules-tools/
βββ .cursorrules # Cursor AI rules and tool definitions
βββ .env.example # Environment variables template
βββ package.json # Dependencies and scripts
βββ tools/ # Utility scripts
β βββ gemini.ts # Gemini API integration
β βββ gemini-image-tool.js # Image generation with Gemini
β βββ openai-image-tool.js # OpenAI image generation
β βββ image-optimizer.ts # Image processing with Sharp
β βββ html-to-md.ts # Web scraping to Markdown
β βββ download-file.ts # File download utility
β βββ generate-video.ts # AI video generation
βββ public/
β βββ images/ # Generated/processed images
β βββ videos/ # Generated videos
βββ README.md # This file
You can run tools directly with tsx:
npx tsx tools/gemini.ts --prompt "Hello world"
npx tsx tools/image-optimizer.ts -i input.png -o output.webp
- Create your tool in the
tools/
directory - Add npm script to
package.json
- Update
.cursorrules
command_line_tools section - Test and document in this README
For detailed information about rules and tool configurations, see:
@.cursorrules
- Cursor AI rules and tool definitions@package.json
- Available scripts and dependencies@tools/
- Individual tool scripts and their usage
- Content Creation: Generate images, videos, and convert web content to Markdown
- Development Workflow: Integrate AI assistance into your development process
- Image Processing: Optimize, resize, and enhance images for web/mobile
- Research: Use grounded search to get up-to-date information
- Automation: Automate repetitive tasks with AI-powered tools
- Tools are designed for development environment (
NODE_ENV=development
) - API usage may incur costs depending on your usage and provider plans
- Keep your API keys secure and never commit them to version control
- Some tools require internet connectivity for AI service access
- Fork the repository
- Create a feature branch
- Add or improve tools
- Update documentation
- Submit a pull request
See LICENSE file for details.