Querying perplexity using sonar-pro for: cursor-tools installation guide with maxTokens: 8000 Here's a comprehensive guide on how to install and set up cursor-tools:
To install cursor-tools, follow these steps:
-
Ensure you have Node.js 18 or later installed on your system[4].
-
Run the interactive setup command:
npx cursor-tools@latest install .
This command will[4]:
- Add
cursor-tools
as a dev dependency in your package.json - Guide you through API key configuration
- Update your Cursor project rules for integration
Before installation, make sure you have the following[4]:
- Node.js 18 or later
- Perplexity API key
- Google Gemini API key
- For browser commands:
- Playwright (
npm install --global playwright
) - OpenAI API key or Anthropic API key (for
act
,extract
, andobserve
commands)
- Playwright (
During the installation process, you'll be prompted to enter your API keys[4]. These will be stored in a .cursor-tools.env
file.
cursor-tools automatically configures Cursor by updating your project rules during installation[4]. This provides:
- Command suggestions
- Usage examples
- Context-aware assistance
For new installations, it uses the .cursor/rules/cursor-tools.mdc
file. For existing installations, it maintains compatibility with the legacy .cursorrules
file[4].
To get the full benefits of cursor-tools, use Cursor agent in "yolo mode"[4]. This allows the agent to execute commands directly.
After installation, you can use cursor-tools in your projects. Here are some example commands:
- Web search:
cursor-tools web "your query"
- Repository search:
cursor-tools repo "your query"
- Generate documentation:
cursor-tools doc "repository_url" "output_file.md"
- GitHub integration:
cursor-tools github "fetch issue 123"
- Browser automation:
cursor-tools browser open "https://example.com"
If you encounter issues during installation or usage:
- Ensure
cursor-tools
is properly installed and in your PATH[4]. - Verify that the
.cursor-tools.env
file exists and contains valid API keys[4]. - For GitHub operations, ensure your token has the required scopes (repo, read:user)[4].
- Check your internet connection and API key permissions for model-related errors[4].
Remember, you can always run cursor-tools install
again to reconfigure API keys or update your Cursor project rules[4].
By following this guide, you should be able to successfully install and set up cursor-tools for use with your Cursor AI editor.