HamedMP / CursorLens

An open-source dashboard for Cursor.sh IDE. Log AI code generations, track usage, and control AI models (including local ones). Run locally or use upcoming hosted version.
https://www.cursorlens.com
GNU Affero General Public License v3.0
160 stars 23 forks source link
analytics claude coding cursor

Cursor Lens ✨

Cursor Lens is an open-source tool designed to provide insights into AI-assisted coding sessions using Cursor AI. It acts as a proxy between Cursor and various AI providers, logging interactions and providing detailed analytics to help developers optimize their use of AI in their coding workflow.

We are live on ProductHunt today, please upvote us if you find this useful! 🙏

Cursor Lens - Open Source Dashboard and Analytics for Cursor IDE | Product Hunt

Cursor Lens Dashboard

Features

Technology Stack

Getting Started

For detailed installation instructions, please refer to our Installation Guide.

Prerequisites

Quick Installation Steps

  1. Clone the repository
  2. Install dependencies with pnpm install
  3. Set up environment variables
  4. Set up the database with pnpm prisma migrate dev
  5. Build the project with pnpm build
  6. Set up ngrok
  7. Configure Cursor to use your ngrok URL as the API endpoint

For full details on each step, please see the Installation Guide.

Usage

  1. Configure Cursor to use Cursor Lens as its API endpoint by overriding OpenAI Base URL.
  2. Choose a gpt- model. Use Cursor as normal for AI-assisted coding.
  3. Visit the Cursor Lens dashboard to view logs, statistics, and insights.

Cursor settings

Stats page

Cursor Lens Stats

Prompt caching with Anthropic (v0.1.2):

  1. Create a new config on /configuration page, choose antropicCached with Sonnet 3.5. Name it as you like.
  2. Mark it as default.
  3. Use Cursor with CursorLens as normal. The system and context messages in CMD+L and CMD+i chats will be cached from now on.

Note that TTL for the cache is 5 minutes.

Add a new config with Antropic Cached Example Cache creation response Example Cache read response

Releases

Nightly - 2024-08-24

To run it, make sure to run:

[0.1.2-alpha] - 2024-08-22

⚠️ ALPHA RELEASE

Added

Improved and fixed

[0.1.1-alpha] - 2024-08-18

⚠️ ALPHA RELEASE

Added

[0.1.0-alpha] - 2024-08-17

This is the initial alpha release of CursorLens. As an alpha version, it may contain bugs and is not yet feature-complete. Use with caution in non-production environments.

Added

Known Issues

Contributing

We welcome contributions to Cursor Lens! Please see our Contributing Guide for more details on how to get started.

License

Cursor Lens is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for details.

Support

If you encounter any issues or have questions, please file an issue on the GitHub repository or contact the maintainers directly.

For more detailed information, please visit our documentation.


Happy coding with Cursor Lens!