Package Exports
- cursor-tools
- cursor-tools/dist/index.cjs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cursor-tools) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
cursor-tools
Enhance your Dev Agent / AI powered IDE with even more AI
AI-compatible AI-powered web queries and codebase understanding. cursor-tools seamlessly integrates with Cursor (and other agents) to provide intelligent responses using Perplexity AI for web searches and Google Gemini for whole-repository-aware assistance.
cursor-tools is an npm package that you can install in your project and provides a CLI that your AI agent can use to expand its capabilities.
Installation
Run the interactive setup:
npx cursor-tools install .This command will:
- Add
cursor-toolsas a dev dependency in your package.json - Guide you through API key configuration
- Update your
.cursorrulesfile for Cursor integration
Cursor Usage
Use cursor in agent mode with command execution:
Use web search
"Cursor please implement country specific stripe payment pages for the USA, UK, France and Germany. Use cursor-tools web to check the available stripe payment methods in each country."
Use repo search
"Let's refactor our user class to allow multiple email aliases per user. cursor-tools Gemini for a plan including a list of all files that need to be changed."
Configuration
API Keys
cursor-tools requires API keys for both Perplexity AI and Google Gemini. These can be configured in two ways:
- Interactive Setup: Run
cursor-tools installand follow the prompts - Manual Setup: Create
~/.cursor-tools/.envin your home directory or.cursor-tools.envin your project root:PERPLEXITY_API_KEY="your-perplexity-api-key" GEMINI_API_KEY="your-gemini-api-key"
Default Settings
Customize cursor-tools behavior by creating a cursor-tools.config.json file:
{
"perplexity": {
"model": "llama-3.1-sonar-large-128k-online",
"maxTokens": 5000
},
"gemini": {
"model": "gemini-2.0-flash-thinking-exp",
"maxTokens": 10000
}
}Core Features
Web Search
Use Perplexity AI to get up-to-date information directly within Cursor:
cursor-tools web "What's new in TypeScript 5.7?"Repository Context
Leverage Google Gemini for codebase-aware assistance:
cursor-tools repo "Explain the authentication flow in this project, which files are involved?"Command Options
Both commands support additional flags:
--model: Specify an alternative model--max-tokens: Control response length--help: View all available options
Execution Methods
Execute commands in several ways:
# Global installation
cursor-tools web "query"
# without global installation
npx cursor-tools web "query"Cursor Integration
cursor-tools automatically configures Cursor by updating your .cursorrules file during installation. This provides:
- Command suggestions
- Usage examples
- Context-aware assistance
Troubleshooting
Common Issues
Command Not Found
- Ensure
cursor-toolsis installed (globally or as a dev dependency) - Check your PATH if installed globally
- Ensure
API Key Errors
- Verify
.cursor-tools.envexists and contains valid API keys - Run
cursor-tools installto reconfigure API keys
- Verify
Model Errors
- Check your internet connection
- Verify API key permissions
- Ensure the specified model is available for your API tier
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - see LICENSE for details.