CursorLens  by HamedMP

Dashboard for Cursor.sh IDE

created 11 months ago
354 stars

Top 79.9% on sourcepulse

GitHubView on GitHub
Project Summary

Cursor Lens is an open-source dashboard for Cursor.sh IDE, designed to log AI code generation interactions, track token usage, and estimate costs. It targets developers using AI for coding assistance, providing insights to optimize AI model usage and manage expenses.

How It Works

Cursor Lens acts as a proxy between the Cursor IDE and various AI providers (OpenAI, Anthropic, Mistral, Cohere, Groq, Ollama). It intercepts and logs all requests and responses, storing them in a PostgreSQL database via Prisma. The system leverages Next.js and React for its dashboard, with Tailwind CSS and shadcn/ui for styling, offering analytics on token consumption, request patterns, and estimated costs.

Quick Start & Requirements

  • Install: Clone the repository and install dependencies using pnpm.
  • Prerequisites: Node.js (v14+), pnpm, PostgreSQL, ngrok.
  • Setup: Requires environment variable configuration, database migration (npx prisma migrate dev), and ngrok setup to proxy Cursor's API calls.
  • Docs: Installation Guide

Highlighted Details

  • Supports multiple AI providers including OpenAI, Anthropic, Mistral, Cohere, Groq, and Ollama.
  • Features prompt caching for Anthropic (Sonnet 3.5) to reduce redundant requests.
  • Provides real-time monitoring and detailed analytics on AI usage and token consumption.
  • Offers cost estimation based on token usage and model pricing.

Maintenance & Community

  • The project is in alpha release, with recent updates including new AI provider support and improved statistics.
  • Contributions are welcomed via a contributing guide.
  • Support is available by filing issues on GitHub.

Licensing & Compatibility

  • Licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
  • AGPL-3.0 is a strong copyleft license, requiring derivative works to also be open-sourced under the same license, which may restrict commercial use or linking with closed-source applications.

Limitations & Caveats

The project is currently in alpha, with known issues including limited error handling for edge cases, incomplete test coverage, and potential performance issues under heavy load. Cost calculations for cached messages are noted as incorrect.

Health Check
Last commit

9 months ago

Responsiveness

1 week

Pull Requests (30d)
2
Issues (30d)
0
Star History
32 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.