GitHub

Project Description: cursor-tools

What is the project about?

cursor-tools is a command-line interface (CLI) tool designed to enhance the capabilities of AI coding agents, particularly the Cursor Composer Agent. It provides an "AI team" and advanced skills to the agent, enabling it to perform tasks beyond basic code generation and editing. It's essentially a set of utilities that an AI agent can call to interact with the outside world (web, browser, GitHub).

What problem does it solve?

The project addresses the limitations of AI coding agents by giving them access to external resources and tools. It allows the agent to:

  • Perform in-depth web research.
  • Understand and reason about entire codebases.
  • Interact with web applications for testing and debugging.
  • Manage GitHub issues and pull requests.
  • Generate documentation for code repositories.
  • Automate browser interactions.

It solves the problem of the AI being "trapped" within the code editor, unable to access up-to-date information or interact with running applications.

What are the features of the project?

  • Web Search & Research (Perplexity): Uses Perplexity AI to search the web and provide up-to-date information.
  • Repository Context (Gemini 2.0): Leverages Google Gemini 2.0 models for large-context understanding of codebases (up to 2 million tokens).
  • Browser Automation (Stagehand): Automates browser interactions using Playwright, allowing for web scraping, testing, and debugging. This includes opening URLs, performing actions based on natural language instructions, observing interactive elements, and extracting data.
  • GitHub Integration: Allows the agent to interact with GitHub issues and pull requests, including fetching details, viewing discussions, and managing code reviews.
  • Documentation Generation: Generates documentation for local or remote GitHub repositories using Gemini 2.0.
  • Command-Line Interface: Provides a CLI that the AI agent can use to execute commands.
  • Cursor Integration: Seamlessly integrates with Cursor by updating project rules for command suggestions and context-aware assistance.
  • Configurability: Allows customization of models, timeouts, and other settings.
  • Authentication: Supports multiple authentication methods for GitHub (token, CLI, Git credentials).

What are the technologies used in the project?

  • Node.js: The runtime environment for the CLI tool.
  • Perplexity AI API: For web search and research.
  • Google Gemini API: For large-context codebase understanding and reasoning.
  • Playwright: For browser automation.
  • OpenAI API or Anthropic API: Used by Stagehand for browser interaction.
  • Repomix: For analyzing repository structure and generating documentation context.
  • GitHub API: For interacting with GitHub issues and pull requests.
  • npm: Package manager.

What are the benefits of the project?

  • Enhanced AI Agent Capabilities: Expands the abilities of AI coding agents beyond code editing.
  • Improved Code Quality: Allows the agent to leverage up-to-date information and perform thorough testing.
  • Increased Productivity: Automates tasks such as research, documentation, and testing.
  • Better Code Understanding: Provides the agent with a deeper understanding of the codebase.
  • Streamlined Workflow: Integrates seamlessly with Cursor and other coding agents.
  • Automation of repetitive tasks: Browser testing, documentation generation.

What are the use cases of the project?

  • AI-Assisted Code Development: Use the AI agent to write, refactor, and debug code with access to external resources.
  • Automated Testing: Use the agent to automatically test web applications.
  • Web Scraping: Extract data from websites using natural language instructions.
  • Documentation Generation: Automatically generate documentation for projects and dependencies.
  • GitHub Management: Use the agent to manage issues and pull requests.
  • Research and Information Gathering: Quickly gather information from the web during development.
  • Code Review: Have Gemini review code changes.
  • Dependency Documentation: Generate local documentation for external libraries.
cursor-tools screenshot